CN112583732B - Flow control method and related equipment based on control granularity pool interface call - Google Patents

Flow control method and related equipment based on control granularity pool interface call Download PDF

Info

Publication number
CN112583732B
CN112583732B CN202011415626.0A CN202011415626A CN112583732B CN 112583732 B CN112583732 B CN 112583732B CN 202011415626 A CN202011415626 A CN 202011415626A CN 112583732 B CN112583732 B CN 112583732B
Authority
CN
China
Prior art keywords
granularity
sub
flow
flow control
pool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011415626.0A
Other languages
Chinese (zh)
Other versions
CN112583732A (en
Inventor
冀曙光
戴兴邦
李珊
马新悦
任彩玲
王曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Life Insurance Co ltd
Original Assignee
China Life Insurance Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Life Insurance Co ltd filed Critical China Life Insurance Co ltd
Priority to CN202011415626.0A priority Critical patent/CN112583732B/en
Publication of CN112583732A publication Critical patent/CN112583732A/en
Application granted granted Critical
Publication of CN112583732B publication Critical patent/CN112583732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits

Abstract

One or more embodiments of the present disclosure provide a flow control method and related devices for interface call based on a control granularity pool, manage control granularity based on the granularity pool, and generate a flow control policy by selecting a relation between control granularity and set granularity in the granularity pool, so as to implement fine granularity flow control for interface call. The particle size pool can freely and flexibly control the current-limiting particle size, improve reusability of the particle size, select one or more particle sizes from the particle size pool to control the interface flow, and the particle sizes can be mutually combined to generate a combined effect, and can carry out hot update on the control particle size of a certain interface and adjust the flow control in real time.

Description

Flow control method and related equipment based on control granularity pool interface call
Technical Field
One or more embodiments of the present disclosure relate to the field of internet technologies, and in particular, to a method and related apparatus for controlling flow rate of interface calls based on a control granularity pool.
Background
With the increasing call volume of interfaces and the increasing concurrency of the call volume, the requirements of interface service processing capacity are increasing, if the accurate control of the interface flow is required, more granularity support is needed, and once granularity is increased, the granularity needs to be managed, so that the granularity can be directly selected for combination when other interfaces control the flow, corresponding control strategies are generated according to corresponding rule relations, and reusability of the granularity and timeliness and accuracy of strategy generation are improved. The prior art in flow restriction to interfaces mainly includes: performing global flow control on interfaces in an access layer, namely performing overall control on all flows of a single interface, and generally determining how much flow control is performed on the interfaces according to the processing capacity of the interfaces, wherein the overall limit of the interfaces is 500 if the processing capacity of the interfaces is 500/s; controlling interface flow in an encoded form in the interface code; and limiting the flow according to the granularity of the message content server status and the like. However, the control granularity is not uniformly managed, which may cause that the granularity needs to be designed and defined for each time of flow control design; by controlling the global flow, certain fine-grained calls cannot be guaranteed; the interface code is used for controlling the interface flow in a coding mode, the flow control is needed to be embedded into the interface code, the code is invaded, the requirement on the coding level is high, and the problem is easy to occur; the control granularity is not managed and reused by limiting the current to the granularity such as the status of the message content server.
Based on this, there is a need for a solution for fine-grained flow control of interface calls, improving the re-use of control granularity and the generation efficiency of control policies and the lack of intrusion into the interface code.
Disclosure of Invention
In view of this, it is an object of one or more embodiments of the present disclosure to provide a flow control method and related apparatus for interface call based on a control granularity pool.
In view of the above objects, one or more embodiments of the present disclosure provide a method for performing flow control on interface calls based on a control granularity pool, including:
selecting sub-granularity in a granularity pool;
confirming the relation among the particle sizes, and formulating a flow control strategy according to the relation among the particle sizes selected in a particle size pool;
setting a corresponding flow threshold according to the formulated flow control strategy;
activating a flow control strategy;
and performing flow control on interface call according to the flow control strategy and the flow threshold.
Based on the same inventive concept, one or more embodiments of the present disclosure further provide a flow control apparatus for performing interface call based on a control granularity pool, including:
a selection module configured to select sub-granularities in a granularity pool;
a policy formulation module configured to confirm a relationship between the sub-granularities, and to formulate a flow control policy according to the relationship between the sub-granularities selected in a granularity pool;
the threshold setting module is configured to set a corresponding flow threshold according to the formulated flow control strategy;
an activation module configured to activate a flow control strategy;
and the control module is configured to control the flow of interface call according to the flow control strategy and the flow threshold.
Based on the same inventive concept, one or more embodiments of the present specification also provide an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method as described in any one of the above when executing the program.
From the foregoing, it can be seen that one or more embodiments of the present disclosure provide a method and related apparatus for controlling flow of interface call based on a control granularity pool, which manages control granularity based on the granularity pool, and generates a flow control policy by selecting a relation between control granularity and set granularity in the granularity pool, so as to implement fine granularity flow control of interface call. The granularity pool can manage and maintain the control granularity, so that the control granularity re-use and the control strategy generation efficiency are greatly improved; and the codes are all in the access layer, so that the intrusion of the interface codes is avoided.
Drawings
For a clearer description of one or more embodiments of the present description or of the solutions of the prior art, the drawings that are necessary for the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only one or more embodiments of the present description, from which other drawings can be obtained, without inventive effort, for a person skilled in the art.
FIG. 1 is a flow diagram of a method of controlling flow based on control granularity pool invocation of interfaces in accordance with one or more embodiments of the present disclosure;
FIG. 2 is a flow control flow diagram of interface calls in accordance with one or more embodiments of the present disclosure;
FIG. 3 is a schematic diagram of one or more embodiments of a flow control implementation of the present disclosure;
FIG. 4 is a schematic diagram of a flow control device based on control granularity pool interfacing call in accordance with one or more embodiments of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to one or more embodiments of the present disclosure.
Detailed Description
For the purposes of promoting an understanding of the principles and advantages of the disclosure, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same.
It is noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present disclosure should be taken in a general sense as understood by one of ordinary skill in the art to which the present disclosure pertains. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items.
As described in the background section, existing flow restriction schemes for interfaces have also been difficult to meet the needs of flow control allocation. Applicant has found in the practice of the present disclosure that the major problems with existing flow control schemes are: the control granularity is not uniformly managed, which may cause that the granularity needs to be designed and defined for each time of flow control design; by controlling the global flow, certain fine-grained calls cannot be guaranteed; the interface code is used for controlling the interface flow in a coding mode, the flow control is needed to be embedded into the interface code, the code is invaded, the requirement on the coding level is high, and the problem is easy to occur; the control granularity is not managed and reused by limiting the current to the granularity such as the status of the message content server.
In view of this, one or more embodiments of the present disclosure provide a flow control scheme for interface call based on a control granularity pool, specifically, first selecting a primary sub-granularity in the granularity pool, where the primary sub-granularity may be one or more, and when there are more primary sub-granularities, determining a relationship between the primary sub-granularities; after the primary sub-granularity is confirmed, continuing to confirm the secondary sub-granularity and the secondary sub-granularity according to the requirement until all sub-granularity selection is completed; then generating a flow control strategy according to the relation between the selection of the granularity pool and the granularity of the sub-granularity; generating a corresponding flow threshold according to the generated flow control strategy; and then activating a flow control strategy, and controlling the flow by the access layer according to the flow control strategy.
It can be seen that, according to the flow control scheme based on the control granularity pool call of one or more embodiments of the present disclosure, the control granularity is managed based on the granularity pool, and the flow control policy is generated by selecting the relationship between the control granularity and the set granularity in the granularity pool, so as to achieve the purpose of fine granularity flow control on the interface call.
The technical solutions of one or more embodiments of the present specification are described in detail below by means of specific embodiments.
Referring to fig. 1, a flow control method for interface call based on control granularity pool according to one embodiment of the present disclosure includes the following steps:
step S101, selecting sub-granularity in a granularity pool.
In this embodiment, the sub-particle sizes may be classified into: system sub-granularity, IP sub-granularity, and field sub-granularity. The sub-granularity distinction by the front-to-back level may include a primary sub-granularity, a secondary sub-granularity, and a further secondary sub-granularity, the primary sub-granularity being not less than one. There is typically a relationship between different sub-granularities, such as there may be a relationship between the system granularity and the sub-granularity of the IP granularity, which may contain some fraction of the IP granularity; but there are also some sub-granularities that do not have a relationship, such as system granularity and request field granularity. When selecting the sub-granularity, firstly selecting a first sub-granularity in a granularity pool, after selecting the first sub-granularity, firstly judging whether the first sub-granularity exists in the granularity pool, and if the first sub-granularity exists in the granularity pool, selecting a corresponding sub-granularity; if the particle size is not present, determining the particle size to which the particle size belongs, and adding the particle size into a particle size pool for selection. Judging whether the number of the primary sub-granularities is more than one, if so, confirming the relation between the primary sub-granularities, otherwise, not confirming; the relationship between the primary sub-granularities comprises at least: and, or one of them. And selecting a secondary sub-granularity corresponding to the primary sub-granularity in a granularity pool, selecting a more secondary sub-granularity corresponding to the secondary sub-granularity in the granularity pool, and repeating the selecting step until all the levels of granularity are selected.
And step S102, confirming the relation among the sub-granularities, and formulating a flow control strategy according to the relation among the sub-granularities selected in the granularity pool.
In this embodiment, the relationship between the sub-granularities includes: and, or and, serial.
The relationship is generally used between the same-level sub-granularities, the first sub-granularity needs to be set, the same-level sub-granularities except the first sub-granularity are fixed to be the relationship, and a plurality of sub-granularities need only to be set with one control threshold value when being in the relationship. For example: the system granularity selects the system A and the system B, and is designated as the relation, only one control threshold is required to be set, and the total flow from the systems A and B reaches the threshold to trigger flow control.
Or the relationship is generally used between the first sub-granularities, the number of the established control strategies is determined, if the first sub-granularity is multiple, multiple control strategies are generated during the or relationship, and multiple control thresholds need to be set for respective control, for example: and the system granularity selects the system A and the system B, and is designated as or related to the system A and the system B, two control thresholds are required to be set, the flow from the systems A and B is respectively controlled, and the flow control is triggered when the thresholds are reached.
The serial relationship does not generally exist between the same-level sub-granularity, the serial relationship between the sub-granularities of different control granularities generates a relationship between the upper-level sub-granularity and the lower-level sub-granularity, and the upper-level granularity may restrict the selectivity of the secondary granularity, for example: for both system and IP granularity, if there are two sub-granularities of system a and system B below the system granularity, if the sub-granularity of system a is selected below the system granularity, the sub-granularity of IP is selected below the IP granularity of 192.168.0.123, then the flow control policy will restrict the flow of 192.168.0.123 requests from system a, and since the granularity of system a is 192.168.0.123 the upper granularity of the sub-granularity of IP, the flow of 192.168.0.123 the sub-granularity of IP cannot exceed the flow threshold of the sub-granularity of system a.
In this embodiment, according to the sequence of selecting the granularity and the above-mentioned and, or, serial three relationship criteria, a corresponding control strategy is generated.
As an example, the system granularity includes a system a, a system B and a system C, the IP granularity includes 192.168.0.1 to 192.168.0.15, the IP granularity of the system a constraint is 192.168.0.1 to 192.168.0.5, the IP granularity of the system B constraint is 192.168.0.6 to 192.168.0.10, the IP granularity of the system C constraint is 192.168.0.11 to 192.168.0.15, the request field a granularity includes a value of the request field a, a value of the request field a is B, a value of the request field a is C, if the primary granularity selects two sub granularities of the system a and the system B in the system granularity and sets a relationship, the IP in the secondary granularity is limited by the upper system granularity, if the IP granularity of the system a constraint is 192.168.0.1 to 192.168.0.5, the IP granularity of the system B constraint is 192.168.0.6 to 192.168.0.10, the secondary granularity of the system a constraint is 192.168.0.11 to 192.168.0.15, the system a can only be selected as the secondary granularity of the system a, the secondary granularity of the system B is 192.168.0.58.1 to 192.35, the request field a can be selected as the secondary granularity of the system B is only a, and the request field a value of the system B is selected as the secondary granularity is a.35.168.0.168.35.0.35, if the secondary granularity is selected as the secondary granularity is a value of the system B, and the request field a can only has a value of the secondary granularity of the system B is selected as the secondary granularity is a value of the system b.35.168.35.35.168.0.35.3. According to the set and relation of the granularity, the generated control strategy is one, a control threshold is required to be set, and then according to the fixed and relation between the serial relation and the non-primary granularity, the control strategy produced by the granularity pool at this time can be obtained, wherein the control strategy is: the total flow rate of the request message with the IP of 192.168.0.1, 192.168.0.3 and the IP of 192.168.0.6 and 192.168.0.9 from the system A and the system B is controlled, wherein the request message contains the value of the request field A or the value of the request field A is B. If the first granularity selection relationship is or the relationship and the other selections are unchanged, two control strategies are generated, and the control thresholds are required to be set respectively, namely, the flow with the value of the request field A being A or the value of the request field A being B in the request message with the IP being 192.168.0.1 and 192.168.0.3 from the system A and the flow with the value of the request field A being A or the value of the request field A being B in the request message with the IP being 192.168.0.6 and 192.168.0.9 from the system B are controlled respectively.
Step S103, setting a corresponding flow threshold according to the formulated flow control strategy.
In this embodiment, the size of the flow threshold is determined according to the call request of the caller and the actual running condition of the server.
Step S104, activating a flow control strategy.
And step 105, performing flow control on interface call according to the flow control strategy and the flow threshold.
As an alternative embodiment, referring to fig. 2, for step S105 in the foregoing embodiment, it may further include the steps of:
step S201, after the flow control strategy is activated, the calling party access layer sends a calling request.
Step S202, the access layer judges whether an activated flow control strategy exists on the interface.
Step S203, if the activated flow control policy does not exist, no flow restriction is performed.
Step S204, if the interface has the activated flow control strategy, judging whether the flow of the interface reaches the flow threshold.
Step S205, if the interface does not have an activated flow control policy or the flow of the interface does not reach the flow threshold, current limitation is not performed.
And step S206, if the flow of the interface reaches the flow threshold, performing flow control according to the flow control strategy, and limiting the flow of the request back at the access layer.
As an alternative embodiment, the access stratum may take the latest activated flow control policy every preset number of seconds of desgranularity Chi La and apply to interface flow control.
As can be seen, with reference to fig. 3, in the foregoing embodiment of the present specification, the access stratum performs flow control on the caller according to a flow control policy formulated based on the control granularity pool, so that the caller performs controlled task communication with a server in the production environment. Based on the control granularity pool, including the management of the granularity pool, the generation of the control strategy and the flow control method, the flow limiting granularity can be freely and flexibly controlled, the reusability of granularity is improved, one or more granularities can be selected from the granularity pool to control the interface flow, the granularities can be mutually combined to generate a combined effect, the control granularity of a certain interface can be thermally updated, and the flow control can be adjusted in real time.
It should be noted that the methods of one or more embodiments of the present description may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of one or more embodiments of the present description, the devices interacting with each other to accomplish the methods.
It should be noted that the foregoing describes specific embodiments of the present invention. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, corresponding to the method of any embodiment, one or more embodiments of the present disclosure further provide a flow control device for interface call based on a control granularity pool.
Referring to fig. 4, the flow control device for interface call based on control granularity pool includes:
a selection module 401 configured to select sub-granularities in a granularity pool.
A policy formulation module 402 configured to confirm the relationship between the sub-granularities and formulate a flow control policy based on the relationship between the sub-granularities selected in a granularity pool.
A threshold setting module 403 configured to set a corresponding flow threshold according to the formulated flow control strategy.
An activation module 404 configured to activate the flow control strategy.
A control module 405 configured to flow control the interface call according to the flow control policy and the flow threshold.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in one or more pieces of software and/or hardware when implementing one or more embodiments of the present description. The device of the foregoing embodiment is configured to implement the corresponding flow control method based on the control granularity pool interface call in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, corresponding to the method of any embodiment, one or more embodiments of the present disclosure further provide an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor executes the program to implement the method for controlling flow rate based on controlling call of a granularity pool to an interface according to any embodiment.
Fig. 5 shows a more specific hardware architecture of an electronic device according to this embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement the corresponding flow control method based on the control granularity pool interface call in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, one or more embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method for controlling flow based on control granularity pool invocation of an interface as described in any of the embodiments above, corresponding to the method of any of the embodiments above.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiment stores computer instructions for causing the computer to execute the flow control method based on the control granularity pool interface call in any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the disclosure, including the claims, is limited to these examples; combinations of features of the above embodiments or in different embodiments are also possible within the spirit of the present disclosure, steps may be implemented in any order, and there are many other variations of the different aspects of one or more embodiments described above which are not provided in detail for the sake of brevity.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present disclosure is intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Any omissions, modifications, equivalents, improvements, and the like, which are within the spirit and principles of the one or more embodiments of the disclosure, are therefore intended to be included within the scope of the disclosure.

Claims (6)

1. A method for flow control of interface calls based on a control granularity pool, comprising:
selecting sub-granularity in a granularity pool, wherein the sub-granularity is divided into system sub-granularity, IP sub-granularity and field sub-granularity according to types;
confirming the relation among the particle sizes, and formulating a flow control strategy according to the relation among the particle sizes selected in a particle size pool;
setting a corresponding flow threshold according to the formulated flow control strategy;
activating a flow control strategy;
performing flow control on interface call according to the flow control strategy and the flow threshold;
the determining the relationship between the sub-granularities, and formulating a flow control strategy according to the relationship between the sub-granularities selected in a granularity pool, comprising:
the relationship between the sub-particle sizes includes at least: and, or in series, the relationship between the sub-granularities including at least one of a relationship between a primary sub-granularity and a non-primary sub-granularity, a relationship between a non-primary sub-granularity and a non-primary sub-granularity;
judging the relation between the particle sizes;
when the relation between the sub-granularities is the AND, all the sub-granularities in the AND relation jointly generate a control strategy, and a control threshold is set;
when the relation among the sub-granularities is OR, generating a control strategy corresponding to the number of the sub-granularities with the OR relation, and setting a control threshold value corresponding to the number;
when the relation between the sub-granularity is serial, generating a control strategy according to the requirements of the upper-level sub-granularity and the lower-level sub-granularity, and setting corresponding control thresholds for the upper-level sub-granularity and the lower-level sub-granularity; the control threshold value of the upper level sub-granularity is larger than the control threshold value of the lower level sub-granularity;
the flow control for the interface call according to the flow control strategy and the flow threshold value comprises the following steps:
the calling direction sends a calling request to the access layer;
the access layer judges whether an activated flow control strategy exists in the interface;
if the activated flow control strategy does not exist, current limiting is not performed;
if the interface has the activated flow control strategy, judging whether the flow of the interface reaches the flow threshold;
if the flow of the interface does not reach the flow threshold, the flow is not limited;
if the flow of the interface reaches the flow threshold, performing flow control according to the flow control strategy, and limiting flow back of the request at the access layer;
the selecting sub-particle sizes in the particle size pool comprises:
selecting a primary sub-granularity in a granularity pool;
selecting a secondary sub-granularity corresponding to the primary sub-granularity in a granularity pool;
selecting a secondary sub-granularity corresponding to the secondary sub-granularity in the granularity pool, and repeating the steps until all the levels of granularity are selected;
the selecting the primary sub-granularity in the granularity pool further comprises:
judging whether the number of the primary sub-granularities is more than one, if so, confirming the relation between the primary sub-granularities, otherwise, not confirming;
the relationship between the primary sub-granularities comprises at least: and, or one of them.
2. The method of claim 1, wherein selecting a primary sub-granularity in a granularity pool, further comprises:
judging whether the primary sub-granularity exists in the granularity pool, if so, selecting the corresponding sub-granularity, if not, determining the granularity to which the sub-granularity belongs, and adding the sub-granularity into the granularity pool for selection.
3. The method as recited in claim 1, further comprising: the access stratum takes the latest activated flow control policy every preset seconds of descale Chi La and applies it to interface flow control.
4. A method according to any one of claims 1 to 3, wherein the sub-granularities are classified by category and comprise at least one of a system sub-granularity, an IP sub-granularity and a field sub-granularity, and the relationship between the sub-granularities is a serial relationship when the system sub-granularity and the IP sub-granularity are combined to generate the flow control policy.
5. A device for flow control of interface calls based on a control granularity pool, comprising:
a selection module configured to select sub-granularity in a granularity pool, wherein the sub-granularity is classified into a system sub-granularity, an IP sub-granularity, and a field sub-granularity by category;
a policy formulation module configured to confirm a relationship between the sub-granularities, and to formulate a flow control policy according to the relationship between the sub-granularities selected in a granularity pool;
the threshold setting module is configured to set a corresponding flow threshold according to the formulated flow control strategy;
an activation module configured to activate a flow control strategy;
a control module configured to perform flow control on interface calls according to the flow control policy and the flow threshold;
wherein the policy making module is specifically configured such that the relationship between the sub-granularities comprises at least: and, or in series, the relationship between the sub-granularities including at least one of a relationship between a primary sub-granularity and a non-primary sub-granularity, a relationship between a non-primary sub-granularity and a non-primary sub-granularity;
judging the relation between the particle sizes;
when the relation between the sub-granularities is the AND, all the sub-granularities in the AND relation jointly generate a control strategy, and a control threshold is set;
when the relation among the sub-granularities is OR, generating a control strategy corresponding to the number of the sub-granularities with the OR relation, and setting a control threshold value corresponding to the number;
when the relation between the sub-granularity is serial, generating a control strategy according to the requirements of the upper-level sub-granularity and the lower-level sub-granularity, and setting corresponding control thresholds for the upper-level sub-granularity and the lower-level sub-granularity; the control threshold value of the upper level sub-granularity is larger than the control threshold value of the lower level sub-granularity;
the control module is specifically configured to call and send a call request to the access layer;
the access layer judges whether an activated flow control strategy exists in the interface;
if the activated flow control strategy does not exist, current limiting is not performed;
if the interface has the activated flow control strategy, judging whether the flow of the interface reaches the flow threshold;
if the flow of the interface does not reach the flow threshold, the flow is not limited;
if the flow of the interface reaches the flow threshold, performing flow control according to the flow control strategy, and limiting flow back of the request at the access layer;
the selection module is specifically configured to select a primary sub-granularity in a granularity pool;
selecting a secondary sub-granularity corresponding to the primary sub-granularity in a granularity pool;
selecting a secondary sub-granularity corresponding to the secondary sub-granularity in the granularity pool, and repeating the steps until all the levels of granularity are selected;
judging whether the number of the primary sub-granularities is more than one, if so, confirming the relation between the primary sub-granularities, otherwise, not confirming;
the relationship between the primary sub-granularities comprises at least: and, or one of them.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when the program is executed by the processor.
CN202011415626.0A 2020-12-03 2020-12-03 Flow control method and related equipment based on control granularity pool interface call Active CN112583732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011415626.0A CN112583732B (en) 2020-12-03 2020-12-03 Flow control method and related equipment based on control granularity pool interface call

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011415626.0A CN112583732B (en) 2020-12-03 2020-12-03 Flow control method and related equipment based on control granularity pool interface call

Publications (2)

Publication Number Publication Date
CN112583732A CN112583732A (en) 2021-03-30
CN112583732B true CN112583732B (en) 2023-04-28

Family

ID=75127546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011415626.0A Active CN112583732B (en) 2020-12-03 2020-12-03 Flow control method and related equipment based on control granularity pool interface call

Country Status (1)

Country Link
CN (1) CN112583732B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992596A (en) * 2021-10-18 2022-01-28 北京沃东天骏信息技术有限公司 Interface current limiting method, device, equipment, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6901050B1 (en) * 2001-03-05 2005-05-31 Advanced Micro Devices, Inc. Systems and methods for flow-based traffic shaping
CN107370604A (en) * 2017-07-07 2017-11-21 华中科技大学 A kind of more granularity access control methods under big data environment
CN109871260A (en) * 2019-02-22 2019-06-11 今天东翼科技有限公司 A kind of various dimensions service current-limiting method and system based on shared drive between container
CN111698730A (en) * 2019-03-15 2020-09-22 阿里巴巴集团控股有限公司 Flow control method, operating system, end equipment and distributed system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7924720B2 (en) * 2007-02-26 2011-04-12 Hewlett-Packard Development Company, L.P. Network traffic monitoring
CN101594588B (en) * 2009-06-30 2012-05-23 中兴通讯股份有限公司 Method and system for controlling short message terminated call flow

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6901050B1 (en) * 2001-03-05 2005-05-31 Advanced Micro Devices, Inc. Systems and methods for flow-based traffic shaping
CN107370604A (en) * 2017-07-07 2017-11-21 华中科技大学 A kind of more granularity access control methods under big data environment
CN109871260A (en) * 2019-02-22 2019-06-11 今天东翼科技有限公司 A kind of various dimensions service current-limiting method and system based on shared drive between container
CN111698730A (en) * 2019-03-15 2020-09-22 阿里巴巴集团控股有限公司 Flow control method, operating system, end equipment and distributed system

Also Published As

Publication number Publication date
CN112583732A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN109005125B (en) Dynamic current limiting method, device and system
AU2019101567A4 (en) Method and apparatus for consensus verification
US11431794B2 (en) Service deployment method and function management platform under serverless architecture
EP3550803B1 (en) Block chain service acceptance and consensus method and device
CA3048739C (en) Blockchain-based data processing method and equipment
US8676981B2 (en) Routing service requests based on lowest actual cost within a federated virtual service cloud
JP2017538200A (en) Service addressing in a distributed environment
CN111223036B (en) GPU (graphics processing unit) virtualization sharing method and device, electronic equipment and storage medium
JP2019518258A (en) Time-based adjustable load balancing
US20180157505A1 (en) Automated image layer blacklisting in the cloud
CN110610352A (en) Flow processing method and device, electronic equipment and computer readable storage medium
CN111245732A (en) Flow control method, device and equipment
CN109639747B (en) Data request processing method, data request processing device, query message processing method, query message processing device and equipment
CN112583732B (en) Flow control method and related equipment based on control granularity pool interface call
CN114329406A (en) Resource processing method, device and equipment
US8752061B2 (en) Resource allocation within multiple resource providers based on the incoming resource request and the expected state transition of the resource requesting application, and selecting a resource provider based on the sum of the percentage of the resource provider currently used, the requesting load as a percentage of the resource provider's total resource, and the additional load imposed by the expected state of the requesting application as a percentage of the resource provider's total resource
CN116933886B (en) Quantum computing execution method, quantum computing execution system, electronic equipment and storage medium
CN112114976A (en) Service processing method, device, equipment and storage medium
CN113703996B (en) Access control method, equipment and medium based on user and YANG model grouping
CN110188975A (en) A kind of resource acquiring method and device
US20220276901A1 (en) Batch processing management
CN111462348B (en) Resource allocation method, device and equipment based on sign-in behavior
US10193823B2 (en) Rich resource management incorporating usage statistics for fairness
CN107122303B (en) Test method and device
US20170075736A1 (en) Rule engine for application servers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant