CN116489089A - Flow control method and device and computer equipment - Google Patents

Flow control method and device and computer equipment Download PDF

Info

Publication number
CN116489089A
CN116489089A CN202310534505.5A CN202310534505A CN116489089A CN 116489089 A CN116489089 A CN 116489089A CN 202310534505 A CN202310534505 A CN 202310534505A CN 116489089 A CN116489089 A CN 116489089A
Authority
CN
China
Prior art keywords
interface
service
processing request
service processing
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310534505.5A
Other languages
Chinese (zh)
Inventor
许心熠
陈勇清
朱琪
王涵韬
黄健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial Bank Co Ltd
CIB Fintech Services Shanghai Co Ltd
Original Assignee
Industrial Bank Co Ltd
CIB Fintech Services Shanghai 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 Industrial Bank Co Ltd, CIB Fintech Services Shanghai Co Ltd filed Critical Industrial Bank Co Ltd
Priority to CN202310534505.5A priority Critical patent/CN116489089A/en
Publication of CN116489089A publication Critical patent/CN116489089A/en
Pending legal-status Critical Current

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present application relates to a flow control method. The method comprises the following steps: acquiring a service processing request comprising an authentication token, wherein the authentication token comprises at least one of user information and historical access times, and adding the authentication token into a preset user grade list according to the historical access times; analyzing the service processing request to obtain a service interface of the micro service node; when the resource usage amount of the service processing request is larger than a first current limiting threshold, receiving a user grade list and an interface grade list returned by the service interface into a local cache, wherein the interface grade list is determined according to the resource usage data parameters of each service interface in all preset micro service nodes; and if the user information in the service processing request is matched with the user grade list, the service interface is matched with the interface grade list, and the service processing request is executed. By adopting the method, the flow can be controlled finely according to the grade of the user and the grade of the interface.

Description

Flow control method and device and computer equipment
Technical Field
The present application relates to the field of internet technology, and in particular, to a flow control method, apparatus, computer device, storage medium, and computer program product.
Background
Along with development of science and technology, internet application is more and more popular, when a server is accessed by a user in a large amount, in order to ensure the running stability of the server, the server is controlled in a current limiting mode to prevent the problems of service quality reduction, time delay and the like caused by a large amount of access flow.
In the related art, a current limit condition may be set, and after the current limit condition is reached, all access requests are denied. The existing degradation strategy cannot finely control the flow.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a flow control method, apparatus, computer device, storage medium, and computer program product, which can formulate a user class list, an interface class list, and determine whether to execute a service processing request according to the formulated list when the resource usage amount of the service processing request is greater than a current limit threshold.
In a first aspect, the present application provides a flow control method. The method comprises the following steps:
acquiring a service processing request comprising an authentication token, wherein the authentication token comprises at least one of user information and historical access times, and adding the authentication token into a preset user grade list according to the historical access times;
analyzing the service processing request to obtain a service interface of the micro service node;
when the resource usage amount of the service processing request is larger than a first current limiting threshold, receiving a user grade list and an interface grade list returned by the service interface to a local cache, wherein the interface grade list is determined according to the resource usage data parameters of each service interface in all preset micro service nodes;
and if the user information in the service processing request is matched with the user grade list, the service interface is matched with the interface grade list, and the service processing request is executed.
In one embodiment, the method further comprises:
when the resource usage amount of the service processing request is larger than a second current limiting threshold, the service interface intercepts the service processing request and returns current limiting prompt information to the client.
In one embodiment, the obtaining manner of the interface level list includes:
calculating the interface weight of the service interface according to the resource use parameters of the micro service node and the service interface;
and sequencing the service interfaces according to the interface weights to obtain the interface grade list.
In one embodiment, the method further comprises:
acquiring user information according to the authentication token, and acquiring access right information of a user through the user information, wherein the access right information comprises an interface address list which can be accessed by the user;
and if the service interface in the service processing request is not in the interface address list, the service interface intercepts the service processing request.
In one embodiment, the first current limit threshold and the second current limit threshold are determined according to a resource usage parameter of the service node.
In a second aspect, the present application also provides a flow control device, the device comprising:
the generation module is used for acquiring a service processing request comprising an authentication token, wherein the authentication token comprises at least one of user information and historical access times, and the authentication token is added into a preset user grade list according to the historical access times;
the analysis module is used for analyzing the service processing request to obtain a service interface of the micro service node;
the judging module is used for receiving a user grade list and an interface grade list returned by the service interface to a local cache when the resource usage amount of the service processing request is larger than a first current limiting threshold, wherein the interface grade list is determined according to the resource usage data parameters of each service interface in all preset micro service nodes;
and the matching module is used for executing the service processing request if the user information in the service processing request is matched with the user grade list and the service interface is matched with the interface grade list.
In one embodiment, the apparatus further comprises:
when the resource usage amount of the service processing request is larger than a second current limiting threshold, the service interface intercepts the service processing request and returns current limiting prompt information to the client.
In one embodiment, the obtaining manner of the interface level list includes:
calculating the interface weight of the service interface according to the resource use parameters of the micro service node and the service interface;
and sequencing the service interfaces according to the interface weights to obtain the interface grade list.
In one embodiment, the apparatus further comprises:
acquiring user information according to the authentication token, and acquiring access right information of a user through the user information, wherein the access right information comprises an interface address list which can be accessed by the user;
and if the service interface in the service processing request is not in the interface address list, the service interface intercepts the service processing request.
In one embodiment, the first current limit threshold and the second current limit threshold are determined according to a resource usage parameter of the service node.
In a third aspect, the present disclosure also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the flow control method when executing the computer program.
In a fourth aspect, the present disclosure also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of a flow control method.
In a fifth aspect, the present disclosure also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the flow control method.
The flow control method at least comprises the following beneficial effects:
according to the embodiment scheme provided by the disclosure, a user grade list can be formulated according to the information of the authentication token, an interface grade list can be formulated according to the resource usage data parameters of the service interface, and after a service processing request is received, if the resource usage amount is greater than a first current limiting threshold value, whether the service processing request is executed or not can be determined according to the user grade list and the interface grade list. After the initial threshold of the flow limit is reached, the service interface with high priority and the user can be guaranteed to execute the service request preferentially, the maximum flow limit threshold of the service interface is used as the second flow limit threshold, and after the maximum threshold of the flow limit is reached, all the service processing requests are limited, so that the accuracy of flow control is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments or the conventional techniques of the present disclosure, the drawings required for the descriptions of the embodiments or the conventional techniques will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a diagram of an application environment for a flow control method in one embodiment;
FIG. 2 is a flow chart of a flow control method in one embodiment;
FIG. 3 is a flow diagram of a flow control method in one embodiment;
FIG. 4 is a block diagram of a flow control device in one embodiment;
FIG. 5 is a block diagram of a flow control device in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment;
fig. 7 is an internal structural diagram of a server in one embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, it is not excluded that additional identical or equivalent elements may be present in a process, method, article, or apparatus that comprises a described element. For example, if first, second, etc. words are used to indicate a name, but not any particular order.
The embodiment of the disclosure provides a flow control method, which can be applied to an application environment as shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In some embodiments of the present disclosure, as shown in fig. 2, a flow control method is provided, and the method is applied to the server in fig. 1 to process a service processing request for example. It will be appreciated that the method may be applied to a server, and may also be applied to a system comprising a terminal and a server, and implemented by interaction of the terminal and the server. In a specific embodiment, the method may include the steps of:
s202: and acquiring a service processing request comprising an authentication token, wherein the authentication token comprises at least one of user information and historical access times, and adding the authentication token into a preset user grade list according to the historical access times.
Before the server executes the service processing request sent by the client, the server can perform verification of the user information first, and after the user information passes the verification, the service processing request is executed. Generally, a client sends a login request to a server, the server verifies whether user information is correct after receiving the login request sent by the client, the user information may include an identity, a key, a name, and the like of a user, and if the user information is verified to be correct, an authentication token is generated and returned to the client. The authentication token may be stored in a cache, where the cache includes up-to-date user information, the user may send a service processing request multiple times, and the user information and the historical access times may be recorded in the authentication token. The authentication token may be added to a preset user class list based on the historical number of accesses.
S204: and analyzing the service processing request to obtain a service interface of the micro service node.
The micro service architecture may include a plurality of micro service nodes, each corresponding to one sub-service module, and the micro service nodes may be integrated with at least one service interface. Analyzing the service processing request, finding a sub-service module corresponding to the service processing request, namely a micro service node, and executing the service processing request through a service interface of the micro service node.
S206: and when the resource usage amount of the service processing request is larger than a first flow limiting threshold, receiving a user grade list and an interface grade list returned by the service interface to a local cache, wherein the interface grade list is determined according to the resource usage data parameters of each service interface in all preset micro service nodes.
The resource usage data parameter of the service interface may refer to a parameter reflecting the resource usage of the service interface, and may include, but is not limited to, a value including an average usage time of the central processing unit per unit time, an average value of a memory usage size per unit time, and an average value of a network bandwidth consumption per unit time. The resource usage data parameter may also refer to a parameter reflecting the capability of the service interface, and may include, but is not limited to, the following values, average processing time per unit time, interface reference response time, and number of invocations per unit time.
The throttling threshold of each service interface can be calculated according to the resource usage amount of each service interface of the micro service node, and an interface level list is formulated according to the throttling threshold of each service interface. And when the resource usage amount of the service processing request is larger than a first flow limiting threshold, receiving a user grade list and an interface grade list returned by the service interface to a local cache for judging whether to execute the service processing request.
S208: and if the user information in the service processing request is matched with the user grade list, the service interface is matched with the interface grade list, and the service processing request is executed.
The user information in the user level list changes along with the access times of the user, and if the priority of the user information in the service processing request in the user level list is higher, and the interface level list contains the service interface of the service processing request, the service processing request can be executed. It may be ensured that when the resource usage reaches the first current limit threshold, it is ensured that a majority of already in use users are able to continue to access the system.
In the above flow control method, a user level list may be formulated according to the information of the authentication token, an interface level list may be formulated according to the resource usage data parameter of the service interface, and after receiving the service processing request, if the resource usage amount is greater than the first current limit threshold, whether to execute the service processing request may be determined according to the user level list and the interface level list. After the initial threshold of the flow limit is reached, the service interface with high priority and the user can be guaranteed to execute the service request preferentially, and the flexibility of flow control is improved.
In some embodiments of the present disclosure, fig. 3 is a flow diagram of a flow control method in one embodiment, the method further comprising:
s302: when the resource usage amount of the service processing request is larger than a second current limiting threshold, the service interface intercepts the service processing request and returns current limiting prompt information to the client.
The maximum current limit threshold of each service interface can be calculated according to the average processing time consumption per unit time, the reference response time of the interface and the called times per unit time of each service interface, and the maximum current limit threshold of all the service interfaces can be used as the second current limit threshold. And when the resource usage amount of the service processing request is larger than the second current limiting threshold value, directly returning the prompting information of the server current limiting.
When the first current limiting threshold is reached, current limiting can be carried out according to a mode of mixing judgment of the user grade list and the interface grade list, and when the second current limiting threshold is reached, an indiscriminate current limiting mode can be adopted to reject all service processing requests. The service interface with high priority and the user use of resources can be ensured, and the accuracy of flow control is improved.
In some embodiments of the disclosure, the obtaining the interface class list includes:
calculating the interface weight of the service interface according to the resource use parameters of the micro service node and the service interface;
and sequencing the service interfaces according to the interface weights to obtain the interface grade list.
The micro service architecture comprises a plurality of micro service nodes, each micro service node corresponds to one sub-service module, and the micro service nodes can be integrated with at least one service interface. And calculating the interface weight of each service interface according to the service level of the micro service node and the interface level of each service interface in the micro service node. The service level of the micro service node may be used to reflect the importance level of the micro service node, and the interface level of the service interface may be used to reflect the importance level of the service interface. The service interfaces in the interface class list are arranged in sequence according to the priority.
In some embodiments of the present disclosure, the method further comprises:
acquiring user information according to the authentication token, and acquiring access right information of a user through the user information, wherein the access right information comprises an interface address list which can be accessed by the user;
and if the service interface in the service processing request is not in the interface address list, the service interface intercepts the service processing request.
The user can initiate a service processing request, call a service interface to execute a task, the interface can acquire access right information of the user according to information of an authentication token in the service processing request, the access right information can comprise an interface address list which can be accessed by the user, and if the interface address list does not comprise a service interface address in the service processing request, the service interface cannot execute the service processing request, and error information can be returned to the client to remind the user.
In some embodiments of the present disclosure, the first current limit threshold and the second current limit threshold are determined according to a resource usage parameter of the service node.
The resource usage data parameters of each service interface in the micro service node can be obtained, the current limiting threshold of each service interface is calculated, and the first current limiting threshold can be formulated according to the current limiting threshold and the current limiting requirement of each service interface. And taking the maximum current limiting threshold value in all the service interfaces as a second current limiting threshold value, and refusing to execute the service processing request by the service interface if the resource usage reaches the second current limiting threshold value.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiments of the present disclosure also provide a flow control device for implementing the above-mentioned flow control method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitation in the embodiments of the flow control device provided below may be referred to the limitation of the flow control method hereinabove, and will not be repeated here.
The apparatus may comprise a system (including a distributed system), software (applications), modules, components, servers, clients, etc. that employ the methods described in the embodiments of the present specification in combination with the necessary apparatus to implement the hardware. Based on the same innovative concepts, embodiments of the present disclosure provide for devices in one or more embodiments as described in the following examples. Because the implementation scheme and the method for solving the problem by the device are similar, the implementation of the device in the embodiment of the present disclosure may refer to the implementation of the foregoing method, and the repetition is not repeated. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
In one embodiment, as shown in fig. 4, a flow control apparatus 400 is provided, which may be the aforementioned server, or a module, assembly, device, unit, etc. integrated with the server. The apparatus 400 may include:
a generating module 402, configured to obtain a service processing request including an authentication token, where the authentication token includes at least one of user information and a historical access number, and add the authentication token to a preset user class list according to the historical access number;
the parsing module 404 is configured to parse the service processing request to obtain a service interface of the micro service node;
a judging module 406, configured to receive, when the resource usage amount of the service processing request is greater than a first current limiting threshold, a user level list and an interface level list returned by the service interface to a local cache, where the interface level list is determined according to resource usage data parameters of each service interface in all preset micro service nodes;
and the matching module 408 is configured to execute the service processing request if the user information in the service processing request matches the user class list and the service interface matches the interface class list.
In one embodiment, fig. 5 is a block diagram of a flow control device in one embodiment, the device further comprising:
and the interception module 502 is configured to intercept the service processing request and return the current limiting prompt information to the client when the resource usage amount of the service processing request is greater than the second current limiting threshold.
In one embodiment, the obtaining the interface level list includes:
calculating the interface weight of the service interface according to the resource use parameters of the micro service node and the service interface;
and sequencing the service interfaces according to the interface weights to obtain the interface grade list.
In one embodiment, the apparatus further comprises:
acquiring user information according to the authentication token, and acquiring access right information of a user through the user information, wherein the access right information comprises an interface address list which can be accessed by the user;
and if the service interface in the service processing request is not in the interface address list, the service interface intercepts the service processing request.
In one embodiment, the first current limit threshold and the second current limit threshold are determined according to a resource usage parameter of the service node.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The various modules described above for the flow control device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store business process requests. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a flow control method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a flow control method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the structures shown in fig. 6 and 7 are merely block diagrams of partial structures related to the disclosed aspects and do not constitute a limitation of the computer device on which the disclosed aspects are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, implements the method of any of the embodiments of the present disclosure.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method described in any of the embodiments of the present disclosure.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided by the present disclosure may include at least one of non-volatile and volatile memory, among others. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided by the present disclosure may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors involved in the embodiments provided by the present disclosure may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic, quantum computing-based data processing logic, etc., without limitation thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples have expressed only a few embodiments of the present disclosure, which are described in more detail and detail, but are not to be construed as limiting the scope of the present disclosure. It should be noted that variations and modifications can be made by those skilled in the art without departing from the spirit of the disclosure, which are within the scope of the disclosure. Accordingly, the scope of the present disclosure should be determined from the following claims.

Claims (10)

1. A method of flow control, the method comprising:
acquiring a service processing request comprising an authentication token, wherein the authentication token comprises at least one of user information and historical access times, and adding the authentication token into a preset user grade list according to the historical access times;
analyzing the service processing request to obtain a service interface of the micro service node;
when the resource usage amount of the service processing request is larger than a first current limiting threshold, receiving a user grade list and an interface grade list returned by the service interface to a local cache, wherein the interface grade list is determined according to the resource usage data parameters of each service interface in all preset micro service nodes;
and if the user information in the service processing request is matched with the user grade list, the service interface is matched with the interface grade list, and the service processing request is executed.
2. The method according to claim 1, wherein the method further comprises:
when the resource usage amount of the service processing request is larger than a second current limiting threshold, the service interface intercepts the service processing request and returns current limiting prompt information to the client.
3. The method according to claim 1, wherein the obtaining the interface class list includes:
calculating the interface weight of the service interface according to the resource use parameters of the micro service node and the service interface;
and sequencing the service interfaces according to the interface weights to obtain the interface grade list.
4. The method according to claim 1, wherein the method further comprises:
acquiring user information according to the authentication token, and acquiring access right information of a user through the user information, wherein the access right information comprises an interface address list which can be accessed by the user;
and if the service interface in the service processing request is not in the interface address list, the service interface intercepts the service processing request.
5. The method of claim 2, wherein the first current limit threshold and the second current limit threshold are determined based on a resource usage parameter of the serving node.
6. A flow control device, the device comprising:
the generation module is used for acquiring a service processing request comprising an authentication token, wherein the authentication token comprises at least one of user information and historical access times, and the authentication token is added into a preset user grade list according to the historical access times;
the analysis module is used for analyzing the service processing request to obtain a service interface of the micro service node;
the judging module is used for receiving a user grade list and an interface grade list returned by the service interface to a local cache when the resource usage amount of the service processing request is larger than a first current limiting threshold, wherein the interface grade list is determined according to the resource usage data parameters of each service interface in all preset micro service nodes;
and the matching module is used for executing the service processing request if the user information in the service processing request is matched with the user grade list and the service interface is matched with the interface grade list.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the interception module is used for intercepting the service processing request by the service interface and returning the flow limiting prompt information to the client when the resource usage amount of the service processing request is larger than a second flow limiting threshold.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the flow control method of any one of claims 1 to 5 when the computer program is executed.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the flow control method of any of claims 1 to 5.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the flow control method according to any one of claims 1 to 5.
CN202310534505.5A 2023-05-12 2023-05-12 Flow control method and device and computer equipment Pending CN116489089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310534505.5A CN116489089A (en) 2023-05-12 2023-05-12 Flow control method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310534505.5A CN116489089A (en) 2023-05-12 2023-05-12 Flow control method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN116489089A true CN116489089A (en) 2023-07-25

Family

ID=87215708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310534505.5A Pending CN116489089A (en) 2023-05-12 2023-05-12 Flow control method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116489089A (en)

Similar Documents

Publication Publication Date Title
US9691035B1 (en) Real-time updates to item recommendation models based on matrix factorization
US9137304B2 (en) Method and apparatus for achieving data security in a distributed cloud computing environment
US20130291121A1 (en) Cloud Abstraction
CN116991800A (en) File acquisition system, method, device, computer equipment and storage medium
CN116489089A (en) Flow control method and device and computer equipment
US9569433B1 (en) Mobile application analytics
CN117453759B (en) Service data processing method, device, computer equipment and storage medium
US20130339502A1 (en) Techniques to manage transitions between private and public networks
CN116561735B (en) Mutual trust authentication method and system based on multiple authentication sources and electronic equipment
US11907230B1 (en) System and method for distributed management of hardware based on intent
CN117082135A (en) Service transmission method, device, computer equipment and storage medium
CN116933244A (en) Request processing method, device, terminal, server and computer program product
CN117880100A (en) Resource determination method, device, computer equipment, medium and product
CN117436888A (en) Payment service processing method, device, computer equipment and storage medium
CN117349826A (en) Page login method and device, computer equipment and storage medium
CN116894499A (en) Resource reservation method, device, computer equipment and storage medium
CN116938535A (en) Identification method and device of common equipment and computer equipment
CN117349559A (en) Page display method and device, computer equipment and storage medium
CN116910115A (en) Group query method, device, computer equipment and storage medium
CN117149371A (en) Resource borrowing method, resource borrowing device, computer equipment, storage medium and program product
CN117149404A (en) Method, device, computer equipment and storage medium for allocating detection task resources
CN118018552A (en) Cluster service deployment method and device based on middleware and computer equipment
CN117312653A (en) Service policy determination method, device, computer equipment and storage medium
CN116938836A (en) Resource processing method and device and computer equipment
CN116245637A (en) Variable generation method, device, computer equipment and storage medium

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