Interface traffic management method, device, medium and computing equipment

By evaluating application priorities for each access party of the interface and configuring QPS thresholds, combined with automatic detection and adjustment mechanisms, the problem of low timeliness of interface traffic management in the existing technology is solved, efficient and automatic traffic management is achieved, and user experience and business stability are improved.

CN119743438APending Publication Date: 2025-04-01HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411921078.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In the prior art, the timeliness of interface traffic management are low, resulting in the person in charge that may not be able to respond in time and adjust the QPS threshold when the interface traffic changes suddenly, resulting in excessive flow restriction of the access party's call requests, affecting user experience and business continuity.

Method used

By pre-evaluating each access party of the interface, and configuring the corresponding QPS threshold, the overall QPS usage of the interface is automatically detected when the access party's call frequency exceeds its QPS threshold, and the QPS increment of the access party is determined in combination with the access party's application priority and QPS threshold. In accordance with the priority order of the access party, the QPS threshold of each access party whose call frequency exceeds its QPS threshold is adjusted in turn.

Benefits of technology

Automatic adjustment of QPS threshold for the access party triggering current limit is realized, which improves the efficiency and response speed of traffic management, ensures that the access party with high priority can obtain higher QPS threshold adjustment quotas first, and meets the call needs of important access parties first, improves user experience, and ensures the continuity and stability of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743438A_ABST
    Figure CN119743438A_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide an interface traffic management method, device, medium and computing equipment. The method pre-evaluates and determines the application priority for each access party of the interface, and configures the corresponding QPS threshold. When the call frequency of the access party exceeds its QPS threshold, the overall QPS usage of the interface is automatically detected, and the QPS increment of the access party is determined by combining the application priority and QPS threshold of the access party. Then, according to the priority order of the access party, the QPS threshold of each access party whose call frequency exceeds its QPS threshold is adjusted in turn, thereby realizing automatic adjustment of the QPS threshold of the access party that triggers the current limiting, ensuring that the high-priority access party can obtain a higher QPS threshold adjustment quota first, giving priority to meeting the call requirements of important access parties, and improving the efficiency and response speed of traffic management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of Internet technology, and more specifically, embodiments of the present invention relate to an interface traffic management method, apparatus, medium, and computing device. Background Art

[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] In the ecosystem of an open platform, enterprises or organizations usually open up their own data, interfaces, technologies or service resources to the outside world in order to promote the development of the entire ecosystem, further enriching and expanding the platform's ecology. With the increase in access parties and the frequency of calls, it is necessary to efficiently manage the traffic calls of the interface.

[0004] In the related technology, a QPS threshold is usually set for each access party. When the call frequency of an access party to an interface exceeds its preset QPS threshold, a system alarm will be triggered to notify the relevant person in charge. After receiving the alarm, the person in charge logs into the background system to check the margin of the relevant interface and manually updates the QPS threshold of the access party according to the actual situation.

[0005] However, in this QPS management method, the manual update of the QPS threshold has low timeliness. When there is a sudden change in the interface traffic, the person in charge may not be able to respond and adjust the QPS threshold in time, resulting in excessive flow restriction of the access party's call requests, affecting user experience and business continuity. Summary of the invention

[0006] In view of this, in order to solve the above problems, embodiments of the present invention are intended to provide an interface traffic management method, apparatus, medium and computing device.

[0007] In a first aspect of an embodiment of the present invention, a method for managing interface traffic is provided, wherein the interface includes multiple access parties, and an application priority is pre-determined for each access party and a QPS threshold is configured; the method includes:

[0008] In response to at least one access party calling the interface at a frequency exceeding a query rate per second (QPS) threshold of the access party, obtaining a sum of QPS thresholds of multiple access parties included in the interface;

[0009] In the case where the sum of the QPS thresholds is less than the total QPS limit of the interface, determining the QPS increment of the access party according to the application priority and the QPS threshold of the access party exceeding the QPS threshold;

[0010] According to the application priority order of the access parties exceeding the QPS threshold, the QPS threshold of the access parties exceeding the QPS threshold is increased in sequence according to the QPS increment.

[0011] Optionally, determining the QPS increment of the access party includes:

[0012] According to the correspondence between the priority and the adjustment ratio, the adjustment ratio of the application priority of the access party matching the access party exceeding the QPS threshold is obtained;

[0013] The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

[0014] Optionally, determining the QPS increment of the access party includes:

[0015] Get a fixed adjustment ratio;

[0016] The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

[0017] Optionally, determining the QPS increment of the access party according to the QPS threshold of the access party that exceeds the QPS threshold and the acquired adjustment ratio includes:

[0018] Acquire a product of the QPS threshold of the access party exceeding the QPS threshold and the adjustment ratio as a candidate adjustment value;

[0019] In the case where the candidate adjustment value is greater than the QPS difference, determining the QPS difference as the QPS increment; wherein the QPS difference represents the remaining available amount of QPS of the interface;

[0020] In a case where the candidate adjustment value is less than or equal to the QPS difference, the candidate adjustment value is determined as the QPS increment.

[0021] Optionally, determining the QPS increment of the access party according to the application priority and the QPS threshold of the access party exceeding the QPS threshold includes:

[0022] For each access party that exceeds the QPS threshold, obtain the number of times the QPS threshold of the access party is expanded and the total adjustment value within a set time range;

[0023] When the number is less than a set number threshold and the total adjustment value is less than a total quota threshold, the QPS increment of the access party is determined; wherein the set number threshold and / or the total quota threshold corresponds to the application priority of the access party.

[0024] Optionally, the method further comprises:

[0025] In the case where at least two access parties trigger current limiting, obtaining timestamp information of each access party triggering current limiting; the triggering of current limiting means that the access party's call frequency on the interface exceeds the QPS threshold of the access party;

[0026] According to the timestamp information of each access party that triggers the current limiting, when it is determined that the access parties that trigger the current limiting are successively triggered current limiting, or are simultaneously triggered current limiting and the number of access parties that are triggered simultaneously does not exceed the threshold, the sum of the QPS thresholds of the multiple access parties included in the interface is obtained;

[0027] When it is determined that the various access parties that trigger the current limiting are simultaneously triggered and the number of access parties triggered simultaneously is greater than the threshold, the interface calls of the various access parties that trigger the current limiting are restricted to remain within their respective QPS threshold ranges, and a current limiting alarm is generated; the current limiting alarm is used to prompt adjustment of the total QPS limit of the interface.

[0028] Optionally, the method further comprises:

[0029] For multiple access parties included in the interface, regularly obtain QPS data fluctuation information of the access parties calling the interface before the timing and within a set historical period;

[0030] Calculate a new QPS threshold re-evaluated for the access party according to the QPS data fluctuation information of the access party and the QPS threshold newly configured by the access party; wherein the sum of the new QPS thresholds of the multiple access parties included in the interface is less than the total QPS limit of the interface;

[0031] The newly configured QPS threshold of the access party is reset using the re-evaluated new QPS threshold.

[0032] Optionally, the method further comprises:

[0033] When a new access party is detected to request access to the interface, obtaining the calling scenario, number of daily active users of the application, and calling magnitude of the new access party;

[0034] According to the calling scenario, the number of daily active users of the application and the calling level, the application priority of the new access party is determined, and a QPS threshold is set; the QPS threshold is positively correlated with the application priority of the new access party.

[0035] In a second aspect of the embodiments of the present invention, an interface traffic management device is provided, wherein the interface includes multiple access parties, an application priority is predetermined for each access party, and a QPS threshold is configured; the device includes:

[0036] A trigger detection module, configured to obtain the sum of QPS thresholds of multiple access parties included in the interface in response to a call frequency of at least one access party to the interface exceeding a query rate per second (QPS) threshold of the access party;

[0037] an increment determination module, configured to determine a QPS increment of an access party that exceeds the QPS threshold according to an application priority and a QPS threshold of the access party when the sum of the QPS thresholds is less than the total QPS limit of the interface;

[0038] The threshold adjustment module is used to increase the QPS threshold of the access party exceeding the QPS threshold according to the QPS increment in sequence according to the application priority order of the access party exceeding the QPS threshold.

[0039] Optionally, the increment determination module is specifically used to:

[0040] According to the correspondence between the priority and the adjustment ratio, the adjustment ratio of the application priority of the access party matching the access party exceeding the QPS threshold is obtained;

[0041] The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

[0042] Optionally, the increment determination module is specifically used to:

[0043] Get a fixed adjustment ratio;

[0044] The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

[0045] Optionally, when the increment determination module is used to determine the QPS increment of the access party according to the QPS threshold of the access party exceeding the QPS threshold and the acquired adjustment ratio, it includes:

[0046] Acquire a product of the QPS threshold of the access party exceeding the QPS threshold and the adjustment ratio as a candidate adjustment value;

[0047] In the case where the candidate adjustment value is greater than the QPS difference, determining the QPS difference as the QPS increment; wherein the QPS difference represents the remaining available amount of QPS of the interface;

[0048] In a case where the candidate adjustment value is less than or equal to the QPS difference, the candidate adjustment value is determined as the QPS increment.

[0049] Optionally, the increment determination module is specifically used to:

[0050] For each access party that exceeds the QPS threshold, obtain the number of times the QPS threshold of the access party is expanded and the total adjustment value within a set time range;

[0051] When the number is less than a set number threshold and the total adjustment value is less than a total quota threshold, the QPS increment of the access party is determined; wherein the set number threshold and / or the total quota threshold corresponds to the application priority of the access party.

[0052] Optionally, the device further comprises:

[0053] In the case where at least two access parties trigger current limiting, obtaining timestamp information of each access party triggering current limiting; the triggering of current limiting means that the access party's call frequency on the interface exceeds the QPS threshold of the access party;

[0054] According to the timestamp information of each access party that triggers the current limiting, when it is determined that the access parties that trigger the current limiting are successively triggered current limiting, or are simultaneously triggered current limiting and the number of access parties that are triggered simultaneously does not exceed the threshold, the sum of the QPS thresholds of the multiple access parties included in the interface is obtained;

[0055] When it is determined that the various access parties that trigger the current limiting are simultaneously triggered and the number of access parties triggered simultaneously is greater than the threshold, the interface calls of the various access parties that trigger the current limiting are restricted to remain within their respective QPS threshold ranges, and a current limiting alarm is generated; the current limiting alarm is used to prompt adjustment of the total QPS limit of the interface.

[0056] Optionally, the device further comprises:

[0057] For multiple access parties included in the interface, regularly obtain QPS data fluctuation information of the access parties calling the interface before the timing and within a set historical period;

[0058] Calculate a new QPS threshold re-evaluated for the access party according to the QPS data fluctuation information of the access party and the QPS threshold newly configured by the access party; wherein the sum of the new QPS thresholds of the multiple access parties included in the interface is less than the total QPS limit of the interface;

[0059] The newly configured QPS threshold of the access party is reset using the re-evaluated new QPS threshold.

[0060] Optionally, the device further comprises:

[0061] When a new access party is detected to request access to the interface, obtaining the calling scenario, number of daily active users of the application, and calling magnitude of the new access party;

[0062] According to the calling scenario, the number of daily active users of the application and the calling level, the application priority of the new access party is determined, and a QPS threshold is set; the QPS threshold is positively correlated with the application priority of the new access party.

[0063] In a third aspect of the embodiments of the present invention, a readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned interface traffic management method is implemented.

[0064] In a fourth aspect of the embodiments of the present invention, a computing device is provided, comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the above-mentioned interface traffic management method by calling the computer program.

[0065] The implementation mode of the present invention pre-evaluates and determines the application priority for each access party of the interface, and configures the corresponding QPS threshold. When the call frequency of the access party exceeds its QPS threshold, the overall QPS usage of the interface is automatically detected, and the QPS increment of the access party is determined in combination with the application priority and QPS threshold of the access party. Then, according to the priority order of the access party, the QPS threshold of each access party whose call frequency exceeds its QPS threshold is adjusted in turn, thereby realizing automatic adjustment of the QPS threshold of the access party that triggers the flow limiting, improving the efficiency and response speed of traffic management, and the method ensures that high-priority access parties can obtain higher QPS threshold adjustment quotas first, giving priority to meeting the call needs of important access parties, improving user experience, and ensuring business continuity and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0067] Figure 1 A flow chart of an interface traffic management method according to an embodiment of the present invention is schematically shown;

[0068] Figure 2 A schematic diagram of a process for determining a QPS increment of an access party according to an embodiment of the present invention is schematically shown;

[0069] Figure 3 A schematic diagram of another process of determining a QPS increment of an access party according to an embodiment of the present invention is schematically shown;

[0070] Figure 4 A flowchart of a process of triggering current limiting by multiple access parties according to an embodiment of the present invention is schematically shown;

[0071] Figure 5 A flowchart of a timing update interface including multiple access parties according to an embodiment of the present invention is schematically shown;

[0072] Figure 6 A schematic diagram of determining application priority and configuring QPS threshold when a new access party requests to access the interface according to an embodiment of the present invention is schematically shown;

[0073] Figure 7 A block diagram of an interface traffic management device according to an embodiment of the present invention is schematically shown;

[0074] Figure 8 A schematic diagram of a medium according to an embodiment of the present invention is schematically shown;

[0075] Fig. 9 A schematic diagram of a computing device according to an embodiment of the present invention is schematically shown.

[0076] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0077] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0078] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0079] According to an embodiment of the present invention, an interface traffic management method, apparatus, medium and computing device are proposed.

[0080] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.

[0081] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.

[0082] In the ecosystem of an open platform, enterprises or organizations usually open up their own data, interfaces, technologies or service resources to the outside world in order to promote the development of the entire ecosystem. Open interfaces or resources enable third-party developers, partners or users to create new applications, products or services based on them, thereby further enriching and expanding the platform ecosystem. However, with the increase in access parties and the frequency of calls, interface traffic management has become a critical issue.

[0083] In existing technical solutions, when the call frequency of a certain access party exceeds its preset QPS threshold, a system alarm is triggered to notify the relevant person in charge. After receiving the alarm, the person in charge needs to manually log in to the background system to check the traffic margin of the relevant interface and manually update the QPS threshold of the access party according to the actual situation. Alternatively, when the access party foresees that an abnormality may exceed the QPS threshold or an abnormality has already occurred, it will actively feedback to the person in charge, and then the person in charge will manually adjust the configuration in the background.

[0084] However, the above-mentioned existing technology has obvious shortcomings. On the one hand, the process of manually updating the QPS threshold is time-consuming and labor-intensive, requiring the person in charge to invest a lot of time and energy; secondly, the above-mentioned method has low timeliness. When there is a sudden change in the interface traffic, the person in charge may not be able to respond and adjust the QPS threshold in time, resulting in excessive flow restriction of the access party's call request, affecting user experience and business continuity.

[0085] In view of this, the present invention proposes a new method for managing interface traffic, which can be widely used in the traffic management of interfaces in scenarios such as data center networks, microservice architectures, cloud computing platforms, and online service systems where multiple services coexist, by pre-evaluating and determining the application priority for each access party, and configuring the corresponding QPS threshold. When the call frequency of a certain access party exceeds its QPS threshold, the overall QPS usage of the interface is automatically detected, and when there is a QPS margin on the interface, its QPS increment is determined according to the priority and QPS threshold of the access party, and the QPS threshold of each access party is increased in turn according to the priority order of the access party, thereby realizing automated interface traffic management, ensuring that high-priority access parties can obtain more traffic resources first, and improving the efficiency of interface traffic management.

[0086] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.

[0087] Exemplary Methods

[0088] Reference below Figure 1-9To describe an interface traffic management method according to an exemplary embodiment of the present invention, the method can be performed by an interface server or the platform where it is located, or an interface traffic management device that can establish communication with the interface server or the platform where it is located, and is used to manage the traffic of interface calls of various access parties connected to the interface.

[0089] In the interface traffic management method provided by the present invention, for an interface that needs to be traffic managed, the interface can access one or more access parties, and for each access party that accesses and uses the interface, the traffic usage of the access party is evaluated in advance, the application priority of the access party is determined, and the QPS threshold is configured for it. In this embodiment, the access party can be understood as an entity that interacts with the system through an interface. The entity can be an application, service, user or other system component. The access party calls the functions or services provided by the system through the interface to achieve specific business needs.

[0090] The application priority is used to indicate the relative importance or urgency of different access parties when using interface resources. When interface resources are limited or facing high concurrent requests, resources can be allocated reasonably and orderly based on the application priority setting to ensure that high-priority access parties can obtain more priority and more stable service guarantees. By setting application priorities, low-priority requests can be limited, queued, or downgraded when necessary to ensure the stability and reliability of the overall service.

[0091] It should be understood that the application priority is not static and can be dynamically adjusted based on information such as the actual traffic usage of the access party, business scenario requirements, the activity of the access party, and the frequency of interface usage.

[0092] The QPS threshold configured for the access party is used to limit the maximum number of requests that the access party can send to the interface within a set time period. The setting of the QPS threshold can be determined based on in-depth analysis and prediction of the access party's traffic usage, reducing the risk of interface congestion, performance degradation, and even service collapse caused by excessive use of a single access party.

[0093] Regarding the evaluation of traffic usage for each access party, when the access party is a new access party, that is, the access party has not called the interface before, the access party's call scenario, the access party's application DAU (Daily Active User, number of daily active users) and call volume information can be obtained, and the access party's traffic demand can be evaluated based on the obtained information. If the access party is a historical access party, that is, the access party has accessed and used the interface in the historical period, the historical QPS data information of the access party in the historical period can be obtained, and a comprehensive evaluation can be performed based on the call scenario, the access party's application DAU and the call volume information when the access party accesses the interface this time.

[0094] Based on the application priorities of multiple access parties included in the interface and the QPS threshold configured for each access party, refer to Figure 1 A flowchart schematically shows an interface traffic management method according to an embodiment of the present invention. The interface traffic management method provided by the present invention may at least include the following steps:

[0095] S101, in response to a call frequency of at least one access party to an interface exceeding a query rate per second (QPS) threshold of the access party, obtaining a sum of QPS thresholds of multiple access parties included in the interface;

[0096] The call frequency indicates the number of times the access party initiates requests to the interface within a specific time period, such as per second. A high call frequency means that the access party frequently accesses the interface. The call frequency can be determined by analyzing log records or using real-time stream processing technologies such as Apache Kafka, Apache Flink, etc.; wherein, log records are used to store each call of each access party to the interface, and may include the access party's identifier (such as IP address, API key, etc.), call timestamp, request type and other information. In order to distinguish different access parties, log records can be maintained for each access party separately. When determining the call frequency of the access party, a time window such as 1 second can be defined. Within the time window, the number of requests of the access party can be counted by traversing log records or using real-time stream processing technology, so as to obtain the QPS value (i.e., call frequency) of the access party within the time window.

[0097] The QPS threshold of the access party is used to indicate the maximum request rate allowed for the access party (such as a service or client) accessing the interface, that is, the maximum number of requests allowed per second. It is used to limit the number of requests from the access party to prevent a certain access party from occupying too many resources and affecting the stable operation of other access parties or the entire interface. It is pre-configured by evaluating the access party's traffic usage.

[0098] The actual interface call situation and business needs of the access party are not static. In order to make full use of the interface traffic resources, reduce the invalid occupation of the interface traffic, and optimize resource utilization, the QPS threshold for each access party can be reconfigured regularly according to the interface traffic usage of each access party in the previous historical period. In this way, the QPS threshold of each access party can be dynamically and flexibly adjusted according to factors such as the actual traffic demand of the access party, business growth trend, and system load capacity, thereby reducing the occurrence of idle or overloaded interface resources.

[0099] The interface can serve one or more access parties, and the sum of the QPS thresholds represents the sum of the QPS thresholds configured for all access parties of the interface, reflecting the QPS allocated to each access party by the interface, and the additional request pressure that the interface can withstand without exceeding the QPS threshold of each access party, i.e., the remaining available QPS. The QPS threshold can retrieve the QPS threshold of each access party of the interface from a configuration storage such as a database, a configuration file, etc., and add the QPS thresholds of each access party of the interface to obtain the sum of the QPS thresholds.

[0100] For example, interface F includes access parties A1, A2, A3, A4, and A5. See Table 1 below for an exemplary QPS threshold and application priority of each access party included in interface F, where the application priority decreases step by step from P1 to P4:

[0101] Access Party QPS Threshold Application Priority A1 500 P1 A2 200 P3 A3 300 P2 A4 300 P2 A5 50 P4

[0102] When the calling frequency of any access party such as A2 on interface F exceeds the QPS threshold 200 of A2, the QPS thresholds of access parties A1-A5 are summed to obtain the sum of the QPS thresholds of multiple access parties included in the interface.

[0103] Regarding the access party's call frequency to the interface exceeding the access party's query rate per second QPS threshold, the access party's call frequency may have a temporary surge due to incidental events such as network fluctuations, user misoperation, etc., and this type of temporary surge cannot be used to characterize that the access party's actual QPS demand is greater than the QPS threshold. Therefore, it is possible to continuously obtain multiple call frequencies of the access party with a unit time as the frequency within a set time period, and calculate statistical indicators based on the multiple call frequencies, and confirm whether the access party exceeds the QPS threshold based on the calculated statistical indicators and the set QPS threshold. Among them, the statistical indicators may include the average value, standard deviation, the proportion of the number of call frequencies exceeding the QPS threshold in the multiple call frequencies obtained, etc.

[0104] S102, when the sum of the QPS thresholds is less than the total QPS limit of the interface, determining the QPS increment of the access party according to the application priority and the QPS threshold of the access party exceeding the QPS threshold;

[0105] The total QPS limit of an interface indicates the maximum number of requests that the interface can process per unit time, which determines the concurrent processing capacity and service stability of the interface. It can be set based on the overall usage of the total QPS of the interface in the historical period and the processing capacity of the interface itself. When the number of requests to the interface exceeds the total QPS limit, it may cause the interface performance to degrade, the response time to increase, or even the service to be interrupted.

[0106] The sum of the QPS thresholds of all access parties of the interface is less than the maximum QPS of the interface, indicating that under the current QPS threshold configuration of each access party, the total number of requests from all access parties will not exceed the maximum processing capacity of the interface, and the interface has remaining request processing capacity, that is, the remaining available QPS. In this case, under the premise of not exceeding the maximum load capacity of the interface, the QPS threshold of the access party that exceeds the QPS threshold can be appropriately adjusted to optimize the request processing of the access party.

[0107] The QPS increment is used to indicate the QPS threshold and the additional QPS quota allowed for access parties that exceed the QPS threshold. It is used to allow some access parties to temporarily increase the request volume during peak hours or under special circumstances without exceeding the maximum load capacity of the interface.

[0108] In this embodiment, based on the application priority set for the access party, in the case of limited resources, in order to ensure that the high-priority access party can obtain better service request processing services, for the access party exceeding the QPS threshold, the QPS increment of the access party can be determined in turn according to the QPS threshold of each access party in the order of the application priority of each access party exceeding the QPS threshold. For example, still taking the access parties shown in Table 1 as an example, when both access parties A1 and A2 exceed their QPS thresholds, based on the priority P1 of access party A1 being higher than the priority P3 of access party A2, the QPS increment of access party A1 is calculated first, and the remaining available QPS of the interface is updated according to the determined QPS increment, and then the QPS increment of access party A2 is calculated.

[0109] The QPS increment can be determined based on the QPS threshold currently configured by the access party and the call frequency when the access party exceeds the QPS threshold. For example, a correspondence between the QPS increment and the excess difference can be set, and the corresponding QPS increment is matched from the correspondence based on the call frequency when the access party exceeds the QPS threshold and the excess difference of the QPS threshold, and the QPS increment satisfies the remaining available QPS amount of the interface.

[0110] Alternatively, the QPS increment may also be determined according to the QPS threshold currently configured by the access party and the set adjustment ratio, as described in the subsequent embodiments for details.

[0111] In the case where the sum of the QPS thresholds is greater than or equal to the total QPS limit, since the interface has reached its maximum load capacity at this time and there is no additional QPS margin for the access party to adjust the temporary QPS threshold, in order to maintain the stable operation of the interface, the token bucket algorithm, leaky bucket algorithm and other current limiting methods can be used to limit the interface calls of each access party that exceeds the QPS threshold to be kept within the respective QPS threshold range, and generate a current limiting alarm. Among them, the current limiting alarm is used to provide a report on the interface reaching the total QPS threshold to the traffic management personnel, so as to instruct the traffic management personnel to adjust the total QPS limit of the interface or manually adjust the QPS threshold of each access party.

[0112] S103: In accordance with the application priority order of the access parties exceeding the QPS threshold, increase the QPS threshold of the access parties exceeding the QPS threshold according to the QPS increment.

[0113] That is, according to the application priorities of multiple access parties, in order from high priority to low priority, the QPS amount represented by the QPS adjustment can be increased on the basis of the QPS threshold currently configured by each access party to obtain an updated QPS threshold.

[0114] Taking the aforementioned access party A1 as an example, assuming that the QPS increment of the access party A1 is determined to be 50, the adjusted QPS threshold of the access party A1 is the sum of the currently configured QPS threshold 500 and the QPS increment 50, that is, the adjusted QPS threshold of the access party A1 is 550. When the access parties A1, A2, and A3 all exceed their respective QPS thresholds, the QPS thresholds of the access parties are adjusted in the order of A1, A3, and A2.

[0115] This step can be calculated in parallel with the aforementioned step S102, that is, based on step S102, the QPS increment of each access party can be determined according to the application priority order of each access party that exceeds the QPS threshold. Then, after the QPS increment of any access party is determined, the QPS threshold of the access party can be increased, and at the same time, the QPS increments of other access parties that exceed the QPS threshold can be calculated in parallel. Still taking the case where access parties A1, A2, and A3 all exceed their respective QPS thresholds as an example, step S102 can determine the QPS increments of the access parties in the order of access parties A1, A3, and A2. When the QPS increment of access party A1 is determined, the QPS threshold of access party A1 can be adjusted, and at the same time, the QPS increments of access parties A3 and A2 can be calculated.

[0116] In the disclosed embodiment, this embodiment proposes a method for automatically and dynamically adjusting the QPS threshold of the access party, avoiding the delay of manual intervention, and being able to cope with the situation of sudden changes in interface traffic, thereby improving the response speed and flexibility of the system and improving the operation and maintenance efficiency. This method predetermines the application priority and configures the QPS threshold for each access party. When the call frequency of the access party exceeds its QPS threshold, if the total QPS limit of the interface is not reached, its QPS threshold is dynamically adjusted according to the application priority of the access party that exceeds the threshold, thereby reducing the situation where the access party's call request is rejected due to current limiting, ensuring that high-priority applications can obtain more interface traffic when traffic bursts, thereby giving priority to the normal operation of key services and improving user experience and business continuity.

[0117] In some embodiments, regarding the determination of the QPS increment of the access party as described in step S102 in the aforementioned embodiment, the adjustment ratio determined based on this embodiment is used to determine the final QPS increment in combination with the QPS threshold of the access party. Based on the natural differences between the QPS thresholds of access parties with different application priorities, in order to simplify resource allocation strategies and reduce management complexity, while ensuring that applications of different priorities have a certain degree of fairness in resource allocation, this embodiment provides another method for determining the QPS increment based on a fixed adjustment ratio. In this method, each application priority corresponds to the same adjustment ratio, and the QPS increment of the access party is determined based on the same ratio combined with the QPS threshold currently configured by the access party that exceeds the QPS threshold.

[0118] In this embodiment, the QPS increment determination can be implemented through the following steps: obtaining a fixed adjustment ratio; determining the QPS increment of the access party according to the QPS threshold of the access party that exceeds the QPS threshold and the obtained adjustment ratio.

[0119] For example, a fixed adjustment ratio is pre-set to 5%, and the QPS increment of the access party can be determined based on the product of the QPS threshold of the access party and the adjustment ratio. In order to ensure that the adjustment of the QPS threshold does not exceed the total QPS limit of the interface, after obtaining the product of the QPS threshold and the adjustment ratio, the product can be compared with the current remaining available QPS of the interface, and the smaller value can be taken as the QPS increment. Alternatively, in order to prevent the access party from occupying too many traffic resources, a QPS quota upper limit can also be set, so that after obtaining the product, the product, the current remaining available QPS of the interface, and the QPS quota upper limit can be compared to determine the minimum value as the QPS increment.

[0120] In the disclosed embodiment, the QPS adjustment value of the access party can be determined in a simpler and more direct manner through a fixed ratio, reducing management complexity and uncertainty. At the same time, since all application priorities correspond to the same adjustment ratio, a certain fairness in resource allocation is ensured.

[0121] In some embodiments, regarding the determination of the QPS increment of the access party described in the aforementioned step S102, based on the consideration of the differences in the requirements of different application priorities, in order to more reasonably allocate the QPS adjustment amount, this embodiment provides a QPS increment determination method based on application priority, and pre-sets an adjustment ratio that matches the application priority for different application priorities. The adjustment ratios corresponding to different application priorities can be the same, and the adjustment ratio can also be positively correlated with the application priority, that is, the higher the application priority, the larger the corresponding adjustment ratio. In this embodiment, the QPS increment of the access party that exceeds the QPS threshold can be determined in the following manner:

[0122] According to the correspondence between the priority and the adjustment ratio, the adjustment ratio of the application priority of the access party that matches the QPS threshold is obtained; according to the QPS threshold of the access party that exceeds the QPS threshold and the obtained adjustment ratio, the QPS increment of the access party is determined.

[0123] For example, see the following Table 2 which shows an example of a corresponding relationship between application priority and adjustment ratio:

[0124] Priority P1 P2 P3 P4 Adjust the scale 10% 8% 5% 5%

[0125] Taking the example of access party A1 exceeding the QPS threshold in the above Table 1, a matching adjustment ratio of 10% is determined from the corresponding relationship based on the application priority P1 of access party A1, and the QPS increment of access party A1 is determined based on the QPS threshold 500 currently configured by access party A1 and the matching adjustment ratio 10%.

[0126] Regarding determining the QPS increment based on the QPS threshold and the obtained adjustment ratio, the product of the QPS threshold and the adjustment ratio can be first obtained, and then the product can be compared with the current remaining available QPS of the interface, and the smaller value can be taken as the QPS increment. Alternatively, in order to prevent the access party from occupying too many traffic resources, a QPS quota upper limit can also be set, so that after obtaining the product, the product, the current remaining available QPS of the interface, and the QPS quota upper limit can be compared to determine the minimum value as the QPS increment.

[0127] In the disclosed embodiment, by pre-setting the adjustment ratio that matches the application priority for different application priorities, it is possible to achieve a balance of resources between applications of different priorities, so as to more reasonably allocate the QPS adjustment quota, and automatically determine the QPS increment according to the application priority of the access party, without manual intervention, thereby reducing operation and maintenance costs and improving operation and maintenance efficiency. At the same time, high-priority applications such as high-reliability services can obtain more sufficient traffic support on a priority basis, ensuring that there will be no service interruption or performance degradation when facing high concurrent requests, thereby enhancing business continuity.

[0128] In some embodiments, in order to allow the access party to temporarily exceed the QPS threshold within the total QPS limit of the interface, for the QPS threshold of the access party exceeding the QPS threshold and the obtained adjustment ratio recorded in the above-mentioned embodiment, the QPS increment of the access party is determined. This embodiment provides a method for determining the remaining available amount of the QPS of the interface in real time monitoring, see Figure 2 The process diagram shown in the figure can be realized by the following methods:

[0129] S201, obtaining a product of the QPS threshold of the access party exceeding the QPS threshold and the adjustment ratio as a candidate adjustment value;

[0130] That is, when the adjustment ratio is obtained, the adjustment ratio is multiplied by the QPS threshold of the access party to obtain the product of the two, which represents the potential QPS increment calculated based on the current QPS threshold of the access party and the preset adjustment ratio.

[0131] Since the product is a theoretical incremental value and does not take into account the actual current carrying capacity and remaining resources of the interface, in order to ensure the stability and sustainability of the interface, the product is compared with the current remaining available QPS of the interface. The remaining available QPS of the interface refers to the maximum number of requests that the interface can withstand at the current moment, reflecting the difference between the total QPS limit of the interface and the currently occupied QPS.

[0132] S202: if the candidate adjustment value is greater than the QPS difference, determine the QPS difference as the QPS increment; wherein the QPS difference represents the remaining available QPS of the interface;

[0133] If the candidate adjustment value is greater than the remaining available QPS, it indicates that the interface exceeds the carrying range. At this time, the candidate adjustment value needs to be limited to prevent the access party from over-occupying resources. In this case, the remaining available QPS can be used as the QPS adjustment value of the access party to ensure that its request amount does not exceed the total QPS limit of the interface.

[0134] S203: When the candidate adjustment value is less than or equal to the QPS difference, determine the candidate adjustment value as the QPS increment.

[0135] If the candidate adjustment value is less than or equal to the remaining available QPS, the candidate adjustment value can be used as the QPS adjustment value of the access party, allowing it to make requests within the configured QPS threshold and the increment range. This allows the access party to obtain more resource support when facing traffic bursts, while not causing too much impact on the overall stability of the system.

[0136] Meanwhile, after the QPS increment is determined, a portion of the remaining available QPS representing the interface is allocated to the access party, and therefore, the remaining available QPS of the interface needs to be updated according to the determined QPS increment.

[0137] In the embodiment of the present disclosure, a candidate adjustment value is calculated based on the QPS threshold of the access party that exceeds the QPS threshold and a preset adjustment ratio, and the remaining available QPS of the interface is monitored in real time. The candidate adjustment value is corrected using the remaining available QPS to obtain the QPS increment of the access party, thereby making it possible to make temporary QPS adjustments to the access party that exceeds the QPS threshold within the total QPS limit of the interface, thereby ensuring the availability and response speed of the access party's service.

[0138] In some embodiments, in order to allow the access party to temporarily exceed the QPS threshold within a certain adjustment upper limit within the total QPS limit of the interface, the QPS increment of the access party is determined based on the QPS threshold of the access party that exceeds the QPS threshold and the obtained adjustment ratio as recorded in the aforementioned embodiments. After obtaining the product of the QPS threshold of the access party that exceeds the QPS threshold and the adjustment ratio as a candidate adjustment value in the above step S201, the candidate adjustment value, the QPS difference and the preset single adjustment QPS limit upper limit can also be compared to determine the minimum value as the QPS enhancement of the access party, thereby avoiding any access party from occupying too many adjustment resources.

[0139] For example, assuming that the calculated candidate adjustment value is 60, the set QPS quota upper limit is 50, and the QPS difference is 100, the QPS increment of the access party can be determined as 50.

[0140] In some embodiments, under the premise of ensuring system stability and reasonable allocation of resources, in order to flexibly respond to traffic changes, the access party is allowed to temporarily exceed its preset QPS threshold within a certain call upper limit and a certain time range. This embodiment provides a more sophisticated QPS threshold adjustment control mechanism. By limiting the adjustment number threshold and the total adjustment amount threshold within a set period, it ensures that the interface traffic is fairly and reasonably distributed among multiple access parties, preventing the access party from increasing the QPS threshold without limit, thereby optimizing resource allocation, controlling costs, and effectively avoiding the risk of system overload and crash, while also preventing some access parties from excessively occupying resources and causing adverse effects on other access parties.

[0141] In this embodiment, for the step S102 in the above embodiment, the QPS increment of the access party is determined according to the application priority and the QPS threshold of the access party that exceeds the QPS threshold, such as Figure 3 The exemplary step flow chart shows that the QPS increment of the access party can be determined in the following manner in this embodiment:

[0142] S301, for each access party that exceeds the QPS threshold, obtain the number of times the QPS threshold of the access party is expanded and the total adjustment value within a set time range; the total adjustment value is used to represent the QPS amount increased by the QPS threshold within the set time range;

[0143] The set time range can be flexibly adjusted according to actual conditions. For example, the interface management regularly reconfigures the QPS threshold of each access party of the interface in a 24-hour cycle. The set time range can be set to 24 hours, that is, the set time range can be set to the complete time range or part of the time range after the time point when the interface management last reconfigured the QPS threshold of each access party of the interface to the current system time. Among them, the interface management is the interface server or the platform where it is located, or a traffic management device that can communicate with the interface server or the platform where it is located.

[0144] For example, the interface management collects historical QPS data at 0:00 am every day and uniformly reconfigures the QPS threshold of each access party of the interface. Assuming that the current system time is 2024 / 12 / 112:35, you can set 2024 / 12 / 1 0:00 to 12:35 as the set time range, and detect the number of times the QPS threshold of the access party is expanded and the total adjustment value within the set time range. Alternatively, you can also set 2024 / 12 / 1 6:00 to 12:35 as the set time range, and detect the number of times the QPS threshold of the access party is expanded and the total adjustment value within the set time range.

[0145] When an access party exceeds its QPS threshold, a number threshold and a total amount threshold are pre-set for the number of times the QPS threshold of the access party is expanded and the total adjustment value within a set time range, wherein the set number threshold and / or total amount threshold corresponds to the application priority of the access party. That is, in order to enable a high-priority access party to be allocated more sufficient interface resources when the QPS threshold is exceeded to ensure the service continuity of important services, this embodiment sets the number threshold and / or total amount threshold according to the priority, so that the high-priority access party can obtain more adjustment times and / or a higher total amount of QPS adjustment.

[0146] After obtaining the number of times the QPS threshold of the access party is expanded and the total adjustment value within the set time range, you can first check whether the total adjustment value is less than the total quota threshold:

[0147] If the total adjustment value is greater than or equal to the total amount threshold, execute step S303;

[0148] When the total adjustment value is less than the total quota threshold, further check whether the number of times the QPS threshold is expanded is less than the set number threshold:

[0149] When the number of times the QPS threshold is expanded is less than the set number threshold, that is, the total adjustment value is less than the total amount threshold and the number of times is less than the set number threshold, step S302 can be executed.

[0150] When the number of times the QPS threshold is expanded is greater than or equal to the set number threshold, step S303 is executed.

[0151] S302, when the number of times is less than the set number threshold and the total adjustment value is less than the total quota threshold, determine the QPS increment of the access party;

[0152] S303, when the number is greater than or equal to the set number threshold, or the total adjustment value is greater than or equal to the total quota threshold, the interface calls of each access party that triggers the current limiting are restricted to be within their respective QPS threshold ranges, and a current limiting alarm is generated; the current limiting alarm is used to prompt the adjustment of the total QPS limit of the interface.

[0153] In the embodiment of the present disclosure, by limiting the number of adjustments and the amount of adjustments to the QPS threshold within a set time period, it is ensured that resources are reasonably allocated among multiple access parties, and it is prevented that the QPS threshold is increased indefinitely when the number of access party requests surges until the entire remaining QPS available amount of the interface is occupied. This optimizes resource allocation and cost control, avoids the risk of system overload and crash, and avoids the risk of some access parties over-occupying resources and causing other access parties to be affected, and allows multiple access parties to temporarily exceed the preset threshold within a certain call upper limit and a certain time.

[0154] In some embodiments, if there are multiple access parties triggering interface current limiting at the same time, it can reflect that the current total QPS limit setting of the interface is unreasonable and cannot fully meet the needs of business peak periods. In order to improve the efficiency of interface traffic management and avoid unnecessary and invalid QPS threshold adjustment attempts, this embodiment provides an intelligent processing strategy for two different triggering modes, namely, sequential triggering current limiting and simultaneous triggering current limiting. This method determines the triggering mode through the timestamp information of the current limiting triggered by multiple access parties, so as to perform different QPS threshold management for different triggering modes.

[0155] See also Figure 4 An exemplary processing flow chart of triggering current limiting for multiple access parties is shown, and the method may include the following steps:

[0156] S401, when at least two access parties trigger current limiting, obtaining timestamp information of each access party triggering current limiting; the triggering of current limiting means that the access party's call frequency on the interface exceeds the QPS threshold of the access party;

[0157] The timestamp information is used to indicate the specific time point when the access party triggers the current limiting time, and can be expressed in a standardized event format, such as ISO 8601 format or UNIX timestamp. Regarding the timestamp information, the timestamp information of each access party triggering the current limiting can be collected from the system log or monitoring tool.

[0158] S402, determining the triggering mode of each access party that triggers the current limiting according to the timestamp information of each access party that triggers the current limiting;

[0159] By analyzing the timestamp information of the access parties, it can be determined whether the access parties that trigger the current limiting occur successively (ie, are triggered one after another) or almost simultaneously (ie, are triggered at a similar time point).

[0160] In this embodiment, the time interval between two adjacent triggering flow limiting events can be calculated, and the calculation of the time interval can be accurate to seconds, milliseconds or even smaller units, depending on the time accuracy requirements of the system; then, a time threshold for judging "simultaneous triggering" is set according to business requirements and system processing capabilities. The time threshold can capture triggering flow limiting events that occur almost simultaneously, while trying to avoid misjudgments caused by system time jitter or network delays; if the time interval between two adjacent triggering flow limiting events is greater than the set threshold, it is considered that the access party belongs to the successive triggering flow limiting; and if there are multiple access parties triggering flow limiting events within the set time window (i.e., within the threshold range), it is considered that these access parties are simultaneously triggered flow limiting.

[0161] S403, when it is determined that each access party that triggers the current limiting triggers the current limiting successively, or triggers the current limiting simultaneously and the number of access parties that trigger the current limiting simultaneously does not exceed the threshold, obtain the sum of the QPS thresholds of the multiple access parties included in the interface;

[0162] That is, in the case where multiple access parties trigger current limiting successively, or multiple access parties that do not exceed the threshold trigger current limiting at the same time, the problem of their call frequency exceeding the QPS threshold is alleviated by adjusting the QPS threshold of each access party that triggers the current limiting separately, so as to ensure the access party's use of the interface.

[0163] S404, when it is determined that the various access parties that trigger the current limiting belong to the simultaneous triggering of the current limiting and the number of the simultaneously triggered access parties is greater than the threshold, the interface calls of the various access parties that trigger the current limiting are restricted to remain within their respective QPS threshold ranges, and a current limiting alarm is generated; the current limiting alarm is used to prompt the adjustment of the total QPS limit of the interface.

[0164] When it is determined that the access parties that trigger the flow limit are simultaneously triggered, and the number of access parties triggered at the same time exceeds the preset threshold, it means that the total QPS limit of the current interface can no longer meet the needs of the current business traffic, or the interface resources have approached or reached the limit of their processing capacity. The total QPS limit of the interface needs to be adjusted to cope with this high concurrency scenario and protect the stability and availability of the interface.

[0165] Limit the interface calls of each access party that triggers the flow limit to remain within their respective QPS thresholds, thereby preventing the traffic of a single access party from continuing to increase and avoiding greater pressure on the entire system. At the same time, a flow limit alarm is generated to notify the system administrator or operation and maintenance personnel that the current interface has experienced serious traffic pressure and that measures need to be taken as soon as possible to make adjustments. The alarm information of the flow limit alarm may include information about the access party that triggered the flow limit, the trigger time, the trigger method (simultaneous triggering), and the number of access parties that were triggered simultaneously, so that the administrator or operation and maintenance personnel can quickly understand the problem and consider adjusting the total QPS limit of the interface based on actual conditions and business needs, such as increasing the processing power of the server, optimizing the implementation logic of the interface, and adjusting the allocation strategy of the QPS threshold.

[0166] In the embodiment of the present disclosure, in the case where multiple access parties trigger current limiting, the triggering methods of the multiple access parties are analyzed to determine whether the triggering of current limiting is caused by the total QPS limit of the interface being too small, thereby generating a current limiting alarm to adjust the total QPS limit of the interface, thereby solving the problem of triggering current limiting from the root, avoiding ineffective adjustment of the QPS threshold of the access party, thereby improving traffic management efficiency, and improving the throughput and response speed of the system.

[0167] In some embodiments, based on the fact that the call of the access party to the interface will change dynamically according to the actual business needs, in order to optimize the QPS allocation of the interface and improve the interface resource utilization, the QPS threshold of each access party of the interface can be uniformly configured according to the activity and usage frequency of the access party. For example, if an access party does not call the interface for a long time, you can consider optimizing its resource allocation, such as lowering its QPS threshold or reclaiming its unused resources.

[0168] Based on this, this embodiment provides a method for regularly and uniformly configuring the QPS threshold of each access party of the interface, such as Figure 5 As shown, the aforementioned method may further include a step of regularly updating the QPS thresholds of multiple access parties included in the regularly updated interface:

[0169] S501, for multiple access parties included in the interface, regularly obtain QPS data fluctuation information of the access parties calling the interface before the timing and within a set historical period;

[0170] The QPS data fluctuation information is used to indicate the QPS data and its changing trend generated by the access party calling the interface within a set historical period. From the QPS data fluctuation information, you can obtain information such as the highest QPS, lowest QPS, average QPS, QPS fluctuation range, and QPS change trends and rules.

[0171] You can set a timer to perform a task of re-evaluating the QPS threshold for all access parties of the interface at regular intervals (such as daily, weekly, or monthly). When executing this task, query and collect the QPS data of each access party calling the interface in the past set historical period (such as the past week or month) to evaluate the access party's traffic demand and fluctuation.

[0172] S502, calculating a new QPS threshold re-evaluated for the access party according to the QPS data fluctuation information of the access party and the QPS threshold newly configured by the access party; wherein the sum of the new QPS thresholds of the multiple access parties included in the interface is less than the total QPS limit of the interface;

[0173] The most recently configured QPS threshold of the access point is the QPS threshold currently used to detect whether the access point triggers current limiting. For example, it is set to re-evaluate and determine the QPS threshold of all access points of the interface at 0:00 every day. Assuming that after the access point A self-determines the QPS threshold, it exceeds its preset QPS threshold and has undergone two QPS threshold increases, then the most recently configured QPS threshold is the QPS threshold after the two QPS threshold increases.

[0174] Based on the collected QPS data fluctuation information, analyze the traffic demand and traffic pattern of each access party, combine the currently configured QPS threshold of each access party and the total QPS limit of the interface, re-evaluate and calculate the new QPS threshold of each access party. The new QPS threshold can meet the traffic demand of the access party without causing the total QPS of the interface to exceed the limit.

[0175] For example, for an access party that has not called an interface in the past month, its QPS threshold can be configured to the default minimum value to retain its access to the interface. At the same time, it can reasonably allocate and recycle underutilized resources without sacrificing the overall performance of the system, so as to achieve the purpose of resource conservation and avoid resource waste.

[0176] S503: Reset the latest configured QPS threshold of the access party by using the re-evaluated new QPS threshold.

[0177] After calculating the new QPS threshold, the new QPS threshold of each access party is updated to the corresponding configuration of the access party to replace the QPS threshold currently configured by the access party, so that when the access party calls the interface again, it is detected whether the access party triggers current limiting according to the new QPS threshold.

[0178] In the embodiment of the present disclosure, by regularly evaluating the QPS data fluctuation information of the access party, the actual traffic demand and change trend of each access party can be accurately understood, and the QPS threshold for each access party can be reallocated based on the dynamic information. For access parties that have not made interface calls for a long time, their QPS threshold can be lowered or their unused resources can be recovered, thereby freeing up resources for other more active access parties to use, thereby achieving more precise control of resource usage, avoiding unnecessary waste of resources, and ensuring that interface resources are used more reasonably and efficiently.

[0179] In some embodiments, in order to manage the QPS threshold configuration of the interface more flexibly and efficiently, especially to cope with the dynamic access requirements of the new access party, this embodiment provides a QPS threshold configuration method for the new access party. When it is detected that a new access party requests to access the interface, Figure 6 As shown, the calling scenario, the number of daily active users of the application and the calling level of the new access party can be obtained first; then, based on the calling scenario, the number of daily active users of the application and the calling level, the application priority of the new access party can be determined, and a QPS threshold can be set; the QPS threshold is positively correlated with the application priority of the new access party.

[0180] Among them, the calling scenario, number of daily active users of the application and calling volume of the new access party can be interactively input on the configuration interface of the request to access the interface.

[0181] The call scenario represents the specific environment or business in which the new access party uses the interface. For example, a high-concurrency transaction scenario may require the interface to have characteristics such as fast response, high-concurrency processing capabilities, and data consistency.

[0182] The number of daily active users of an application indicates the number of users who have logged in or used an application on a statistical day. It can measure the activity and participation of application users, and reflects the user base and activity of the application in the current time period. For new access parties, the number of DAUs of their applications can be used as an important basis for evaluating their business scale and user needs. The larger the number of DAUs, the broader the user base of the new access party, and the higher the demand for interface resources may be. Therefore, when configuring the QPS threshold, you need to fully consider the number of DAUs of the new access party to ensure that the interface can carry its business needs.

[0183] The call level is used to indicate the number or frequency of requests that a new access party is expected to send to an interface, reflecting the potential demand and pressure of the new access party on interface resources. In actual operation, the call level can be analyzed in combination with the business needs and historical data of the new access party.

[0184] By analyzing the call scenarios, the number of daily active users of the application, the call volume and other data, we can more accurately understand the demand for interfaces and the scale of use of new access parties, so as to determine the application priority of new access parties. Then, according to the application priority, we can set a QPS threshold that is positively correlated with the application priority for the new access party, so that high-priority access parties can be initially configured with relatively more interface resources, ensuring that they can use interface resources smoothly and efficiently to meet the actual needs of their business development.

[0185] In some embodiments, for the access party that has accessed the interface, in order to further optimize the utilization efficiency of the interface resources and ensure the reasonable allocation and effective utilization of resources, the present embodiment provides an access management mechanism. By continuously monitoring the activity of the access party and based on the principle of dynamic adjustment of resources, when it is detected that any access party has not called the interface within a set time period (such as one month or more), the access party clearing process can be automatically triggered, that is, any access party will be cleared from the access party record of the interface, and the QPS threshold allocated to the any access party will be recovered.

[0186] The cleared access party will no longer be an access party of the interface. When the access party wants to call the interface, it needs to re-initiate a request to access the interface, such as providing necessary authentication information, configuration parameters, etc. to re-evaluate the QPS threshold and application priority of the access party.

[0187] The above access management mechanism can be automatically implemented by configuring a clearing policy, which can record the activity time of each access party's last call to the interface and regularly check the timestamp of the activity time. If the access party has no activity record within the specified time, it will be regarded as inactive and cleared from the access party.

[0188] In the embodiment of the present disclosure, by timely clearing out long-term inactive access parties, resources that are occupied but not effectively utilized are released so that the released resources can be reallocated to other active access parties, thereby reducing unnecessary access party records and resource allocations and improving overall resource utilization efficiency.

[0189] Exemplary Devices

[0190] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 7 A device according to an exemplary embodiment of the present invention is described.

[0191] The implementation process of the functions and effects of each module in the following device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here. For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to the partial description of the method embodiment.

[0192] Figure 7 An interface traffic management device according to an embodiment of the present invention is schematically shown, wherein the interface includes multiple access parties, and an application priority is predetermined for each access party and a QPS threshold is configured; the device includes:

[0193] The trigger detection module 701 is used to obtain the sum of the QPS thresholds of multiple access parties included in the interface in response to the call frequency of at least one access party to the interface exceeding the query rate per second QPS threshold of the access party;

[0194] An increment determination module 702, configured to determine a QPS increment of an access party that exceeds the QPS threshold according to an application priority and a QPS threshold of the access party when the sum of the QPS thresholds is less than the total QPS limit of the interface;

[0195] The threshold adjustment module 703 is configured to increase the QPS threshold of the access party exceeding the QPS threshold according to the QPS increment in order of application priority of the access party exceeding the QPS threshold.

[0196] In some embodiments, the increment determination module is specifically used to:

[0197] According to the correspondence between the priority and the adjustment ratio, the adjustment ratio of the application priority of the access party matching the access party exceeding the QPS threshold is obtained;

[0198] The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

[0199] In some embodiments, the increment determination module is specifically used to:

[0200] Get a fixed adjustment ratio;

[0201] The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

[0202] In some embodiments, the increment determination module, when used to determine the QPS increment of the access party according to the QPS threshold of the access party exceeding the QPS threshold and the obtained adjustment ratio, includes:

[0203] Acquire a product of the QPS threshold of the access party exceeding the QPS threshold and the adjustment ratio as a candidate adjustment value;

[0204] In the case where the candidate adjustment value is greater than the QPS difference, determining the QPS difference as the QPS increment; wherein the QPS difference represents the remaining available amount of QPS of the interface;

[0205] In a case where the candidate adjustment value is less than or equal to the QPS difference, the candidate adjustment value is determined as the QPS increment.

[0206] In some embodiments, the increment determination module is specifically used to:

[0207] For each access party that exceeds the QPS threshold, obtain the number of times the QPS threshold of the access party is expanded and the total adjustment value within a set time range;

[0208] When the number is less than a set number threshold and the total adjustment value is less than a total quota threshold, the QPS increment of the access party is determined; wherein the set number threshold and / or the total quota threshold corresponds to the application priority of the access party.

[0209] In some embodiments, the apparatus further comprises:

[0210] In the case where at least two access parties trigger current limiting, obtaining timestamp information of each access party triggering current limiting; the triggering of current limiting means that the access party's call frequency on the interface exceeds the QPS threshold of the access party;

[0211] According to the timestamp information of each access party that triggers the current limiting, when it is determined that the access parties that trigger the current limiting are successively triggered current limiting, or are simultaneously triggered current limiting and the number of access parties that are triggered simultaneously does not exceed the threshold, the sum of the QPS thresholds of the multiple access parties included in the interface is obtained;

[0212] When it is determined that the various access parties that trigger the current limiting are simultaneously triggered and the number of access parties triggered simultaneously is greater than the threshold, the interface calls of the various access parties that trigger the current limiting are restricted to remain within their respective QPS threshold ranges, and a current limiting alarm is generated; the current limiting alarm is used to prompt adjustment of the total QPS limit of the interface.

[0213] In some embodiments, the apparatus further comprises:

[0214] For multiple access parties included in the interface, regularly obtain QPS data fluctuation information of the access parties calling the interface before the timing and within a set historical period;

[0215] Calculate a new QPS threshold re-evaluated for the access party according to the QPS data fluctuation information of the access party and the QPS threshold newly configured by the access party; wherein the sum of the new QPS thresholds of the multiple access parties included in the interface is less than the total QPS limit of the interface;

[0216] The newly configured QPS threshold of the access party is reset using the re-evaluated new QPS threshold.

[0217] In some embodiments, the apparatus further comprises:

[0218] When a new access party is detected to request access to the interface, obtaining the calling scenario, number of daily active users of the application, and calling magnitude of the new access party;

[0219] According to the calling scenario, the number of daily active users of the application and the calling level, the application priority of the new access party is determined, and a QPS threshold is set; the QPS threshold is positively correlated with the application priority of the new access party.

[0220] Exemplary Media

[0221] After introducing the method and apparatus of the exemplary embodiment of the present invention, next, reference is made to Figure 8 A readable storage medium according to an exemplary embodiment of the present invention is described.

[0222] In this exemplary embodiment, the above method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device.

[0223] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable 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.

[0224] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. 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. Readable signal media may also be any readable medium other than a 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.

[0225] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.

[0226] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0227] Exemplary Computing Devices

[0228] After introducing the method, apparatus and medium of the exemplary embodiments of the present invention, next, reference is made to Fig. 9 A computing device according to an exemplary embodiment of the present invention is described.

[0229] Fig. 9 The computing device 900 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.

[0230] like Fig. 9 As shown, the computing device 900 is in the form of a general computing device. The components of the computing device 900 may include but are not limited to: at least one processing unit 901, at least one storage unit 902, and a bus 903 connecting different system components (including the processing unit 901 and the storage unit 902).

[0231] The bus 903 includes a data bus, a control bus, and an address bus.

[0232] The storage unit 902 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 9021 and / or a cache memory 9022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 9023 .

[0233] The storage unit 902 may also include a program / utility 9025 having a set (at least one) of program modules 9024, such program modules 9024 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.

[0234] The computing device 900 may also communicate with one or more external devices 904 (eg, keyboards, pointing devices, etc.).

[0235] Such communication may be performed via input / output (I / O) interface 905. Furthermore, computing device 900 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) via network adapter 906. Fig. 9 As shown, the network adapter 906 communicates with other modules of the computing device 900 via the bus 903. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computing device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0236] It should be noted that although several units / modules or sub-units / modules of the interface traffic management device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules for embodiment.

[0237] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0238] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. An interface traffic management method, characterized in that: The interface includes multiple access parties, and an application priority is pre-determined and a QPS threshold is configured for each access party; the method includes: In response to at least one access party calling the interface at a frequency exceeding a query rate per second (QPS) threshold of the access party, obtaining a sum of QPS thresholds of multiple access parties included in the interface; In a case where the sum of the QPS thresholds is less than the total QPS limit of the interface, determining the QPS increment of the access party according to the application priority and the QPS threshold of the access party exceeding the QPS threshold; According to the application priority order of the access parties exceeding the QPS threshold, the QPS threshold of the access parties exceeding the QPS threshold is increased in sequence according to the QPS increment.

2. The method according to claim 1, characterized in that The determining of the QPS increment of the access party includes: According to the correspondence between the priority and the adjustment ratio, the adjustment ratio of the application priority of the access party matching the access party exceeding the QPS threshold is obtained; The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

3. The method according to claim 1, characterized in that: The determining of the QPS increment of the access party includes: Get a fixed adjustment ratio; The QPS increment of the access party that exceeds the QPS threshold is determined according to the QPS threshold of the access party and the obtained adjustment ratio.

4. The method according to claim 2 or 3, characterized in that: The determining, according to the QPS threshold of the access party exceeding the QPS threshold and the obtained adjustment ratio, a QPS increment of the access party includes: Acquire a product of the QPS threshold of the access party exceeding the QPS threshold and the adjustment ratio as a candidate adjustment value; In the case where the candidate adjustment value is greater than the QPS difference, determining the QPS difference as the QPS increment; wherein the QPS difference represents the remaining available amount of QPS of the interface; In a case where the candidate adjustment value is less than or equal to the QPS difference, the candidate adjustment value is determined as the QPS increment.

5. The method according to any one of claims 1 to 3, characterized in that: The determining, according to the application priority and the QPS threshold of the access party exceeding the QPS threshold, the QPS increment of the access party includes: For each access party that exceeds the QPS threshold, obtain the number of times the QPS threshold of the access party is expanded and the total adjustment value within a set time range; When the number is less than a set number threshold and the total adjustment value is less than a total quota threshold, the QPS increment of the access party is determined; wherein the set number threshold and / or the total quota threshold corresponds to the application priority of the access party.

6. The method according to claim 1, characterized in that The method further comprises: In the case where at least two access parties trigger current limiting, obtaining timestamp information of each access party triggering current limiting; the triggering of current limiting means that the access party's call frequency on the interface exceeds the QPS threshold of the access party; According to the timestamp information of each access party that triggers the current limiting, when it is determined that the access parties that trigger the current limiting are successively triggered current limiting, or are simultaneously triggered current limiting and the number of access parties that are triggered simultaneously does not exceed the threshold, the sum of the QPS thresholds of the multiple access parties included in the interface is obtained; When it is determined that the various access parties that trigger the current limiting are simultaneously triggered and the number of access parties triggered simultaneously is greater than the threshold, the interface calls of the various access parties that trigger the current limiting are restricted to remain within their respective QPS threshold ranges, and a current limiting alarm is generated; the current limiting alarm is used to prompt adjustment of the total QPS limit of the interface.

7. The method according to claim 1, characterized in that The method further comprises: For multiple access parties included in the interface, regularly obtain QPS data fluctuation information of the access parties calling the interface before the timing and within the set historical period; Calculate a new QPS threshold re-evaluated for the access party according to the QPS data fluctuation information of the access party and the QPS threshold newly configured by the access party; wherein the sum of the new QPS thresholds of the multiple access parties included in the interface is less than the total QPS limit of the interface; The newly configured QPS threshold of the access party is reset using the re-evaluated new QPS threshold.

8. An interface traffic management device, characterized in that: The device comprises: A trigger detection module, configured to obtain the sum of QPS thresholds of multiple access parties included in the interface in response to at least one access party's calling frequency on the interface exceeding the query rate per second (QPS) threshold of the access party; an increment determination module, configured to determine a QPS increment of an access party according to an application priority and a QPS threshold of an access party exceeding the QPS threshold when the sum of the QPS thresholds is less than a total QPS limit of the interface; The threshold adjustment module is used to increase the QPS threshold of the access party exceeding the QPS threshold according to the QPS increment in sequence according to the application priority order of the access party exceeding the QPS threshold.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computing device, characterized in that include: Processor, memory; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 by calling the computer program.