CN111831448A - Request processing method and device and electronic equipment - Google Patents

Request processing method and device and electronic equipment Download PDF

Info

Publication number
CN111831448A
CN111831448A CN202010689146.7A CN202010689146A CN111831448A CN 111831448 A CN111831448 A CN 111831448A CN 202010689146 A CN202010689146 A CN 202010689146A CN 111831448 A CN111831448 A CN 111831448A
Authority
CN
China
Prior art keywords
request
limiting layer
current limiting
target
processed
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
CN202010689146.7A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010689146.7A priority Critical patent/CN111831448A/en
Publication of CN111831448A publication Critical patent/CN111831448A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

According to the request processing method and device and the electronic equipment disclosed by the embodiment of the disclosure, at least two flow limiting layers are arranged to limit the flow of the received target requests to be processed, so that the downtime phenomenon of a server caused by the increase of the number of the requests to be processed can be avoided. Meanwhile, the entry sub-conditions are set for each flow limiting layer, so that the processing pressure of each flow limiting layer can be relieved, and the phenomenon that other types of to-be-processed requests cannot be accessed when one type of to-be-processed requests suddenly increases can be avoided, so that the server can simultaneously process various types of to-be-processed requests. Meanwhile, because the entry sub-conditions are set for each flow limiting layer, the requests to be processed by the server are all requests passing the entry conditions, and further, the influence of some malicious requests on the processing capacity of the server can be avoided.

Description

Request processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a request, and an electronic device.
Background
With the innovation of network technology, internet services have been developed, and common internet services include information transfer, data download, data query, and the like. Most internet services are usually performed by interacting between two terminals, namely a terminal used by a user and a server used by a network service provider.
In practical applications, usually one server needs to provide services for a large number of terminals. The maximum access amount (which refers to the total number of accesses in a unit time) that a server can carry is limited due to the property of the server, and once the access amount received by the server reaches a limit value, the server may be down, which may cause the server and the internet system associated with the server to be paralyzed.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a request processing method and device and electronic equipment, which can avoid a downtime phenomenon easily occurring when a server receives a large number of requests to be processed, and can avoid a phenomenon that the server can only generate one type of requests to be processed within a period of time due to the arrangement of a plurality of flow limiting layers.
In a first aspect, an embodiment of the present disclosure provides a method for processing a request, including: receiving a target request to be processed, wherein the target request to be processed comprises at least one request parameter; determining a current limiting layer to which the target request to be processed enters according to preset entering conditions and request parameters in the target request to be processed, wherein the entering conditions comprise entering sub-conditions corresponding to each current limiting layer in at least two current limiting layers; and processing the target request to be processed by utilizing the determined current limiting layer.
In a second aspect, an embodiment of the present disclosure provides a device for processing a request, including: a receiving unit, configured to receive a target to-be-processed request, where the target to-be-processed request includes at least one request parameter; a determining unit, configured to determine, according to a preset entry condition and a request parameter in the target to-be-processed request, a current-limiting layer into which the target to-be-processed request is to enter, where the entry condition includes entry sub-conditions corresponding to each current-limiting layer of at least two current-limiting layers, respectively; and the processing unit is used for processing the target request to be processed by utilizing the determined current limiting layer.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method for processing the request according to the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the requested processing steps as described above in the first aspect.
According to the request processing method and device and the electronic equipment provided by the embodiment of the disclosure, the at least two flow limiting layers are arranged to limit the flow of the received target requests to be processed, so that the downtime phenomenon of the server caused by the increase of the number of the requests to be processed can be avoided. Meanwhile, the entry sub-conditions are set for each flow limiting layer, so that the processing pressure of each flow limiting layer can be relieved, and the phenomenon that other types of to-be-processed requests cannot be accessed when one type of to-be-processed requests suddenly increases can be avoided, so that the server can simultaneously process various types of to-be-processed requests.
Meanwhile, because the entry sub-conditions are set for each flow limiting layer, the requests to be processed by the server are all requests passing the entry conditions, and further, the influence of some malicious requests on the processing capacity of the server can be avoided.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram for one embodiment of a method of processing a request according to the present disclosure;
FIG. 2 is a flow diagram of another embodiment of a method of processing a request according to the present disclosure;
FIG. 3 is a flow diagram of yet another embodiment of a method of processing a request according to the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method of processing a request according to the present disclosure;
FIG. 5 is a flow diagram of yet another embodiment of a method of processing a request according to the present disclosure;
FIG. 6 is a flow diagram of yet another embodiment of a method of processing a request according to the present disclosure;
FIG. 7 is a block diagram of one embodiment of a request processing device according to the present disclosure;
FIG. 8 is an exemplary system architecture to which the request processing method of one embodiment of the present disclosure may be applied;
fig. 9 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to FIG. 1, a flow diagram of one embodiment of a method of processing a request in accordance with the present disclosure is shown. The processing method of the request can be applied to the server. The processing method of the request as shown in fig. 1 includes the following steps:
step 101, receiving a target pending request.
Here, the target pending request includes at least one request parameter.
In some embodiments, the user may send a pending request to the server through a terminal device (cell phone, tablet, computer, etc.), such as: the pending request may be: the "home page of browsing merchant a", "inventory of settlement merchant B", etc., when these pending requests are sent to the server, may all be referred to as target pending requests. That is, it can be understood that: any pending request received by the server may be referred to as a target pending request. The request parameters may include: for characterizing the operation information that the user desires to perform. In other words, by requesting the parameters, the merchant that the user desires to browse and/or the operation that the user desires to perform, etc. can be known.
And step 102, determining a current limiting layer to which the target request to be processed enters according to preset entering conditions and request parameters in the target request to be processed.
Here, the entry condition includes entry sub-conditions corresponding to respective ones of the at least two current limiting layers.
In some embodiments, the server may suddenly receive a large number of pending requests in some situations (e.g., a promotional program), which may cause the server to become stressed. In order to relieve the pressure of the server, the flow limitation can be performed on the requests to be processed, so that the phenomenon that the server receives and processes a large number of requests to be processed in a short time to cause downtime is avoided.
In the prior art, the current limiting is usually a primary current limiting, and the primary current limiting can be understood as providing a current limiting layer. For primary throttling, typically in the throttling layer, a threshold may be set for the amount of pending requests that the server may process over a period of time; no matter how much request quantity to be processed is received by the current limiting layer, the request quantity to be processed transmitted to the processing center of the server by the current limiting layer for processing does not exceed the threshold value; thereby achieving the purpose of current limiting.
However, the server may perform multiple service processes at the same time, that is, there may be multiple types of requests for the pending request received by the server. For example: the server corresponds to browsing services of a plurality of merchants, such as: merchant A, merchant B and merchant C; when the pending request of the merchant a suddenly increases in a short time, the server may process the pending requests of the merchants B and C more slowly and less frequently, or even may fail to process the pending requests.
In some embodiments, each current limiting layer may be understood as a current limiting interface, and if the number of received requests in a certain time is greater than a preset threshold, the current limiting interface will reject the newly received requests.
Here, each current limiting layer may correspond to a current limiting policy, that is, each current limiting layer may determine what type of request is to be limited, and may set a current limiting threshold of the current limiting layer.
Therefore, in some embodiments of the present application, in order to better limit the current of the to-be-processed request amount and achieve a better current limiting effect, a multi-stage current limiting manner may be adopted. That is, by providing a plurality of flow restriction layers, each flow restriction layer can be provided with an entry sub-condition matched thereto. And determining that the request to be processed needs to enter the flow limiting layer specifically according to the request parameters of the request to be processed and the entry sub-conditions corresponding to each flow limiting layer. The entry sub-condition of each flow limiting layer can be determined according to the number of the types of to-be-processed requests received by the server, and if the number of some to-be-processed requests of the server is often increased, a flow limiting layer can be set for the type of to-be-processed requests; correspondingly, the sub-conditions for entering this current limiting layer are: specific parameters of the type of pending request are included (the specific parameters can be understood as specific characteristics included in the type of pending request; for example, if there is a sudden situation that the pending request for browsing merchant a often rises, and the pending request for browsing merchant a may include identification information of merchant a, the identification information (specific parameters) of merchant a can be used as an entry sub-condition of the restricted flow layer).
It will be appreciated that when a certain type of pending request needs to be throttled, then a particular parameter (entry sub-condition) may be selected that is unique to that type of pending request. Such as: when 'the identification information of the merchant A' is selected as the specific parameter; it can also be understood that the entry sub-condition of a certain flow-limiting layer is that the parameter information includes 'identification information of the merchant a', and further, the pending request for browsing the merchant a may include 'identification information of the merchant a'; so that pending requests from browsing merchant a are all restricted through the restriction layer. Of course, the merchant B and the merchant C may also set corresponding flow-limiting layers. Due to the design, the phenomenon that the pending requests of other merchants cannot be processed when the pending requests of a certain merchant suddenly increase can be avoided.
In some embodiments, although multiple flow-limiting layers are provided, and each flow-limiting layer may set a corresponding entry sub-condition, not all pending requests may pass through the multiple flow-limiting layers. In other words, some pending requests may be processed by the server through only one flow limiting layer, while some pending requests may be processed by the server after being flow limited through multiple flow limiting layers. Such as: if a certain request to be processed simultaneously meets the entry sub-conditions of a plurality of flow limiting layers, the request can sequentially enter the flow limiting layers according to a certain sequence and then can be processed by the server; specifically, the pending request first enters the flow-limiting layer, which is not limited herein, for example: a current limiting layer can be randomly selected to enter, or a sequence can be preset for the current limiting layers; but is not limited thereto.
And 103, processing the target request to be processed by utilizing the determined current limiting layer.
In some embodiments, after determining the current limiting layer that the target pending request needs to enter, whether to reject the target pending request may be determined according to a current limiting condition preset in the current limiting layer. The current limiting condition may be understood as the above threshold, such as: when the amount of the requests to be processed in the flow limiting layer reaches a preset threshold value, the target requests to be processed can be rejected, and when the requests to be processed in the flow limiting layer does not reach the preset threshold value, the flow limiting layer does not reject the target requests to be processed; and the next target pending request may continue to the next flow limiting layer, or the server may respond to the target pending request directly. And whether the specific target pending request enters the next current-limiting layer or directly responds, the determination can be made according to the request parameters of the target pending request and how many levels of current-limiting layers are set.
It can be seen that by setting at least two flow limiting layers, the received target to-be-processed requests are subjected to flow limiting, and the downtime phenomenon caused by the increase of the number of the to-be-processed requests of the server can be avoided. Meanwhile, the entry sub-conditions are set for each flow limiting layer, so that the processing pressure of each flow limiting layer can be relieved, and the phenomenon that other types of to-be-processed requests cannot be accessed when one type of to-be-processed requests suddenly increases can be avoided, so that the server can simultaneously process various types of to-be-processed requests.
Furthermore, because the entry sub-conditions are set for each flow limiting layer, the requests to be processed by the server all pass the entry conditions, and further, the influence of some malicious requests on the processing capacity of the server can be avoided.
In some embodiments, at least two of the current limiting layers may be configured according to current limiting layer configuration instructions.
Here, the current limit layer configuration instruction includes a current limit layer identification and connection sequence information.
In some embodiments, a corresponding identifier may be added to each current limiting layer, and thus, the current limiting layer that needs to be controlled may be determined by the identifier in the current limiting layer configuration instruction.
In some embodiments, the connection order information may be understood as: information indicating a current limit order of the at least two current limit layers to the target pending request. Such as: when the at least two current limiting layers include a current limiting layer a, a current limiting layer B, and a current limiting layer C, when the connection sequence information indicates a current limiting sequence of: when the current limiting layer A, the current limiting layer B and the current limiting layer C are used, when a target to-be-processed request is received, the current limiting layer A firstly judges whether to carry out current limiting on the target to-be-processed request, after the current limiting layer A judges, whether to output the target to-be-processed request to the current limiting layer B is determined according to the actual condition of the current limiting layer A, and similarly, after the current limiting layer B judges the target to-be-processed request, whether to output the target to-be-processed request to the current limiting layer C is determined according to the actual condition of the current limiting layer B. That is, when a user wants to change the current limiting sequence of the target to-be-processed request by the at least two current limiting layers, the current limiting sequence of the target to-be-processed request by the at least two current limiting layers can be changed by inputting the corresponding current limiting layer configuration instructions. For example, a user may change the current limiting sequence to: a current limiting layer C, a current limiting layer A and a current limiting layer B.
Of course, in some embodiments, the user may also close some of the current limiting layers by entering a current limiting layer configuration command, such as: when the current limiting layer B is closed, the current limiting sequence at this time may be: current limiting layer C-current limiting layer a.
In other words, a user can input a corresponding current limiting layer configuration instruction through actual application conditions to realize the on/off control of each current limiting layer of the at least two current limiting layers, and can control the current limiting sequence between the at least two current limiting layers.
Referring to fig. 2, in some embodiments, the at least two current limiting layers may include a first current limiting layer and a second current limiting layer, and step 102 (determining the current limiting layer to be entered by the target pending request according to the preset entry condition and the request parameter in the target pending request) may include step 1021 and step 1022.
Step 1021, in response to determining that the request parameter meets the first entering sub-condition corresponding to the first flow limiting layer, determining that the target to-be-processed request is to enter the first flow limiting layer.
In step 1022, in response to determining that the first pending request amount corresponding to the first current limiting layer is smaller than the preset first threshold, the first current limiting layer outputs the target pending request to the second current limiting layer.
That is, it is understood herein that the second sub-condition corresponding to the second current limiting layer may include: the pending request passes through the first flow limiting layer. The condition that the target pending request passes through the first flow limiting layer includes: the request parameter of the target pending request meets a first sub-condition corresponding to the first flow limiting layer, and the pending request amount in the first flow limiting layer is smaller than a first threshold. The preset first threshold may be set according to actual conditions (such as the processing capability of the server), and will not be described in detail herein.
In some embodiments, when there are only two current limiting layers, when the request parameter of the target pending request does not satisfy the first sub-condition corresponding to the first current limiting layer, it may be characterized that the target pending request satisfies the second sub-condition corresponding to the second current limiting layer. Because the target pending request is throttled through at least one level before being processed by the server. Thus, when there are only two layers of throttling, then the request parameters of the target pending request may at least satisfy the first sub-condition and/or the second sub-condition.
In some embodiments, the request parameters may include a first parameter indicating a request object; at this time, step 1021 (in response to determining that the request parameter satisfies the first sub-condition corresponding to the first flow limiting layer, determining that the target pending request is to enter the first flow limiting layer) may include: and when the request object indicated by the first parameter is determined to be a preset request object, determining that the request parameter meets a first entering sub-condition corresponding to the first flow limiting layer.
In some embodiments, the request parameters may further include a second parameter indicating a type of the request; at this time, step 1021 (in response to determining that the request parameter satisfies the first sub-condition corresponding to the first flow limiting layer, determining that the target pending request is to enter the first flow limiting layer) may further include: and when the request type indicated by the second parameter is determined to be the preset request type, determining that the request parameter meets a first entering sub-condition corresponding to the first flow limiting layer.
Here, the request object may be understood as an object that needs to be accessed and indicated by the pending request, and the request type may be understood as a specific operation type indicated by the pending request. Such as: the target to-be-processed request is "browse the homepage of the merchant a", and at this time, 'the merchant a' may represent a request object corresponding to the to-be-processed request, and 'browse the homepage' may represent a request type corresponding to the to-be-processed request.
For a better understanding of the ideas presented in the present application, the following examples are given for the purpose of illustration. Such as: the server needs to serve the merchant A, the merchant B and the merchant C at the same time; while the amount of pending requests for merchant a is typically large, such as: typically around 500 outstanding requests per second are made to merchant a; the amount of pending requests for merchant B may be around 300 per second; the left and right pending requests for merchant C may amount to 200 per second; the server can process 1100 requests per second. Thus, in a typical case, the server can process the pending requests corresponding to the merchant a, the merchant B and the merchant C at the same time. However, if merchant a is suddenly engaged in some activity, the amount of outstanding requests from merchant a may suddenly surge, for example: at this time, the server receives 1200 to-be-processed requests corresponding to the merchant a every second, and the number of to-be-processed requests that the server can process every second is only 1100, so that the to-be-processed requests received by the server can be limited at this time in order to avoid the server from going down. Such as: only letting the server sift out 1100 per second from the pending requests received for processing (primary throttling). However, if such a throttling method is adopted, the server may not be able to process the pending requests of the merchants B and C. Therefore, the pending requests that the server can receive can be throttled in multiple stages, such as: the setting server processes 650 pending requests of the merchant a at most every second, so that the server can process the pending requests of the merchant B and the merchant C also in the case where the pending request amount of the merchant a suddenly swells. Similarly, the amount of requests to be processed by the server at most for the merchant B and the merchant C per second can also be set.
In practical applications, one server may serve many merchants at the same time, if a pending request amount threshold is set for each merchant, a lot of time may be spent, and the server may need to perform a lot of parameter determinations for each pending request, which may increase the pressure of the server.
Thus, in some embodiments, a dedicated slice may be set only for some types of pending requests, while another type of pending request does not. Such as: if the pending request amount of the merchant a is unstable and the pending request amount is increased rapidly, a dedicated flow limiting layer may be set for the pending request of the merchant a, that is, a threshold may be preset for the pending request amount of the merchant a, and when the pending request amount of the merchant a reaches the threshold, the pending request of the merchant a is no longer accepted. Of course, a dedicated flow limiting layer may also be set for the pending request of the merchant B. In order to reduce the number of the flow restriction layers, in some embodiments, a flow restriction layer may be provided for the merchant a and the merchant B. For example, when the merchant a and the merchant B share one flow limiting layer, the condition of flow limiting may be defined as a sum of the pending requests for the merchant a and the merchant B, or a threshold of the pending request amount for the merchant a and a threshold of the pending request amount for the merchant B may be defined in the flow limiting layer, respectively.
Of course, the definition may also be performed according to the request type of the pending request processed by the server, such as: browsing a homepage, performing checkout, switching to a next page, requesting access to a database, etc. The threshold of the pending request amount may be set for certain request types according to the pending request amount corresponding to the request type. Such as: most of the requests to be processed for browsing the homepage are large, a flow-limiting layer may be set for the amount of requests to be processed for browsing the homepage.
Referring to fig. 3, in some embodiments, the at least two current limiting layers may further include: the third current limiting layer, the fourth current limiting layer and the fifth current limiting layer, and the request parameters comprise: a third parameter indicating a request object and a fourth parameter indicating a request type; step 102 (determining the current limiting layer to which the target pending request is to enter according to the preset entry condition and the request parameter in the target pending request) may further include:
in response to determining that the request object indicated by the third parameter is a preset request object, step 1023 determines that the target pending request is to enter a third flow-limiting layer.
Step 1024, in response to determining that the third pending request amount corresponding to the third current limiting layer is smaller than the preset third threshold, the third current limiting layer outputs the target pending request to the fourth current limiting layer.
In step 1025, in response to determining that the fourth pending request indicated by the fourth current limit layer is smaller than the preset fourth threshold and the request type indicated by the fourth parameter is the preset request type, the fourth current limit layer outputs the target pending request to the fifth current limit layer.
It can be understood that: the three current-limiting layers are respectively: one restriction layer (third restriction layer) is set for the browsing object, one restriction layer (fourth restriction layer) is set for the browsing type, and one restriction layer (fifth restriction layer) is set for the processing capability of the server. The purpose set by the third current limiting layer may be: the phenomenon that the pending requests of other browsing objects cannot be accessed due to sudden surge of the pending requests of some browsing objects is avoided. Similarly, the fifth flow limiting layer can avoid the sudden surge of some browsing services, which causes the server to be unable to process other browsing services. And the fourth flow limiting layer can control the to-be-processed requests of the server within a certain threshold value within a period of time, so that the server is prevented from being crashed.
In this embodiment, when the target to-be-processed request is received, it may be determined whether a request object indicated by the third parameter of the target to-be-processed request is a preset request object (here, the preset request object may be understood as a request object that matches the server and is prone to sudden surge of the to-be-processed request amount, and of course, a part of the request objects that match the server may be screened out as preset objects). If the third parameter of the target to-be-processed request indicates one of the preset request objects, it may be characterized that the target to-be-processed request satisfies an entry sub-condition corresponding to the third flow limiting layer.
In some embodiments, as long as the pending requests issued for the request objects matching the server may satisfy the entry sub-condition of entering the fourth throttling layer (in some cases, it may also be understood that the pending requests received by the server all satisfy the entry sub-condition of the fourth throttling layer). At this time, the entry sub-condition of the third restriction layer (third entry sub-condition) and the entry sub-condition of the fourth restriction layer (fourth entry sub-condition) may be sequentially set, for example: when the target to-be-processed request is received, whether the target to-be-processed request meets the third entry sub-condition is judged, and if not, the target to-be-processed request can be sent to a fourth flow limiting layer. After the target to-be-processed request passes through the fourth current-limiting layer, whether the target to-be-processed request meets an entering sub-condition (a fifth entering sub-condition) of the fifth current-limiting layer can be continuously judged; if the target request to be processed does not satisfy the fifth entry sub-condition, the server can directly respond; and if the target to-be-processed request meets the fifth entry sub-condition, the target to-be-processed request can enter the fifth flow limiting layer, and the processing mode of the target to-be-processed request is determined according to the current number of the to-be-processed requests in the fifth flow limiting layer.
Referring to fig. 4, in some embodiments, the at least two current limiting layers include: the sixth current limiting layer, the seventh current limiting layer and the eighth current limiting layer, and the request parameters include: a fifth parameter for indicating a request object and a sixth parameter for indicating a request type; step 102 (determining the current limiting layer to which the target pending request is to enter according to the preset entry condition and the request parameter in the target pending request) may further include:
in response to determining that the request type indicated by the sixth parameter is the preset request type, step 1026, determining that the target to-be-processed request is to enter a sixth flow-limiting layer.
Step 1027, in response to determining that the sixth pending request amount corresponding to the sixth current limiting layer is smaller than a preset sixth threshold, the sixth current limiting layer outputs the target pending request to the seventh current limiting layer.
Step 1028, in response to determining that the seventh pending request indicated by the seventh current limiting layer is smaller than the preset seventh threshold and the request object corresponding to the fifth parameter is the preset request object, the seventh current limiting layer outputs the target pending request to the eighth current limiting layer.
Here, step 1026, step 1027 and step 1028 are only modified in the determination step compared to step 1023, step 1024 and step 1025, that is, in steps 1023 to 1025, the determination method for the target pending request is: firstly, judging whether a request object indicated by a target request to be processed is a preset request object, then judging the processing capacity of the server at the moment, and finally judging whether the request object indicated by the target request to be processed is a preset request type. In steps 1026 to 1028, it is determined whether the request object indicated by the target pending request is the predetermined request type, then the processing capability of the server at that time is determined, and finally, it is determined whether the request object indicated by the target pending request is the predetermined request object.
In some embodiments, it may also be that the request object and the request type indicated by the target pending request are determined first, and the processing capability of the server at this time is determined. It can be seen that when several flow-limiting layers are set, there are several entry sub-conditions correspondingly, and the entry sub-conditions can set the order of determination, specifically how to set the order of determination of the entry sub-conditions, which is not limited in this embodiment; in the specific embodiment, it is only necessary to perform reasonable setting according to the actual situation (the request object specifically served by the server and the request service specifically processed).
Referring to fig. 5, in some embodiments, step 103 (processing the target pending request using the determined current limit layer) may include steps 1031 and 1032.
And step 1031, determining a preset current limiting threshold corresponding to the current limiting layer.
And 1032, processing the target request to be processed based on the preset current limiting threshold.
Referring to fig. 6, in some embodiments, the step 1031 (determining the preset current limit threshold corresponding to the current limit layer) may include: step 10311 and step 10312.
And step 10311, acquiring the to-be-processed request quantity received by the current limiting layer in a preset historical time period.
And step 10312, determining a preset current limiting threshold value based on the received pending request quantity.
Here, the preset history time period may refer to: the last week, or the last day. The setting is not limited to this, and may be appropriately set according to the actual situation. And estimating the current limiting threshold of the current limiting layer by acquiring the amount of the requests to be processed in a past period of time and the processing capacity of the server. Such as: in the past week, a certain current limiting layer sets a threshold value for allowing 450 pending requests to pass through per second, and a certain current limiting layer of the current limiting layer receives 500 pending requests per second; if, for the server, when the current limiting layer outputs 450 pending requests per second, the server does not reach its own processing threshold, that is, the server still has the capability of processing pending requests, the current limiting threshold of the current limiting layer may be set to allow 500 pending requests per second to pass through.
In some embodiments, a preset current limit threshold that dynamically changes with time may be set according to a change rule of the number of pending requests entering a certain current limit layer. Such as: when the amount of requests to be processed for merchant a is found to be large in a specific time period (1 pm to 3 pm), the preset current limit threshold of the current limit layer set for merchant a may be set to be larger in this time period, and smaller in other time periods.
In some embodiments, the preset current limit threshold in the current limit layer may also be set according to the needs of the merchant. Such as: some merchants find that the goods may not be prepared enough, and at this time, some information may be sent to the server to request to set a preset current limiting threshold for the pending requests for ordering, so as to avoid the phenomenon that the user cannot deliver the goods when ordering.
Step 1032 (processing the target pending request based on the preset current limit threshold) may be understood as: when it is determined that the amount of the pending requests received within the preset time is less than the preset current limit threshold, it may be characterized that the target pending request may pass through the current limit layer. After the target to-be-processed request passes through the current-limiting layer, the server does not represent that the to-be-processed request is processed, and whether the target to-be-processed request meets the entry sub-conditions corresponding to other current-limiting layers needs to be judged. If the entering sub-conditions corresponding to other current limiting layers are met, entering other current limiting layers for current limiting; and if the sub-conditions corresponding to other flow limiting layers are not met, the server can respond to the target to-be-processed request.
And when the amount of the to-be-processed requests received in the preset time is determined to be not less than the preset current limiting threshold, the server can be represented that the to-be-processed requests of the type cannot be received at the moment, and the target to-be-processed requests can be rejected.
With further reference to fig. 7, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for processing a request, which corresponds to the embodiment of the method for processing a request shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 7, the request processing device of the present embodiment includes: a receiving unit 701, configured to receive a target pending request, where the target pending request includes at least one request parameter; a determining unit 702, configured to determine, according to preset entry conditions and request parameters in the target to-be-processed request, a current-limiting layer into which the target to-be-processed request is to enter, where the entry conditions include entry sub-conditions corresponding to respective current-limiting layers of at least two current-limiting layers; the processing unit 703 is configured to process the target to-be-processed request by using the determined current-limiting layer.
In some embodiments, the at least two current limiting layers are configured according to a current limiting layer configuration instruction, wherein the current limiting layer configuration instruction includes a current limiting layer identifier and connection sequence information.
In some embodiments, the at least two flow-restricting layers comprise: a first current limiting layer and a second current limiting layer, the determining unit 702 includes: a first sub-determination unit 7021 and a second sub-determination unit 7022; the first sub-determining unit 7021 is configured to determine that the target pending request is to enter the first flow limiting layer in response to determining that the request parameter satisfies a first entering sub-condition corresponding to the first flow limiting layer; the second sub-determining unit 7022 is configured to, in response to determining that the first pending request amount in the first current limiting layer is smaller than a preset first threshold, output, by the first current limiting layer, the target pending request to the second current limiting layer.
In some embodiments, the request parameters include: a first parameter indicating a request object; the first sub-determining unit 7021 is specifically configured to determine, in response to determining that the request object indicated by the first parameter is a preset request object, that the request parameter satisfies a first entry sub-condition corresponding to the first flow limiting layer.
In some embodiments, the request parameter includes a second parameter indicating a type of the request; the first sub-determining unit 7021 is further specifically configured to determine, in response to determining that the request type indicated by the second parameter is a preset request type, that the request parameter satisfies a first entry sub-condition corresponding to the first flow limiting layer.
In some embodiments, the at least two flow-restricting layers comprise: a third current limiting layer, a fourth current limiting layer and a fifth current limiting layer, wherein the request parameters include: a third parameter indicating a request object and a fourth parameter indicating a request type; the determining unit 702 further includes: a third sub-determining unit 7023, a fourth sub-determining unit 7024, and a fifth sub-determining unit 7025;
the third sub-determining unit 7023 is configured to determine, in response to determining that the request object indicated by the third parameter is a preset request object, that the target pending request is to enter the third flow limiting layer; the fourth sub-determining unit 7024 is configured to, in response to determining that a third pending request amount in the third current limiting layer is smaller than a preset third threshold, output, by the third current limiting layer, the target pending request to the fourth current limiting layer; the fifth sub-determining unit 7025 is configured to, in response to determining that the fourth pending request in the fourth current limiting layer is smaller than a preset fourth threshold, and the request type indicated by the fourth parameter is a preset request type, output, by the fourth current limiting layer, the target pending request to a fifth current limiting layer.
In some embodiments, the at least two flow-restricting layers comprise: a sixth current limiting layer, a seventh current limiting layer, and an eighth current limiting layer, wherein the request parameters include: a fifth parameter for indicating a request object and a sixth parameter for indicating a request type; the determining unit 702 further includes: a sixth sub-determining unit 7026, a seventh sub-determining unit 7027, and an eighth sub-determining unit 7028;
the sixth sub-determining unit 7026 is configured to determine, in response to determining that the request type indicated by the sixth parameter is a preset request type, that the target pending request is to enter the sixth flow limiting layer; the seventh sub-determining unit 7027 is configured to, in response to determining that a sixth pending request amount in the sixth current limit is smaller than a preset sixth threshold, output, by the sixth current limit layer, the target pending request to the seventh current limit layer; the eighth sub-determining unit 7028 is configured to, in response to determining that the seventh pending request in the seventh current limiting layer is smaller than a preset seventh threshold and the request object indicated by the fifth parameter is a preset request object, output the target pending request to the eighth current limiting layer by the seventh current limiting layer.
In some embodiments, the processing unit 703 is specifically configured to: determining a preset current limiting threshold corresponding to a current limiting layer; and processing the target request to be processed based on the preset current limiting threshold.
In some embodiments, the processing unit 703 is further specifically configured to: acquiring a request quantity to be processed received by a current limiting layer within a preset historical time period; and determining the preset current limiting threshold value based on the received pending request quantity.
In some embodiments, the processing unit 703 is further specifically configured to: in response to the fact that the amount of the to-be-processed requests in the flow limiting layer is not smaller than the preset flow limiting threshold value within the preset time, rejecting the target to-be-processed requests; and responding to the target pending request in response to the fact that the pending request amount in the flow limiting layer is smaller than the preset flow limiting threshold value within the preset time.
Referring to fig. 8, fig. 8 illustrates an exemplary system architecture to which the request processing method of one embodiment of the present disclosure may be applied.
As shown in fig. 8, the system architecture may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 may be the medium used to provide communications links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 801, 802, 803 may interact with a server 805 over a network 804 to receive or send messages or the like. The terminal devices 801, 802, 803 may have various client applications installed thereon, such as a web browser application, a search-type application, and a news-information-type application. The client application in the terminal device 801, 802, 803 may receive the instruction of the user, and complete the corresponding function according to the instruction of the user, for example, add the corresponding information in the information according to the instruction of the user.
The terminal devices 801, 802, 803 may be hardware or software. When the terminal devices 801, 802, 803 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal devices 801, 802, 803 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 805 may be a server providing various services, for example, receiving an information acquisition request sent by the terminal devices 801, 802, and 803, and acquiring presentation information corresponding to the information acquisition request in various ways according to the information acquisition request. And the relevant data of the presentation information is sent to the terminal devices 801, 802, 803.
It should be noted that the information processing method provided by the embodiment of the present disclosure may be executed by a terminal device, and accordingly, the information pushing apparatus may be disposed in the terminal devices 801, 802, and 803. Furthermore, the information processing method provided by the embodiment of the present disclosure may also be executed by the server 805, and accordingly, an information processing apparatus may be provided in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 9, shown is a schematic diagram of an electronic device (e.g., a terminal device or a server of fig. 8) suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are also stored. The processing apparatus 901, the ROM902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
Generally, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the electronic device to perform wireless or wired communication with other devices to exchange data. While fig. 9 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing apparatus 901.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a target request to be processed, wherein the target request to be processed comprises at least one request parameter; determining a current limiting layer to which the target request to be processed enters according to preset entering conditions and request parameters in the target request to be processed, wherein the entering conditions comprise entering sub-conditions corresponding to each current limiting layer in at least two current limiting layers; and processing the target request to be processed by utilizing the determined current limiting layer.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the receiving unit 701 may also be described as a "unit for receiving a target pending request".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (13)

1. A method for processing a request, comprising:
receiving a target pending request, wherein the target pending request comprises at least one request parameter;
determining a current limiting layer to which the target request to be processed enters according to preset entering conditions and request parameters in the target request to be processed, wherein the entering conditions comprise entering sub-conditions corresponding to each current limiting layer in at least two current limiting layers;
and processing the target request to be processed by utilizing the determined current limiting layer.
2. The method of claim 1, wherein the at least two current limiting layers are configured according to current limiting layer configuration instructions, wherein the current limiting layer configuration instructions comprise current limiting layer identification and connection sequence information.
3. The method of claim 1, wherein the at least two current-limiting layers comprise: a first current-limiting layer and a second current-limiting layer, and
determining a current limiting layer to which the target request to be processed enters according to a preset entering condition and a request parameter in the target request to be processed, wherein the method comprises the following steps:
in response to determining that the request parameter satisfies a first entry sub-condition corresponding to the first flow limiting layer, determining that the target pending request is to enter the first flow limiting layer;
in response to determining that the first pending request amount in the first current limiting layer is smaller than a preset first threshold, the first current limiting layer outputs the target pending request to the second current limiting layer.
4. The method of claim 3, wherein the request parameters comprise: a first parameter indicating a request object; and
in response to determining that the request parameter satisfies a first entry sub-condition corresponding to the first flow limiting layer, determining that the target pending request is to enter the first flow limiting layer includes:
and in response to determining that the request object indicated by the first parameter is a preset request object, determining that the request parameter meets a first entry sub-condition corresponding to the first flow limiting layer.
5. The method of claim 3, wherein the request parameter comprises a second parameter indicating a type of request; and
in response to determining that the request parameter satisfies a first entry sub-condition corresponding to the first flow limiting layer, determining that the target pending request is to enter the first flow limiting layer includes:
and in response to determining that the request type indicated by the second parameter is a preset request type, determining that the request parameter meets a first entry sub-condition corresponding to the first flow limiting layer.
6. The method of claim 1, wherein the at least two current-limiting layers comprise: the third current limiting layer, the fourth current limiting layer and the fifth current limiting layer, and the request parameters include: a third parameter indicating a request object and a fourth parameter indicating a request type; and
determining a current limiting layer to which the target request to be processed enters according to a preset entering condition and a request parameter in the target request to be processed, wherein the method comprises the following steps:
in response to determining that the request object indicated by the third parameter is a preset request object, determining that the target to-be-processed request is to enter the third flow limiting layer;
in response to determining that a third pending request amount in the third current limiting layer is less than a preset third threshold, the third current limiting layer outputs the target pending request to the fourth current limiting layer;
in response to determining that a fourth pending request in the fourth current limiting layer is smaller than a preset fourth threshold and the request type indicated by the fourth parameter is a preset request type, the fourth current limiting layer outputs the target pending request to a fifth current limiting layer.
7. The method of claim 1, wherein the at least two current-limiting layers comprise: a sixth current limiting layer, a seventh current limiting layer and an eighth current limiting layer, wherein the request parameters include: a fifth parameter for indicating a request object and a sixth parameter for indicating a request type; and
determining a current limiting layer to which the target request to be processed enters according to a preset entering condition and a request parameter in the target request to be processed, wherein the method comprises the following steps:
in response to determining that the request type indicated by the sixth parameter is a preset request type, determining that the target to-be-processed request is to enter the sixth flow limiting layer;
in response to determining that a sixth pending request amount in the sixth current limit is less than a preset sixth threshold, the sixth current limit layer outputs the target pending request to the seventh current limit layer;
and when it is determined that the seventh pending request in the seventh current limiting layer is smaller than a preset seventh threshold and the request object indicated by the fifth parameter is a preset request object, the seventh current limiting layer outputs the target pending request to an eighth current limiting layer.
8. The method of claim 1, wherein processing the target pending request using the determined current limit layer comprises:
determining a preset current limiting threshold corresponding to a current limiting layer;
and processing the target request to be processed based on the preset current limiting threshold.
9. The method of claim 8, wherein the determining the preset current limit threshold corresponding to the current limit layer comprises:
acquiring a request quantity to be processed received by a current limiting layer within a preset historical time period;
and determining the preset current limiting threshold value based on the received pending request quantity.
10. The method of claim 8, wherein processing the target pending request based on the current limit threshold comprises:
in response to determining that the amount of the requests to be processed in the flow limiting layer is not less than the preset flow limiting threshold within the preset time, rejecting the target requests to be processed;
responding to the target pending request in response to the fact that the pending request amount in the flow limiting layer is smaller than the preset flow limiting threshold value within the preset time.
11. A device for processing a request, comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a target request to be processed, and the target request to be processed comprises at least one request parameter;
the device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining a current limiting layer to which a target request to be processed enters according to preset entering conditions and request parameters in the target request to be processed, and the entering conditions comprise entering sub-conditions corresponding to each current limiting layer in at least two current limiting layers;
and the processing unit is used for processing the target request to be processed by utilizing the determined current limiting layer.
12. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10.
13. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202010689146.7A 2020-07-16 2020-07-16 Request processing method and device and electronic equipment Pending CN111831448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010689146.7A CN111831448A (en) 2020-07-16 2020-07-16 Request processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010689146.7A CN111831448A (en) 2020-07-16 2020-07-16 Request processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111831448A true CN111831448A (en) 2020-10-27

Family

ID=72924393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010689146.7A Pending CN111831448A (en) 2020-07-16 2020-07-16 Request processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111831448A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910975A (en) * 2021-01-21 2021-06-04 北京字跳网络技术有限公司 Request processing method and device and electronic equipment
CN112953945A (en) * 2021-02-24 2021-06-11 中国工商银行股份有限公司 Access request processing method and system
CN113485831A (en) * 2021-07-05 2021-10-08 北京猿力未来科技有限公司 Service current limiting method, computing device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013134721A1 (en) * 2012-03-08 2013-09-12 Husqvarna Ab Equipment data sensor and sensing for fleet management
CN106817424A (en) * 2017-01-23 2017-06-09 杭州云纪网络科技有限公司 Method and system for controlling flowing of access
CN107370684A (en) * 2017-06-15 2017-11-21 腾讯科技(深圳)有限公司 Business current-limiting method and business current-limiting apparatus
CN107508860A (en) * 2017-07-21 2017-12-22 深圳市金立通信设备有限公司 One kind service current-limiting method, server and terminal
CN110290070A (en) * 2019-05-15 2019-09-27 北京三快在线科技有限公司 A kind of flow control methods, device, equipment and readable storage medium storing program for executing
CN110474850A (en) * 2019-08-23 2019-11-19 苏宁云计算有限公司 Flow control methods, device, computer equipment and the storage medium of business interface
CN110661717A (en) * 2019-10-25 2020-01-07 上海燕汐软件信息科技有限公司 Current limiting method and device and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013134721A1 (en) * 2012-03-08 2013-09-12 Husqvarna Ab Equipment data sensor and sensing for fleet management
CN106817424A (en) * 2017-01-23 2017-06-09 杭州云纪网络科技有限公司 Method and system for controlling flowing of access
CN107370684A (en) * 2017-06-15 2017-11-21 腾讯科技(深圳)有限公司 Business current-limiting method and business current-limiting apparatus
CN107508860A (en) * 2017-07-21 2017-12-22 深圳市金立通信设备有限公司 One kind service current-limiting method, server and terminal
CN110290070A (en) * 2019-05-15 2019-09-27 北京三快在线科技有限公司 A kind of flow control methods, device, equipment and readable storage medium storing program for executing
CN110474850A (en) * 2019-08-23 2019-11-19 苏宁云计算有限公司 Flow control methods, device, computer equipment and the storage medium of business interface
CN110661717A (en) * 2019-10-25 2020-01-07 上海燕汐软件信息科技有限公司 Current limiting method and device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910975A (en) * 2021-01-21 2021-06-04 北京字跳网络技术有限公司 Request processing method and device and electronic equipment
CN112953945A (en) * 2021-02-24 2021-06-11 中国工商银行股份有限公司 Access request processing method and system
CN113485831A (en) * 2021-07-05 2021-10-08 北京猿力未来科技有限公司 Service current limiting method, computing device and storage medium

Similar Documents

Publication Publication Date Title
CN111831448A (en) Request processing method and device and electronic equipment
CN110650209B (en) Method and device for realizing load balancing
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN111125107A (en) Data processing method, device, electronic equipment and medium
CN110633126B (en) Information display method and device and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN112910975A (en) Request processing method and device and electronic equipment
CN112486956A (en) Data access method and device and electronic equipment
CN113760991A (en) Data operation method and device, electronic equipment and computer readable medium
CN113537893A (en) Order processing method, device, equipment and computer readable medium
CN111309254B (en) Data processing method and device, readable medium and electronic equipment
CN112684899A (en) Client operation control method and device, electronic equipment and computer readable medium
CN114066363A (en) Order information processing method and device, electronic equipment and computer readable medium
CN111262907B (en) Service instance access method and device and electronic equipment
CN112256171A (en) Method, device, terminal and storage medium for presenting information in screen locking interface
CN111756833B (en) Node processing method, node processing device, electronic equipment and computer readable medium
CN111459893B (en) File processing method and device and electronic equipment
CN110619079B (en) Method and device for pushing information
US10789382B2 (en) Systems and methods of providing access to secure data
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN114374738B (en) Information pushing method and device, storage medium and electronic equipment
CN118158082B (en) Method, device, equipment and medium for updating communication resource message of intelligent household equipment
CN111625707B (en) Recommendation response method, device, medium and equipment
CN113542834B (en) Control method and device for remote control device, electronic equipment and storage medium
CN113505297B (en) Data query method, device, electronic equipment and computer readable 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