CN109412967B - System flow control method and device based on token, electronic equipment and storage medium - Google Patents

System flow control method and device based on token, electronic equipment and storage medium Download PDF

Info

Publication number
CN109412967B
CN109412967B CN201811145830.8A CN201811145830A CN109412967B CN 109412967 B CN109412967 B CN 109412967B CN 201811145830 A CN201811145830 A CN 201811145830A CN 109412967 B CN109412967 B CN 109412967B
Authority
CN
China
Prior art keywords
flow control
token
pool
configuration item
mode
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
CN201811145830.8A
Other languages
Chinese (zh)
Other versions
CN109412967A (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.)
Jiangsu Manyun Software Technology Co Ltd
Original Assignee
Jiangsu Manyun Software Technology 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 Jiangsu Manyun Software Technology Co Ltd filed Critical Jiangsu Manyun Software Technology Co Ltd
Priority to CN201811145830.8A priority Critical patent/CN109412967B/en
Publication of CN109412967A publication Critical patent/CN109412967A/en
Application granted granted Critical
Publication of CN109412967B publication Critical patent/CN109412967B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a system flow control method, a device, electronic equipment and a storage medium based on a token, wherein the system flow control method based on the token comprises the following steps: receiving a quasi-flow control configuration item configured for a first authority account, wherein the quasi-flow control configuration item at least comprises token pool information, a token pool flow control mode and a token pool flow control type; the quasi-flow control configuration item is determined by a second authority account and then is used as a flow control configuration item; and determining the request quantity and the concurrency quantity according to the flow control configuration item and the real-time data flow to carry out system flow control. The method and the device provided by the invention ensure the stability of the system, reduce the downtime risk, enhance the robustness of the service and improve the user experience.

Description

System flow control method and device based on token, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computer application, in particular to a system flow control method and device based on a token, electronic equipment and a storage medium.
Background
"flow control" is short for "flow control". In a traditional flow control mode, flow control based on a source address, a destination address, a source port, a destination port and a protocol type is realized through a QoS (Quality of Service) module of a router and a switch, but the background configuration is more complex in the flow control mode; meanwhile, the method depends on the number of machines and load balancing.
Disclosure of Invention
The present invention is directed to a method, an apparatus, an electronic device, and a storage medium for token-based system flow control, which overcome at least some of the limitations and disadvantages of the related art.
According to an aspect of the present invention, there is provided a token-based system flow control method, including:
receiving a quasi-flow control configuration item configured for a first authority account, wherein the quasi-flow control configuration item at least comprises token pool information, a token pool flow control mode and a token pool flow control type;
the quasi-flow control configuration item is determined by a second authority account and then is used as a flow control configuration item; and
and determining the request quantity and the concurrency quantity according to the flow control configuration item and the real-time data flow so as to carry out system flow control.
Optionally, the receiving a quasi-flow control configuration item configured by a first authority account includes:
receiving a general attribute of a quasi-flow control configuration item configured by a first authority account;
and receiving the flow control parameters of the quasi-flow control configuration item configured by the first authority account.
Optionally, the generic attributes include one or more of the following attribute items:
identifying a system to be subjected to flow control;
the system comprises a token pool identifier, one or more token pools are configured for the same system to be subjected to flow control, the token pool identifier is globally unique, and the token pool comprises a plurality of tokens;
a maximum holding token time;
request token timeout time;
an open state of the token pool;
a continuous alarm time interval.
Optionally, the flow control parameters include one or more of the following:
the token pool shares the number of tokens;
the token pool flow control type comprises a global flow control and a single machine flow control;
the flow control method of the token pool comprises a first mode and a second mode, wherein the first mode is based on the maximum allowed managed number per second, and the second mode is based on the thread number of concurrent processing;
the number of the abnormal single machine pool tokens is configured only when the token pool flow control type is global flow control; and
at least one configuration parameter of a flow control path.
Optionally, the configuration parameters of each flow control path include one or more of the following configuration parameter items:
flow control path identification;
the name and the parameter value of the parameter to be matched;
the pool sharing token indicates whether the current flow control path uses the token pool sharing token number or not;
a number of independent tokens indicating a number of independent tokens used;
an independent token property indicating that the token used is a shared token or an independent token under the current path;
an independent flow control mode indicating an independent flow control mode in a current path, wherein the independent flow control mode comprises the first mode and the second mode;
the path flow control type comprises a global flow control and a single machine flow control;
and the number of the abnormal single-machine tokens is configured only when the path flow control type is global flow control and is used as a flow control threshold value.
Optionally, the receiving a quasi-flow control configuration item configured for the first authority account further includes:
and receiving multi-stage flow control parameters configured for the first authority account, wherein all parameter items of all stages of flow control parameters are consistent except the number of tokens.
Optionally, the receiving the multi-level flow control parameter of the first authority account configuration further includes:
and receiving one stage of the multi-stage flow control parameters selected by the first authority account for use.
Optionally, the method further comprises:
modifications of the second rights account by the third rights account are received.
According to another aspect of the present invention, there is also provided a token-based system flow control apparatus, including:
the system comprises a receiving module, a flow control module and a flow control module, wherein the receiving module is used for receiving a quasi-flow control configuration item configured for a first authority account, and the quasi-flow control configuration item at least comprises token pool information, a token pool flow control mode and a token pool flow control type;
the determining module is used for enabling the quasi-flow control configuration item to serve as a flow control configuration item after being determined by a second authority account; and
and the flow control module is used for determining the request quantity and the concurrency quantity according to the flow control configuration item and the real-time data flow so as to carry out system flow control.
According to still another aspect of the present invention, there is also provided an electronic apparatus, including: a processor; a storage medium having stored thereon a computer program which, when executed by the processor, performs the steps as described above.
According to yet another aspect of the present invention, there is also provided a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps as described above.
Compared with the prior art, the invention has the advantages that:
the flow control is an indispensable ring in a disaster recovery system, and when the request amount or the concurrency number exceeds the system capacity, the avalanche of a service interface and the system breakdown are prevented by rejecting an excess request. The scheme provided by the invention supports multi-dimensional and multi-level flow control and fine-grained flow control based on service scenes, provides simple and easy configuration management and timely alarm, is convenient for users to take corresponding measures according to different service scenes, ensures the stability of a system, reduces the downtime risk, enhances the robustness of service and improves the user experience.
Drawings
The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
Fig. 1 shows a flow chart of a token-based system flow control method according to an embodiment of the present invention.
Fig. 2 shows a schematic diagram of the use of a token according to a specific embodiment of the invention.
Fig. 3 shows a flow chart of a token-based system flow control method according to a specific embodiment of the present invention.
Fig. 4 shows a schematic diagram of a token-based system flow control apparatus according to an embodiment of the present invention.
Fig. 5 schematically illustrates a computer-readable storage medium in an exemplary embodiment of the invention.
Fig. 6 schematically shows an electronic device in an exemplary embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a flow chart of a token-based system flow control method according to an embodiment of the present invention. Referring to fig. 1, the token-based system flow control method includes the following steps:
step S110: receiving a quasi-flow control configuration item configured for a first authority account, wherein the quasi-flow control configuration item at least comprises token pool information, a token pool flow control mode and a token pool flow control type;
step S120: the quasi-flow control configuration item is determined by a second authority account and then is used as a flow control configuration item; and
step S130: and determining the request quantity and the concurrency quantity according to the flow control configuration item and the real-time data flow so as to carry out system flow control.
In the token-based system flow control method according to the exemplary embodiment of the present invention, flow control is used as an indispensable ring in a disaster recovery system, and when the request amount or the concurrency number exceeds the system capacity, avalanche of service interfaces and system downtime are prevented by rejecting an excess request. The scheme provided by the invention supports multi-dimensional and multi-level flow control and fine-grained flow control based on service scenes, provides simple and easy configuration management and timely alarm, is convenient for users to take corresponding measures according to different service scenes, ensures the stability of a system, reduces the downtime risk, enhances the robustness of service and improves the user experience.
The token-based system flow control method provided by the invention is described in detail as follows:
referring to fig. 2, fig. 2 illustrates a schematic diagram of the use of a token according to a specific embodiment of the present invention.
The token (token) in the present invention may be understood as a pass for executing a service, and after the server receives a service request, the server needs to request a token from the token pool 240 in order to execute the service 210. The token pool 240 assigns tokens to servers according to token requests. The server may perform service acceptance and execution 220 after obtaining the token. When the service is executed, that is, the service is finished 230, the server releases the token, that is, returns the token to the token pool 240, and cancels the occupation of the token. Figure 2 is merely a schematic depiction of a token according to various embodiments of the present invention.
Referring now to fig. 3, fig. 3 is a flow diagram illustrating a token-based system flow control method according to an embodiment of the present invention. In the embodiment shown in FIG. 3, the present invention provides a third rights account 330 in addition to the first rights account 310, the second rights account 320. FIG. 3 shows the steps performed by each of the first rights account 310, the second rights account 320, and the third rights account 330.
Specifically, step S341 is executed to receive a request for adding a flow control policy to the first authorization account 310.
Then, step S342 is executed to receive the generic attribute of the quasi-flow control configuration item configured by the first authority account. The generic attributes include one or more of the following attribute items:
the system identifier to be subjected to flow control may be, for example, a system short, and in some specific implementations, only all systems in the center where the login job number is located may be configured;
and the system to be subjected to flow control is configured with one or more token pools, the token pool identification is globally unique, and the token pool comprises a plurality of tokens. In some implementations, the token pool identification cannot contain special characters or spaces other than underlining;
token pool name, token pool Chinese name, may not fill in;
the maximum token holding time refers to the maximum token holding time, and has different attributes according to different flow control modes described below. Specifically, the numerical value filled in the first mode (TPS flow control mode, based on the maximum allowed number per second) does not affect token issuance (TPS flow control mode token issuance per second, not recycled); if, in the second mode (concurrent flow control, the number of threads processed concurrently) is not released beyond this time frame, the token is invalidated and a new token is created in the token pool. The unit of maximum holding token time may be milliseconds (ms);
the request token timeout time has different attributes according to different flow control modes and different flow control types described below. Specifically, the flow control types include global flow control and stand-alone flow control. For the first mode (single machine TPS flow control) of the single machine flow control type, the filled request token timeout time is not effective; for the second mode (single-machine concurrent digital flow control) of the single-machine flow control type, the filled request token timeout time refers to the time that the request token pool is willing to queue up after not acquiring the token, and if the time range has the released token, the time range is acquired for use; for the first and second modes of the global flow control type, the filled request token timeout time refers to the response time of the waiting network (for example, relying on the Redis service), and if the response time exceeds the time range, the global flow control fails to switch to the abnormal stand-alone flow control (the execution of the abnormal stand-alone flow control needs to be configured in the following "abnormal stand-alone pool token number" and "abnormal token stand-alone number" to be effective). The unit of the request token timeout time may be milliseconds (ms);
the starting state of the token pool is determined to be enabled or disabled;
and configuring a continuous alarm time interval of the mails or the short messages. The unit of the continuous alert time interval may be minutes.
Then, step S343 is executed to receive the flow control parameter of the quasi-flow control configuration item configured by the first authority account. In particular, the flow control parameters include one or more of the following:
the token pool shares the number of tokens, and specifically, all paths selected from the configuration parameters of the flow control path to use the pool shared tokens share the number of tokens.
And the token pool flow control type comprises global flow control and single machine flow control. In some embodiments, the token pool flow control does not take effect if the token pool number of shared tokens is null (equal to-1).
And the token pool flow control mode comprises a first mode and a second mode, wherein the first mode is based on the maximum allowed number of threads per second, and the second mode is based on the number of threads processed concurrently.
And the number of the abnormal single machine pool tokens is configured only when the token pool flow control type is global flow control. In some specific embodiments, when Redis operation is abnormal or response time is overtime, the system automatically acquires a local single-machine token to perform single-machine base-protection flow control until the system returns to normal; and when the global flow control fails, if the number of the single machine tokens is not configured, the flow control fails. Specifically, the number of abnormal single machine pool tokens is the number of tokens that need to be used by the preset TPS concurrency, and if the actual TPS is 1000, the TPS of a single machine is 1000/machine number, and the theoretical threshold of the token pool is 1000/machine number.
At least one configuration parameter of a flow control path. The configuration parameters of each flow control path comprise one or more of the following configuration parameter items:
the flow control path identifier, specifically, the flow control path identifier may support multiple matching modes, and the fuzzy matching is used by combining a "#" sign: 1) and (3) precise matching: do, e.g., getuserdata; 2) prefix matching: for example get; 3) suffix matching: e.g.. showlogin; 4) the method comprises the following steps: for example login; 5) and (3) full matching: for example (specifically, if a request is not matched to any other path, the default is matched to x, if all the matches except "xxx" are configured, one path may be configured as xxx, and the other path is set as x);
the parameter names and parameter values to be matched can be configured to realize fine-grained flow control accurate to account level, multiple parameter names and parameter values of the same type of matching mode can be English, the number can be spliced, and the parameter values support fuzzy matching;
and the pool sharing token indicates whether the current flow control path uses the token pool sharing token number. When the pool sharing token is not filled (or is-1), the following "independent token characteristics" and "independent flow control mode" are in an invalid state;
a number of independent tokens indicating a number of independent tokens used;
an independent token property indicating that the token used is a shared token or an independent token under the current path;
an independent flow control mode indicating an independent flow control mode in a current path, wherein the independent flow control mode comprises the first mode and the second mode;
the path flow control type comprises a global flow control and a single machine flow control;
and the number of the abnormal single-machine tokens is configured only when the path flow control type is global flow control and is used as a flow control threshold value. Specifically, when the abnormal single-machine token number is used as the global flow control abnormality, single-machine guaranteed-base flow control is performed on some paths, and the function of the abnormal single-machine token number is the same as that of the abnormal single-machine pool token number.
Then, step S344 is executed to determine whether to configure the multi-stage flow control.
If yes, step S345 is executed to receive the multi-level flow control parameters configured for the first authorization account, where all parameter items of the flow control parameters of each level are consistent except for the number of tokens. Specifically, the receiving the multi-level flow control parameter configured by the first authority account further includes: and receiving one stage of the multi-stage flow control parameters selected by the first authority account for use. One-key switching aiming at different system requirements can be realized through configuration of multi-stage flow control parameters. Specifically, the deletion of the multi-level stream control needs to be sequentially deleted from the last level to the front.
If not, step S346 is executed to determine whether to fill in the content to be changed.
Then, step S347 is executed to receive a request for submitting the first authorization account.
Then, step S348 is executed to determine whether modification is required according to the operation of the first authority account.
If the determination in step S348 is yes, step S349 is executed to determine whether to delete the quasi-flow control configuration item. If yes, deleting and ending the flow. If not, the step S350 returns to any of the steps S342 to S344 for modification.
If the determination in step S348 is no, step S351 is executed to determine whether to approve the flow control configuration item through the default second authorization account. If the determination in step S351 is negative, step S355 is executed to add a second authorization account from the third authorization account and perform quasi-flow control configuration item audit by the added second authorization account. If the determination in step S351 is yes, step S352 is executed to perform quasi-flow control configuration item auditing.
Step S353, determining whether the quasi-flow control configuration item passes the audit via the second permission account. If the determination in step S353 is yes, step S354 is executed to complete the configuration, so that the quasi-flow control configuration item is used as the quasi-flow control configuration item. If the determination in step S353 is no, the process returns to step S349 to determine whether deletion is required.
Specifically, in the present embodiment, the third authority account as an administrator can increase or decrease the second authority account. The second authority account can be used as an auditor to audit the flow control configuration item, and further feedback (such as audit passing, rejection and audit suggestion providing) is provided. The first authority account can execute flow control strategy addition (newly adding quasi-flow control configuration items including general attribute configuration, flow control parameter configuration, multi-stage flow control configuration and changed content filling), flow control strategy modification (quasi-flow control configuration item modification including general attribute configuration modification, flow control parameter configuration modification, multi-stage flow control configuration modification, changed content filling modification and token pool list modification), flow control strategy retrieval (quasi-flow control configuration items can be retrieved according to the token pool list), flow control strategy data can be viewed through the token pool list, passed or to-be-reviewed data can be deleted, review comments and the like. The first authority account also receives a flow control alarm.
Thus, according to the above arrangement, the requested amount per second and the number of concurrent threads can be determined based on the token, and flow control can be realized according to the determined requested amount per second and the number of concurrent threads.
The flow control method supports flow control of various scenes, supports fuzzy matching of paths and parameters to avoid complex configuration, supports mixed use of TPS flow control and concurrent digital flow control, supports preset multistage flow control switching as required, supports business-level flow control and the like, and is applied to various complex scenes through different combined configurations.
The above embodiments of the present invention are merely exemplary, and the above steps/modules can be executed separately or in combination to adapt to different scenarios without departing from the scope of the present invention.
Fig. 4 shows a schematic diagram of a token-based system flow control apparatus according to an embodiment of the present invention. Fig. 4 is a block diagram illustrating a token-based system flow control apparatus according to an embodiment of the present invention. The token-based system flow control apparatus 400 includes a receiving module 410, a determining module 420, and a flow control module 430.
The receiving module 410 is configured to receive a quasi-flow control configuration item configured for a first authority account, where the quasi-flow control configuration item at least includes token pool information, a token pool flow control mode, and a token pool flow control type;
the determining module 420 is configured to determine the quasi-flow control configuration item as a flow control configuration item through a second authority account; and
the flow control module 430 is configured to determine a request amount and a concurrency amount according to the flow control configuration item and the real-time data stream to perform system flow control.
In the token-based system flow control device according to the exemplary embodiment of the present invention, flow control is an indispensable ring in a disaster recovery system, and when a request amount or a concurrency number exceeds a system capacity, avalanche of a service interface and system downtime are prevented by rejecting an excess request. The scheme provided by the invention supports multi-dimensional and multi-level flow control and fine-grained flow control based on service scenes, provides simple and easy configuration management and timely alarm, is convenient for users to take corresponding measures according to different service scenes, ensures the stability of a system, reduces the downtime risk, enhances the robustness of service and improves the user experience.
Fig. 4 is a schematic diagram illustrating a token-based system flow control apparatus 400 provided by the present invention, and the splitting, merging and adding of modules are within the protection scope of the present invention without departing from the concept of the present invention.
In an exemplary embodiment of the present invention, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by, for example, a processor, can implement the steps of the electronic prescription flow processing method described in any one of the above embodiments. In some possible embodiments, aspects of the present invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of this specification, when the program product is run on the terminal device.
Referring to fig. 5, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the tenant computing device, partly on the tenant device, as a stand-alone software package, partly on the tenant computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing devices may be connected to the tenant computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In an exemplary embodiment of the invention, there is also provided an electronic device that may include a processor and a memory for storing executable instructions of the processor. Wherein the processor is configured to execute the steps of the electronic prescription flow processing method in any one of the above embodiments via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 800 shown in fig. 6 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 6, electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one memory unit 820, a bus 830 connecting the various system components (including the memory unit 820 and the processing unit 810), a display unit 840, and the like.
Wherein the storage unit stores program code executable by the processing unit 810 to cause the processing unit 810 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 510 may perform the steps as shown in fig. 1.
The memory unit 820 may include readable media in the form of volatile memory units such as a random access memory unit (RAM)8201 and/or a cache memory unit 8202, and may further include a read only memory unit (ROM) 8203.
The memory unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 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 thereof, may comprise an implementation of a network environment.
Bus 830 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 600 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a tenant to interact with the electronic device 800, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 850. Also, the electronic device 800 may 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 the network adapter 860. The network adapter 860 may communicate with other modules of the electronic device 800 via the bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above-mentioned electronic prescription flow processing method according to the embodiment of the present invention.
Compared with the prior art, the invention has the advantages that:
the flow control is an indispensable ring in a disaster recovery system, and when the request amount or the concurrency number exceeds the system capacity, the avalanche of a service interface and the system breakdown are prevented by rejecting an excess request. The scheme provided by the invention supports multi-dimensional and multi-level flow control and fine-grained flow control based on service scenes, provides simple and easy configuration management and timely alarm, is convenient for users to take corresponding measures according to different service scenes, ensures the stability of a system, reduces the downtime risk, enhances the robustness of service and improves the user experience.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (10)

1. A token-based system flow control method is characterized by comprising the following steps:
receiving a quasi-flow control configuration item configured by a first authority account, wherein the quasi-flow control configuration item comprises a general attribute, a flow control parameter and a multi-level flow control parameter, the general attribute comprises one or more of a system identifier to be subjected to flow control, a token pool identifier, maximum token holding time, request token timeout time, an opening state of a token pool and a continuous alarm time interval, and the flow control parameter comprises one or more of a token pool shared token number, a token pool flow control type, a token pool flow control mode, an abnormal single machine pool token number and a configuration parameter of at least one flow control path;
the quasi-flow control configuration item is determined by a second authority account and then is used as a flow control configuration item; and
and determining the request quantity and the concurrent quantity according to the flow control configuration item and the real-time data flow so as to carry out system flow control.
2. The token-based system flow control method according to claim 1, wherein one or more token pools are configured for a same system to be flow controlled, wherein the token pool identifies global uniqueness, and the token pool comprises a plurality of tokens.
3. The token-based system flow control method according to claim 1, wherein the token pool flow control types include global flow control and stand-alone flow control; the token pool flow control mode comprises a first mode and a second mode, wherein the first mode is based on the maximum allowed managed number per second, and the second mode is based on the thread number of concurrent processing; and when the token pool flow control type is configured in the global flow control mode, the flow control parameters comprise the number of the abnormal single machine pool tokens.
4. The token-based system flow control method of claim 3, wherein the configuration parameters of each flow control path include one or more of the following configuration parameter items:
flow control path identification;
the name and the parameter value of the parameter to be matched;
the pool sharing token indicates whether the current flow control path uses the token pool sharing token number or not;
a number of independent tokens indicating a number of independent tokens used;
an independent token property indicating that the token used is a shared token or an independent token under the current path;
an independent flow control mode indicating an independent flow control mode in a current path, wherein the independent flow control mode comprises the first mode and the second mode;
the path flow control type comprises a global flow control and a single machine flow control;
and the number of the abnormal single-machine tokens is configured only when the path flow control type is global flow control and is used as a flow control threshold value.
5. The token-based system flow control method according to claim 4, wherein each level of flow control parameters is consistent except for the number of tokens.
6. The token-based system flow control method of claim 5, wherein the receiving the multi-level flow control parameters for the first entitlement account configuration further comprises:
and receiving one stage of the multi-stage flow control parameters selected by the first authority account for use.
7. The token-based system flow control method according to any one of claims 1 to 6, further comprising:
modifications of the second rights account by the third rights account are received.
8. A token-based system flow control apparatus, comprising:
the system comprises a receiving module, a flow control module and a flow control module, wherein the flow control module is used for receiving a quasi-flow control configuration item configured by a first authority account, and the quasi-flow control configuration item comprises a general attribute, a flow control parameter and a multi-level flow control parameter, the general attribute comprises one or more of a system identifier to be subjected to flow control, a token pool identifier, maximum token holding time, request token timeout time, an opening state of a token pool and a continuous alarm time interval, and the flow control parameter comprises one or more of a token pool shared token number, a token pool flow control type, a token pool flow control mode, an abnormal single machine pool token number and configuration parameters of at least one flow control path;
the determining module is used for enabling the quasi-flow control configuration item to serve as a flow control configuration item after being determined by a second authority account; and
and the flow control module is used for determining the request quantity and the concurrency quantity according to the flow control configuration item and the real-time data flow so as to carry out system flow control.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
memory having stored thereon a computer program which, when executed by the processor, performs the method of any of claims 1 to 7.
10. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, performs the method according to any one of claims 1 to 7.
CN201811145830.8A 2018-09-28 2018-09-28 System flow control method and device based on token, electronic equipment and storage medium Active CN109412967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811145830.8A CN109412967B (en) 2018-09-28 2018-09-28 System flow control method and device based on token, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811145830.8A CN109412967B (en) 2018-09-28 2018-09-28 System flow control method and device based on token, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109412967A CN109412967A (en) 2019-03-01
CN109412967B true CN109412967B (en) 2022-07-08

Family

ID=65466601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811145830.8A Active CN109412967B (en) 2018-09-28 2018-09-28 System flow control method and device based on token, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109412967B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324253A (en) * 2019-06-29 2019-10-11 江苏满运软件科技有限公司 Flow control methods, device, storage medium and electronic equipment
US10691728B1 (en) * 2019-08-13 2020-06-23 Datadog, Inc. Transforming a data stream into structured data
CN111694669B (en) * 2020-06-12 2024-08-20 深圳前海微众银行股份有限公司 Task processing method and device
CN112860414B (en) * 2021-03-30 2024-04-26 中国工商银行股份有限公司 Method, device, equipment and storage medium for concurrency control of distributed system
CN113516445B (en) * 2021-04-25 2024-04-16 江苏南大先腾信息产业股份有限公司 Workflow business state management method based on hierarchical token

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551837B (en) * 2008-03-31 2012-01-25 联想(北京)有限公司 Method for switching user accounts and computer
US9007898B2 (en) * 2011-02-01 2015-04-14 Google Inc. System to share network bandwidth among competing applications
CN103686387A (en) * 2013-12-27 2014-03-26 乐视致新电子科技(天津)有限公司 Multi-account management control method and system in intelligent television system
US20170147182A1 (en) * 2015-11-25 2017-05-25 Facebook, Inc. Techniques to remotely configure interface settings

Also Published As

Publication number Publication date
CN109412967A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109412967B (en) System flow control method and device based on token, electronic equipment and storage medium
US20180101371A1 (en) Deployment manager
US20180007001A1 (en) Providing security service
US20130254313A1 (en) Dynamic control over tracing of messages received by a message broker
US20220129155A1 (en) Techniques for persisting data across instances of a cloud shell
US20090248596A1 (en) Configuration information management apparatus, configuration information management program, and configuration information management method
CN109144697B (en) Task scheduling method and device, electronic equipment and storage medium
US10521381B2 (en) Self-moderating bus arbitration architecture
US20200110631A1 (en) Virtual machine deployment method and omm virtual machine
US10664376B2 (en) Hierarchical process group management
GB2529475A (en) Tenant allocation in multi-tenant software applications technical field
CN115934202A (en) Data management method, system, data service gateway and storage medium
US20140129598A1 (en) Dynamic management of log persistence
US20210165685A1 (en) Method, device, and computer program product for job processing
US20230267005A1 (en) Thread management
US9547540B1 (en) Distributed operating system functions for nodes in a rack
US11558387B2 (en) Validation of approver identifiers in a cloud computing environment
US20210165684A1 (en) Method, device, and computer program product for job processing
CN113726885A (en) Method and device for adjusting flow quota
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium
CN111080250A (en) Flow backspacing compensation method and device, storage medium and electronic equipment
US20230281050A1 (en) Adaptive throttling with tenant-based concurrent rate limits for a multi-tenant system
CN108363619B (en) Service flow control method, server, and computer-readable storage medium
CN113765986B (en) Flow control method of open platform and server
CN110262756B (en) Method and device for caching data

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190301

Assignee: Nanjing Manyun Cold Chain Technology Co.,Ltd.

Assignor: JIANGSU MANYUN SOFTWARE TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980038397

Denomination of invention: Token-based system flow control methods, devices, electronic devices, and storage media

Granted publication date: 20220708

License type: Common License

Record date: 20230724