CN111817972A - Flow limiting method for flow interface of logistics service system and related equipment - Google Patents

Flow limiting method for flow interface of logistics service system and related equipment Download PDF

Info

Publication number
CN111817972A
CN111817972A CN202010545753.6A CN202010545753A CN111817972A CN 111817972 A CN111817972 A CN 111817972A CN 202010545753 A CN202010545753 A CN 202010545753A CN 111817972 A CN111817972 A CN 111817972A
Authority
CN
China
Prior art keywords
logistics service
service request
time period
current time
flow
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.)
Granted
Application number
CN202010545753.6A
Other languages
Chinese (zh)
Other versions
CN111817972B (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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network 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 Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202010545753.6A priority Critical patent/CN111817972B/en
Publication of CN111817972A publication Critical patent/CN111817972A/en
Application granted granted Critical
Publication of CN111817972B publication Critical patent/CN111817972B/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/11Identifying congestion
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/127Avoiding congestion; Recovering from congestion by using congestion prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a flow limiting method of a flow interface of a logistics service system and related equipment, wherein the flow limiting method of the flow interface of the logistics service system comprises the following steps: when a logistics business request sent by a client is received, detecting whether a flow interface to be called is added with a custom annotation class; if the user-defined annotation class is added, acquiring the times of the logistics service requests responded in the current time period; judging whether the acquired times reach the preset maximum times of the current time period or not; if the preset maximum times are reached, refusing to respond to the currently sent logistics service request, and sending prompt information to the client; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period. Therefore, the influence of excessive system access on the system running speed is avoided, the occurrence of the concurrency of the logistics service request and the long-time waiting of the client for the response request are also avoided, and the interference to the conventional logistics service is reduced.

Description

Flow limiting method for flow interface of logistics service system and related equipment
Technical Field
The application relates to the technical field of lighting, in particular to a current limiting method for a flow interface of a logistics service system and related equipment.
Background
Because the service system faces to the Internet C-end user, in order to prevent the data from exceeding the maximum load of the system and dragging down the system under the condition of instantaneous high concurrency, the data request needs to be controlled during the design of an outer-layer API, and besides common newly-added hardware configuration, a plurality of mature schemes such as shunting, degrading and current limiting also appear in the design of the API; common current limiting algorithms include a leaky bucket algorithm and a token bucket algorithm.
However, although the leaky bucket algorithm can forcibly limit the transmission rate of data, it cannot cope with the high concurrent transmission of burst data in some service scenarios; tokens in the token bucket algorithm are filled at a constant rate, and if a data request needs to be processed, a token needs to be first obtained from the bucket, which makes the token bucket algorithm allow for the high concurrent transmission of data burst in some traffic scenarios, but such transmission requires enough tokens in the bucket, and once there are not enough tokens in the bucket, service is denied.
Disclosure of Invention
In view of the above, an object of the present application is to overcome the deficiencies of the prior art, and to provide a method and a related device for limiting a flow of a traffic interface of a logistics service system.
In order to achieve the purpose, the following technical scheme is adopted in the application:
a first aspect of the present application provides a method for limiting a flow of a flow interface of a logistics service system, including:
when a logistics business request sent by a client is received, detecting whether a flow interface to be called is added with a custom annotation class;
if the user-defined annotation class is added, acquiring the times of the logistics service request responded in the current time period;
judging whether the acquired times reach the preset maximum times of the current time period or not;
if the preset maximum times are reached, refusing to respond to the currently sent logistics service request, and sending prompt information to the client; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period.
Optionally, the logistics service request includes identification information of a user.
Optionally, before detecting whether the flow interface to be called adds the custom annotation class, the method further includes:
acquiring identification information of the user from the logistics service request;
matching the identification information of the user with pre-stored user identification information, and responding to the currently sent logistics service request if the matching is consistent; and if the matching is inconsistent, continuing to perform subsequent operations.
Optionally, the custom annotation class includes an AccessLimit annotation class.
Optionally, the AccessLimit annotation class includes the following configuration parameters: key, period, and count; the key is the only identification of the flow interface; the method further comprises the following steps: recording the current time period according to the period value; recording the preset maximum times according to the value of the count; through the key, the period, the count and the number of times of the logistics service request responded in the current time period can be obtained;
the obtaining of the number of times of the logistics service request responded in the current time period includes:
and obtaining the preset maximum times and the times of the logistics service requests responded in the current time period from the access limit annotation class.
Optionally, after detecting whether the flow interface to be called adds the custom annotation class, the method further includes:
and if the user-defined annotation class is not added, responding to the currently sent logistics service request.
Optionally, the prompt message includes a voice message and/or a text message.
A second aspect of the present application provides a flow limiting device for a flow interface of a logistics service system, including:
the detection module is used for detecting whether a flow interface to be called is added with a custom annotation class when a logistics service request sent by a client is received;
the acquisition module is used for acquiring the times of the logistics service requests responded in the current time period if the user-defined annotation class is added;
the judging module is used for judging whether the acquired times reach the preset maximum times of the current time period or not;
the execution module is used for refusing to respond to the currently sent logistics service request and sending prompt information to the client if the preset maximum times are reached; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period.
A third aspect of the present application provides a flow limiting device for a flow interface of a logistics service system, including:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program;
the processor is configured to invoke and execute the computer program in the memory to perform the method according to the first aspect of the application.
A fourth aspect of the present application provides a storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the method for limiting a flow of a traffic interface of a logistics service system according to the first aspect of the present application are implemented.
The technical scheme provided by the application can comprise the following beneficial effects:
in the scheme of the application, after detecting whether the flow interface to be called is added with the self-defined annotation class, for the flow interface added with the custom annotation class, when the logistics service request is received, the times of the logistics request responded in the current time period can be obtained by obtaining the configuration parameters in the custom annotation class, by judging whether the acquired times reach the preset maximum times of the current time period, whether to refuse to respond to the current logistics service request in the current time period can be obtained, if the obtained times reach the preset maximum times of the current time period, the corresponding currently sent logistics service request is rejected and the client is prompted, and if the acquired times do not reach the preset maximum times, responding to the currently sent logistics service request and updating the times of the logistics service request responded in the current time period. Therefore, only the user-defined annotation class needs to be added to the flow interface in a script adding mode, and the configuration parameters are set, so that the flow limitation of the logistics service request can be realized, the problem that too much calling service is caused due to too much system access amount so as to influence the system running speed is avoided, the long-time waiting response of the client side is also avoided, the interference to the existing logistics service is reduced, the added script can be executed as a whole, the execution process cannot be interfered by other commands, the occurrence of the concurrency condition of the logistics service request is avoided, and in addition, the multiplexing function of the script can enable the flow limitation mode to be also suitable for other client sides.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for limiting a flow of a traffic interface of a logistics service system according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a current limiting device of a flow interface of a logistics service system according to another embodiment of the present application.
Fig. 3 is a schematic structural diagram of a flow limiting device of a flow interface of a logistics service system according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Examples
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for limiting a flow of a traffic interface of a logistics service system according to an embodiment of the present application.
As shown in fig. 1, this embodiment provides a method for limiting a flow of a traffic interface of a logistics service system, where the method at least includes the following steps:
and step 11, when a logistics service request sent by a client is received, detecting whether a flow interface to be called is added with a custom annotation class.
And step 12, if the user-defined annotation class is added, acquiring the times of the logistics service requests responded in the current time period.
And step 13, judging whether the acquired times reach the preset maximum times of the current time period.
Step 14, if the preset maximum times are reached, refusing to respond to the currently sent logistics service request, and sending a prompt message to the client; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period.
In the embodiment, after detecting whether the flow interface to be called is added with the custom annotation class, for the flow interface added with the custom annotation class, when the logistics service request is received, the times of the logistics request responded in the current time period can be obtained by obtaining the configuration parameters in the custom annotation class, by judging whether the acquired times reach the preset maximum times of the current time period, whether to refuse to respond to the current logistics service request in the current time period can be obtained, if the obtained times reach the preset maximum times of the current time period, the corresponding currently sent logistics service request is rejected and the client is prompted, and if the acquired times do not reach the preset maximum times, responding to the currently sent logistics service request and updating the times of the logistics service request responded in the current time period. Therefore, only the user-defined annotation class needs to be added to the flow interface in a script adding mode, and the configuration parameters are set, so that the flow limitation of the logistics service request can be realized, the problem that too much calling service is caused due to too much system access amount so as to influence the system running speed is avoided, the long-time waiting response of the client side is also avoided, the interference to the existing logistics service is reduced, the added script can be executed as a whole, the execution process cannot be interfered by other commands, the occurrence of the concurrency condition of the logistics service request is avoided, and in addition, the multiplexing function of the script can enable the flow limitation mode to be also suitable for other client sides.
The logistics service request carries identification information of a user of the client.
In some embodiments, in order to deal with some special users and avoid that the access of the special users is limited, before detecting whether the flow interface to be invoked adds the custom annotation class in step 11, the method for limiting the flow of the flow interface of the logistics service system may further include:
acquiring identification information of a user from a logistics service request;
matching the identification information of the user with pre-stored user identification information, and responding to the currently sent logistics service request if the matching is consistent; and if the matching is inconsistent, continuing to perform subsequent operations.
The identification information of the user is unique identity information of the user, and may include, but is not limited to, an ID number, a user name, and the like.
In specific implementation, after a logistics service request sent by a client is received, identification information of a user at the client side is obtained from the logistics service request, the identification information of the user is matched with pre-stored user identification information, if information which is consistent with the identification information of the user exists in the pre-stored user identification information, the matching is consistent, the user does not need to be limited in current, and the currently sent logistics service request can be directly responded; if the pre-stored user identification information does not contain information consistent with the identification information of the user, the matching is not consistent, and then the subsequent operation is continuously executed. For example, a membership system may be implemented for users, access to users who are members may not be restricted, and access to non-member users may be restricted appropriately, so as to avoid high access concurrence and guarantee user experience of some users.
In some embodiments, the custom annotation class may include, but is not limited to, the AccessLimit annotation class.
The AccessLimit annotation class includes the following configuration parameters: key, period, and count; the key is the only identification of the flow interface; wherein, the current time period can be recorded through the period value; the preset maximum times can be recorded through the value of the count; through the key, period, count and the number of times of the logistics service request responded in the current time period can be acquired.
In step 12, the obtaining of the number of times of the logistics service request that has been responded in the current time period may specifically include: and obtaining the preset maximum times and the times of the logistics service requests responded in the current time period from the Access Limit annotation class.
In specific implementation, an interceptor mechanism of the framework is used for detecting before accessing each traffic interface to acquire whether the traffic interface uses an AccessLimit annotation class, if the annotation class is detected, the traffic interface is indicated to be required to be subjected to current limiting control, and the annotation comprises three configuration parameters: key, period, and count; the period and the count can be set according to requirements, the key is generated according to the business rule, when a logistics business request is received, the unique key can be obtained according to the Access Limit annotation class, the key is the unique identifier of the flow interface, and then the number of times of access corresponding to the key is obtained. For example, period is 3 seconds, count is 1000 times, the annotation means that 1000 times of access can be performed within 3 seconds, when a logistics service request is received within 3 seconds for the 16 th time, a unique key is obtained first, then a preset maximum number of times of 1000 is obtained, the number of times 15 of the logistics service request which has been responded in the current time period and corresponds to the key is obtained, 15 is less than 1000, the traffic interface does not limit the current logistics service request, and after the current logistics service request is responded, the logistics service request which has been responded in the current time period is updated, that is, 15 is updated to 16. Therefore, the sudden high concurrent transmission condition in the process of processing the logistics service request by the logistics service system is avoided, and the long-time waiting processing after the client sends the request is also avoided.
In some embodiments, after detecting whether the flow interface to be called adds the custom annotation class, the method for limiting the flow of the flow interface of the logistics service system may further include: and if the custom annotation class is not added, responding to the currently sent logistics service request. Therefore, for the interface without adding the user-defined annotation class, the current limiting is not needed, and the flexible current limiting setting ensures the good operation of the logistics business system and ensures the user experience.
In some embodiments, the prompt message may include, but is not limited to, an audio message and/or a text message.
In specific implementation, when the flow interface refuses to respond to the currently sent logistics service request, the flow interface can send text information and/or sound information to the client so as to remind the client that the current access is limited, and the client can try again later. For example, a small dialog window is sent, the text prompts "currently access restricted, please try again after 1 minute".
Referring to fig. 2, fig. 2 is a schematic structural diagram of a current limiting device of a flow interface of a logistics service system according to another embodiment of the present application.
As shown in fig. 2, the present embodiment provides a flow limiting device for a flow interface of a logistics service system, where the device may include:
the detection module 201 is configured to detect whether a flow interface to be called is added with a custom annotation class when a logistics service request sent by a client is received;
an obtaining module 202, configured to obtain, if a custom annotation class is added, the number of times that a logistics service request has been responded in a current time period;
the judging module 203 is configured to judge whether the obtained times reach a preset maximum time of the current time period;
the execution module 204 is configured to refuse to respond to the currently sent logistics service request and send a prompt message to the client if the preset maximum number of times is reached; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period.
Optionally, the logistics service request includes identification information of the user.
Optionally, before detecting whether the flow interface to be called adds the custom annotation class, the detection module may be further configured to:
acquiring identification information of a user from a logistics service request;
matching the identification information of the user with pre-stored user identification information, and responding to the currently sent logistics service request if the matching is consistent; and if the matching is inconsistent, continuing to perform subsequent operations.
Optionally, the custom annotation class includes an AccessLimit annotation class.
Optionally, the AccessLimit annotation class includes the following configuration parameters: key, period, and count; the method further comprises the following steps: recording the current time period through the period value; recording the preset maximum times according to the value of the count; recording the number of times of the logistics service request responded in the current time period through the value of the key;
the obtaining of the number of times of the logistics service request that has been responded in the current time period may specifically include:
and obtaining the times of the logistics service requests responded in the current time period from the Access Limit annotation class.
Optionally, after detecting whether the flow interface to be called is added with the custom annotation class, the obtaining module may be further configured to:
and if the custom annotation class is not added, responding to the currently sent logistics service request.
Optionally, the prompt message includes a voice message and/or a text message.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a current limiting device of a traffic interface of a logistics service system according to another embodiment of the present application.
As shown in fig. 3, this embodiment provides a flow limiting device for a flow interface of a logistics service system, where the device may include:
a processor 301, and a memory 302 connected to the processor 301;
the memory 302 is used to store computer programs;
the processor 301 is configured to call and execute a computer program in the memory 302 to execute the flow limiting method of the logistics service system traffic interface according to any of the above embodiments.
For a specific implementation of the flow limiting device for a flow interface of a logistics service system provided in the embodiment of the present application, reference may be made to the implementation of the flow limiting method for a flow interface of a logistics service system described in any of the above embodiments, and details are not described here again.
The present embodiment provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the method for limiting a flow of a traffic interface of a logistics service system according to any of the above embodiments are implemented.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A flow limiting method for a flow interface of a logistics service system is characterized by comprising the following steps:
when a logistics business request sent by a client is received, detecting whether a flow interface to be called is added with a custom annotation class;
if the user-defined annotation class is added, acquiring the times of the logistics service request responded in the current time period;
judging whether the acquired times reach the preset maximum times of the current time period or not;
if the preset maximum times are reached, refusing to respond to the currently sent logistics service request, and sending prompt information to the client; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period.
2. The method of claim 1, wherein the request for logistics service includes identification information of a user.
3. The method of claim 2, wherein before detecting whether the flow interface to be called adds the custom annotation class, the method further comprises:
acquiring identification information of the user from the logistics service request;
matching the identification information of the user with pre-stored user identification information, and responding to the currently sent logistics service request if the matching is consistent; and if the matching is inconsistent, continuing to perform subsequent operations.
4. The method of claim 1, wherein the custom annotation class comprises an AccessLimit annotation class.
5. The method of claim 4, wherein the Access Limit annotation class comprises the following configuration parameters: key, period, and count; the key is the only identification of the flow interface; the method further comprises the following steps: recording the current time period according to the period value; recording the preset maximum times according to the value of the count; through the key, the period, the count and the number of times of the logistics service request responded in the current time period can be obtained;
the obtaining of the number of times of the logistics service request responded in the current time period includes:
and obtaining the preset maximum times and the times of the logistics service requests responded in the current time period from the access limit annotation class.
6. The method for limiting flow of a traffic interface of a logistics service system according to claim 1, wherein after detecting whether the flow interface to be called adds the custom annotation class, the method further comprises:
and if the user-defined annotation class is not added, responding to the currently sent logistics service request.
7. The method of claim 1, wherein the prompt message comprises a voice message and/or a text message.
8. A flow limiting device for a flow interface of a logistics service system is characterized by comprising:
the detection module is used for detecting whether a flow interface to be called is added with a custom annotation class when a logistics service request sent by a client is received;
the acquisition module is used for acquiring the times of the logistics service requests responded in the current time period if the user-defined annotation class is added;
the judging module is used for judging whether the acquired times reach the preset maximum times of the current time period or not;
the execution module is used for refusing to respond to the currently sent logistics service request and sending prompt information to the client if the preset maximum times are reached; and if the preset maximum times are not reached, responding to the currently sent logistics service request, and updating the times of the logistics service request responded in the current time period.
9. A flow limiting device for a flow interface of a logistics service system, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program;
the processor is configured to invoke and execute the computer program in the memory to perform the method of any of claims 1-7.
10. A storage medium, characterized in that the storage medium stores a computer program, which when executed by a processor, implements the steps of the method for throttling a flow of a logistics service system traffic interface according to any of claims 1 to 7.
CN202010545753.6A 2020-06-16 2020-06-16 Flow limiting method and related equipment for flow interface of logistics service system Active CN111817972B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010545753.6A CN111817972B (en) 2020-06-16 2020-06-16 Flow limiting method and related equipment for flow interface of logistics service system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010545753.6A CN111817972B (en) 2020-06-16 2020-06-16 Flow limiting method and related equipment for flow interface of logistics service system

Publications (2)

Publication Number Publication Date
CN111817972A true CN111817972A (en) 2020-10-23
CN111817972B CN111817972B (en) 2023-08-11

Family

ID=72846197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010545753.6A Active CN111817972B (en) 2020-06-16 2020-06-16 Flow limiting method and related equipment for flow interface of logistics service system

Country Status (1)

Country Link
CN (1) CN111817972B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333111A (en) * 2020-11-05 2021-02-05 广东科徕尼智能科技有限公司 System dynamic current limiting method, equipment and storage medium
CN115396375A (en) * 2022-08-17 2022-11-25 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7826364B1 (en) * 2006-02-09 2010-11-02 Verizon Services Corp. Dynamic service-aware flow control in packet networks
CN103546388A (en) * 2012-07-10 2014-01-29 阿里巴巴集团控股有限公司 Flow control method and flow control device
US20160292017A1 (en) * 2013-12-13 2016-10-06 Beijing Jingdong Shangke Information Technology Co, Ltd. Traffic control method and system
CN109842565A (en) * 2018-12-15 2019-06-04 平安科技(深圳)有限公司 Interface current-limiting method, device, electronic equipment and storage medium
CN109962855A (en) * 2017-12-14 2019-07-02 深圳市融汇通金科技有限公司 A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7826364B1 (en) * 2006-02-09 2010-11-02 Verizon Services Corp. Dynamic service-aware flow control in packet networks
CN103546388A (en) * 2012-07-10 2014-01-29 阿里巴巴集团控股有限公司 Flow control method and flow control device
US20160292017A1 (en) * 2013-12-13 2016-10-06 Beijing Jingdong Shangke Information Technology Co, Ltd. Traffic control method and system
CN109962855A (en) * 2017-12-14 2019-07-02 深圳市融汇通金科技有限公司 A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device
CN109842565A (en) * 2018-12-15 2019-06-04 平安科技(深圳)有限公司 Interface current-limiting method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
架构攻城之路: "高并发Java秒杀系统优化(三)--接口限流防刷", 《CSDN 网址:HTTPS://BLOG.CSDN.NET/A1036645146/ARTICLE/DETAILS/105452922 》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333111A (en) * 2020-11-05 2021-02-05 广东科徕尼智能科技有限公司 System dynamic current limiting method, equipment and storage medium
CN115396375A (en) * 2022-08-17 2022-11-25 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment
CN115396375B (en) * 2022-08-17 2024-02-27 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment

Also Published As

Publication number Publication date
CN111817972B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
US11563739B2 (en) Authenticating a user device via a monitoring device
CN111030936B (en) Current-limiting control method and device for network access and computer-readable storage medium
JP6441911B2 (en) Method and system for distinguishing between human and machine
US8295448B2 (en) Communication system and method
US10931821B2 (en) Call data management platform
CN110505141B (en) Instant messaging message processing method and device, readable medium and electronic equipment
CN111817972A (en) Flow limiting method for flow interface of logistics service system and related equipment
US10623450B2 (en) Access to data on a remote device
CN109726533B (en) User account judgment method and device
US11019004B1 (en) System, method, and computer program for performing bot engine abstraction
CN104836878A (en) Method, device and system for outputting prompt in communication process
US11158315B2 (en) Secure speech recognition
US11526559B2 (en) Content filtering based on user state
KR101716690B1 (en) Unauthorized data access blocking method and computing apparatus having Unauthorized data access blocking function
CN104394264B (en) A kind of method and system preventing recording from interrupting
CN115828256A (en) Unauthorized and unauthorized logic vulnerability detection method
CN112543186B (en) Network behavior detection method and device, storage medium and electronic equipment
US11676599B2 (en) Operational command boundaries
CN115187364A (en) Method and device for monitoring deposit risk under bank distributed scene
CN104834846A (en) Equipment unlocking method and device
US11071484B2 (en) Reduce electromagnetic frequency emissions from a mobile device
CN107547345A (en) A kind of VXLAN dynamic access methods, device, equipment and medium
CN113840029A (en) Abnormal call state identification method and device
CN113536292A (en) Cloud mobile phone application starting control method, related device and computer program product
CN116155615A (en) Branch institution risk verification method, device and equipment

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