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

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

Info

Publication number
CN111817972B
CN111817972B CN202010545753.6A CN202010545753A CN111817972B CN 111817972 B CN111817972 B CN 111817972B CN 202010545753 A CN202010545753 A CN 202010545753A CN 111817972 B CN111817972 B CN 111817972B
Authority
CN
China
Prior art keywords
logistics service
service request
time period
flow
current time
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
CN202010545753.6A
Other languages
Chinese (zh)
Other versions
CN111817972A (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

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

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 receiving a logistics service request sent by a client, detecting whether a user-defined annotation class is added to a flow interface to be called; if the custom annotation class is added, acquiring the number of times of the logistics service request responded in the current time period; judging whether the acquired times reach the preset maximum times in the current time period or not; if the preset maximum times are reached, refusing to respond to the current transmitted logistics service request, and sending prompt information to the client; if the number of times of the logistics service request is not up to the preset maximum number of times, responding to the logistics service request sent currently, and updating the number of 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 concurrency of logistics service requests and long-time response request waiting of clients are also avoided, and the interference to the existing logistics service is reduced.

Description

Flow limiting method and related equipment for flow interface of logistics service system
Technical Field
The application relates to the technical field of illumination, in particular to a flow limiting method of a flow interface of a logistics business system and related equipment.
Background
Because the service system faces to the C-terminal user of the Internet, in order to prevent the system from being towed down due to the fact that data exceeds the maximum load of the system under the condition of instantaneous high concurrency, the data request needs to be controlled when the outer layer API is designed, and besides the common newly-added hardware configuration, a plurality of more mature schemes such as diversion, degradation and current limiting appear on the design of the API; among them, the common current limiting algorithms include a leaky bucket algorithm and a token bucket algorithm.
However, the leaky bucket algorithm can forcedly limit the transmission rate of data, but cannot cope with high concurrent transmission of data burst in certain service scenes; token bucket algorithms are filled at a constant rate and, if data requests need to be processed, it is necessary to first obtain a token from the bucket, which makes the token bucket algorithm allow for high concurrent transmission of bursty data in certain traffic scenarios, but such transmission requires enough tokens in the bucket and, once there is insufficient token in the bucket, denies service.
Disclosure of Invention
In view of the above, the present application aims to overcome the defects of the prior art, and provide a flow limiting method and related equipment for a flow interface of a logistics service system.
In order to achieve the above purpose, the application adopts the following technical scheme:
the first aspect of the present application provides a flow limiting method for a flow interface of a logistics business system, comprising:
when receiving a logistics service request sent by a client, detecting whether a user-defined annotation class is added to a flow interface to be called;
if the custom annotation class is added, acquiring the number of 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 current transmitted logistics service request, and transmitting prompt information to the client; and if the preset maximum times are not reached, responding to the current transmitted logistics service request, and updating the times of the logistics service request responded in the current time period.
Optionally, the logistic service request includes identification information of the user.
Optionally, before the detecting whether the custom annotation class is added to the flow interface to be invoked, the method further includes:
acquiring the identification information of the user from the logistics service request;
matching the user identification information with pre-stored user identification information, and if the user identification information is matched with the pre-stored user identification information, responding to a current transmitted logistics service request; if the matching is inconsistent, continuing the subsequent operation.
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 a unique identifier of the flow interface; the method further comprises the steps of: recording the current time period through the period value; recording the preset maximum times through the value of the count; the number of times of the logistic service requests responded by the period, the count and the current time period can be obtained through the key;
the step of obtaining the number of times of the logistic service requests responded in the current time period comprises the following steps:
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 the detecting whether the custom annotation class is added to the flow interface to be invoked, the method further includes:
and if the custom annotation class is not added, responding to the current transmitted logistics service request.
Optionally, the prompt information includes sound information and/or text information.
A second aspect of the present application provides a flow restriction device for a flow interface of a logistic service system, including:
the detection module is used for detecting whether a custom annotation class is added to a flow interface to be called or not when a logistics service request sent by a client is received;
the acquisition module is used for acquiring the number of times of the logistics business request responded in the current time period if the custom 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;
the execution module is used for refusing to respond to the current 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 current transmitted 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 restricting device for a flow interface of a logistics business system, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program;
the processor is adapted 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 storing a computer program which, when executed by a processor, implements the steps of the flow restricting method of the flow interface of the logistics business system according to the first aspect of the present application.
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 custom annotation class, when receiving the logistics service request, the flow interface added with the custom annotation class can acquire the number of times of the logistics request responded in the current time period by acquiring the configuration parameters in the custom annotation class, and whether to reject the current logistics service request in the current time period can be acquired by judging whether the acquired number of times reaches the preset maximum number of times of the current time period, if the acquired number of times reaches the preset maximum number of times of the current time period, the corresponding current logistics service request is rejected and the client is prompted, and if the acquired number of times does not reach the preset maximum number of times, the current logistics service request transmitted at present can be responded and the number of times of the logistics service request responded in the current time period is updated. Therefore, the flow interface is only required to add the custom annotation class 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 the system operation speed is affected due to too much calling service caused by too much system access is avoided, the long-time waiting response of the client is also avoided, the interference to the existing logistics service is reduced, the added script can be executed as a whole, the interference of other commands in the execution process is avoided, 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 clients.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a flow limiting method of a flow interface of a logistics business system according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a flow limiting device of a flow interface of a logistic 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 will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, based on the examples herein, which are within the scope of the application as defined by the claims, will be within the scope of the application as defined by the claims.
Examples
Referring to fig. 1, fig. 1 is a flowchart of a flow limiting method of a flow interface of a logistics service system according to an embodiment of the present application.
As shown in fig. 1, this embodiment provides a flow limiting method for a flow interface of a logistics service system, which at least includes the following steps:
and step 11, detecting whether a custom annotation class is added to a flow interface to be called or not when a logistics service request sent by a client is received.
And step 12, if the custom annotation class is added, acquiring the number of times of the logistics service request responded in the current time period.
And step 13, judging whether the acquired times reach the preset maximum times in the current time period.
Step 14, if the preset maximum times are reached, refusing to respond to the current transmitted logistics service request, and transmitting prompt information to the client; if the number of times of the logistics service request is not up to the preset maximum number of times, responding to the logistics service request sent currently, and updating the number of times of the logistics service request responded in the current time period.
In this embodiment, after detecting whether a custom annotation class is added to a flow interface to be invoked, for the flow interface to which the custom annotation class is added, when a logistics service request is received, the number of times of responding logistics service requests in a current time period can be obtained by obtaining configuration parameters in the custom annotation class, whether to reject the response to the current logistics service requests in the current time period can be obtained by judging whether the obtained number of times reaches a preset maximum number of times in the current time period, if the obtained number of times reaches the preset maximum number of times in the current time period, the corresponding current logistics service requests sent at present are rejected and the client is prompted, and if the obtained number of times does not reach the preset maximum number of times, the current logistics service requests sent at present can be responded and the number of times of responding logistics service requests in the current time period is updated. Therefore, the flow interface is only required to add the custom annotation class 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 the system operation speed is affected due to too much calling service caused by too much system access is avoided, the long-time waiting response of the client is also avoided, the interference to the existing logistics service is reduced, the added script can be executed as a whole, the interference of other commands in the execution process is avoided, 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 clients.
The logistic service request carries identification information of a user of the client.
In some embodiments, in order to cope with some special users and avoid that the accesses of the special users are limited, in the step 11, before detecting whether the flow interface to be invoked has the custom annotation class added, the method for limiting the flow interface of the logistic service system may further include:
acquiring identification information of a user from a logistics service request;
matching the user identification information with pre-stored user identification information, and if the user identification information is consistent with the pre-stored user identification information, responding to a current transmitted logistics service request; if the matching is inconsistent, continuing the subsequent operation.
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.
When the method is implemented, after a logistics service request sent by a client is received, firstly, the 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 the pre-stored user identification information, if the pre-stored user identification information contains information consistent with the identification information of the user, the matching is consistent, then the user is not required to be limited, and the current logistics service request is directly responded; if the pre-stored user identification information does not have the information consistent with the user identification information, the matching is inconsistent, and then the follow-up operation is continued. For example, membership can be implemented for users, and for access of users who are members, current limitation can not be performed, and for access of non-member users, appropriate current limitation can be performed, so that high concurrency of access is avoided, and user experience of partial users is ensured.
In some embodiments, the custom annotation class may include, but is not limited to, an AccessLimit annotation class.
The AccessLimit annotation class includes the following configuration parameters: key, period, and count; the key is a unique identifier of the flow interface; wherein, the current time period can be recorded by the value of period; the preset maximum times can be recorded through the value of count; and through the key, the period, the count and the number of times of the logistics service requests responded in the current time period can be obtained.
In the step 12, the obtaining the number of times of the logistic service request 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 using a framework detects before accessing each flow interface to obtain whether the flow interface uses an AccessLimit annotation class, if the annotation class is detected, the flow interface is indicated to be required to perform flow limiting control, and the annotation comprises three configuration parameters: key, period, and count; the period and the count can be set according to the requirements, the key is generated according to the service rules, when the logistics service request is received, a unique key can be obtained according to the Access Limit annotation class, the key is a unique identifier of the flow interface, and then the number of accessed times corresponding to the key is obtained. For example, the period is 3 seconds, the count is 1000 times, the annotation means that 1000 times can be accessed within 3 seconds, when the logistics service request is received for 16 th time within 3 seconds, the unique key is firstly obtained, then the number of times 15, 15 of the logistics service request responded in the current time period corresponding to the preset maximum number of times 1000 and the key is obtained to be smaller than 1000, the flow interface does not limit the current logistics service request, and after the current logistics service request is responded, the logistics service request responded in the current time period is updated, namely 15 is updated to be 16. Therefore, the sudden high concurrency transmission condition in the process of processing the logistics service request by the logistics service system is avoided, and the long-time waiting for processing after the client sends the request is also avoided.
In some embodiments, after detecting whether the custom annotation class is added to the flow interface to be invoked, the flow limiting method of the flow interface of the logistics business system may further include: and if the custom annotation class is not added, responding to the current transmitted logistics service request. Therefore, for the interface without the user-defined annotation, the current limit is not needed, and the flexible current limit setting ensures good operation of the logistics business system and ensures the user experience.
In some embodiments, the alert information may include, but is not limited to, voice information and/or text information.
In the implementation, when the flow interface refuses to respond to the current transmitted logistics service request, the flow interface can transmit text information and/or sound information to the client so as to remind the client that the current access is limited and can be retried later. For example, a small dialog window is sent, text prompting "current access limited, please retry after 1 minute.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a flow restrictor of a flow interface of a logistics service system according to another embodiment of the present application.
As shown in fig. 2, this 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, when receiving a logistic service request sent by a client, whether a custom annotation class is added to a flow interface to be invoked;
the obtaining module 202 is configured to obtain the number of times of the logistic service request responded in the current time period if the custom annotation class is added;
a judging module 203, configured to judge whether the acquired number of times reaches a preset maximum number of times in the current time period;
the execution module 204 is configured to reject the response to the currently sent logistic service request and send a prompt message to the client if the preset maximum number of times is reached; if the number of times of the logistics service request is not up to the preset maximum number of times, responding to the logistics service request sent currently, and updating the number of times of the logistics service request responded in the current time period.
Optionally, the logistic service request includes identification information of the user.
Optionally, before the detecting whether the custom annotation class is added to the flow interface to be invoked, the detecting module may be specifically further configured to:
acquiring identification information of a user from a logistics service request;
matching the user identification information with pre-stored user identification information, and if the user identification information is consistent with the pre-stored user identification information, responding to a current transmitted logistics service request; if the matching is inconsistent, continuing the subsequent operation.
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 steps of: recording the current time period by the value of period; recording a preset maximum number of times through the value of count; recording the number of times of the logistics service requests responded in the current time period through the key value;
the obtaining the number of times of the logistic service request responded in the current time period may specifically include:
and obtaining the number of times of the logistics service requests responded in the current time period from the Access Limit annotation class.
Optionally, after detecting whether the custom annotation class is added to the flow interface to be invoked, the obtaining module may be further specifically configured to:
and if the custom annotation class is not added, responding to the current transmitted logistics service request.
Optionally, the prompt information includes sound information and/or text information.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a flow restrictor of a flow 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 for storing a computer program;
the processor 301 is configured to invoke and execute the computer program in the memory 302 to perform the flow restricting method of the flow interface of the logistics business system as described in any of the embodiments above.
The specific implementation manner of the flow limiting device of the flow interface of the logistics service system provided by the embodiment of the present application may refer to the implementation manner of the flow limiting method of the flow interface of the logistics service system described in any of the above examples, and will not be described herein again.
The present embodiment provides a storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps of the flow restriction method of the flow interface of the logistic service system according to any of the above embodiments.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise indicated, the meaning of "plurality" means at least two.
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 further implementations are included within the scope of the preferred embodiment of the present application 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 is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," 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 present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (8)

1. The flow limiting method for the flow interface of the logistics business system is characterized by comprising the following steps of:
when receiving a logistics service request sent by a client, detecting whether a user-defined annotation class is added to a flow interface to be called;
if the custom annotation class is added, acquiring the number of 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 current transmitted logistics service request, and transmitting prompt information to the client; if the preset maximum times are not reached, responding to the current transmitted logistics service request, and updating the times of the logistics service request responded in the current time period;
the custom annotation class comprises an Access Limit annotation class;
the Access Limit annotation class comprises the following configuration parameters: key, period, and count; the key is a unique identifier of the flow interface; the method further comprises the steps of: recording the current time period through the period value; recording the preset maximum times through the value of the count; the number of times of the logistic service requests responded by the period, the count and the current time period can be obtained through the key;
the step of obtaining the number of times of the logistic service requests responded in the current time period comprises the following steps:
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.
2. The method of claim 1, wherein the request for flow services includes identification information of a user.
3. The method for limiting flow of a flow interface of a logistic service system according to claim 2, wherein before detecting whether a custom annotation class is added to the flow interface to be invoked, the method further comprises:
acquiring the identification information of the user from the logistics service request;
matching the user identification information with pre-stored user identification information, and if the user identification information is matched with the pre-stored user identification information, responding to a current transmitted logistics service request; if the matching is inconsistent, continuing the subsequent operation.
4. The method for limiting flow of a flow interface of a logistic service system according to claim 1, wherein after detecting whether a custom annotation class is added to the flow interface to be invoked, the method further comprises:
and if the custom annotation class is not added, responding to the current transmitted logistics service request.
5. The flow limiting method of a flow interface of a logistic service system according to claim 1, wherein the prompt information comprises sound information and/or text information.
6. A flow restricting device for a flow interface of a logistics business system, comprising:
the detection module is used for detecting whether a custom annotation class is added to a flow interface to be called or not when a logistics service request sent by a client is received;
the custom annotation class comprises an Access Limit annotation class;
the Access Limit annotation class comprises the following configuration parameters: key, period, and count; the key is a unique identifier of the flow interface; the annotation class further includes: recording the current time period through the period value; recording a preset maximum number of times through the value of the count; the number of times of the logistic service requests responded by the period, the count and the current time period can be obtained through the key;
the acquisition module is used for acquiring the number of times of the logistics business request responded in the current time period if the custom annotation class is added;
the step of obtaining the number of times of the logistic service requests responded in the current time period comprises the following steps:
obtaining the preset maximum times and the times of the logistic service requests responded in the current time period from the Access Limit annotation class;
the judging module is used for judging whether the acquired times reach the preset maximum times of the current time period;
the execution module is used for refusing to respond to the current 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 current transmitted logistics service request, and updating the times of the logistics service request responded in the current time period.
7. A flow restricting device for a flow interface of a logistics business 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-5.
8. A storage medium storing a computer program which, when executed by a processor, implements the steps of the flow restricting method of the flow interface of the logistics service system of any one of claims 1-5.
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 CN111817972A (en) 2020-10-23
CN111817972B true 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)

Families Citing this family (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
CN115396375B (en) * 2022-08-17 2024-02-27 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment

Citations (4)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701709B (en) * 2013-12-13 2015-07-01 北京京东尚科信息技术有限公司 Flow rate control method and system

Patent Citations (4)

* 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
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 》;全文 *

Also Published As

Publication number Publication date
CN111817972A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
US11855981B2 (en) Authenticating a user device via a monitoring device
KR101881058B1 (en) Method, apparatus and system for voice verification
CN111817972B (en) Flow limiting method and related equipment for flow interface of logistics service system
US9740861B2 (en) Method for detecting eavesdropping activity and terminal device
US20210176358A1 (en) Call data management platform
EP1835691A1 (en) Communication System and Method
AU2017265064B2 (en) Access to data on a remote device
US20070285502A1 (en) Techniques for automatically setting up communications
US11626114B2 (en) Activation management for multiple voice assistants
CN110647460B (en) Test resource management method and device and test client
US20150264148A1 (en) Connection of persons and things via mobile messaging privacy/security broker system
US11916853B2 (en) Group type identification method and apparatus, computer device, and medium
US10984800B2 (en) Personal assistant device responses based on group presence
CN108282783B (en) Public wifi authentication method, device, user terminal and storage medium
CN115828256A (en) Unauthorized and unauthorized logic vulnerability detection method
CN112532640B (en) Authentication method, authentication device, electronic equipment and computer readable storage medium
US10251031B1 (en) Advanced automatic loop detection in short message service (SMS) two-way messaging
US11159677B1 (en) Call status effects
WO2019005423A1 (en) Apparatus, system and method for authentication for conversational user experience
US20190095170A1 (en) Systems and methods for embedding of audio tones and causing device action in response to audio tones
CN116155615A (en) Branch institution risk verification method, device and equipment
CN117294745A (en) Network connection state information sending method, device, electronic 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
CN109600773A (en) Double-card mobile phone number operation exception processing method, device and electronic 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