Request processing method and device, electronic equipment and storage medium

By determining the business type and target dimensions of the request, matching candidate channels and performing current limiting processing, the problem that request diversion and current limiting are difficult to effectively perform in the existing technology is solved, and the processing capability and stability of the system are improved.

CN118819840APending Publication Date: 2024-10-22CHINA MOBILE GRP GUANGDONG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410880635.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively divert and limit traffic when processing a large number of requests, causing server overload and affecting system stability and user experience.

Method used

By determining the business type, target dimension and key value of the request, matching candidate channels, and processing based on the current limiting threshold, the request can be diverted and limited.

Benefits of technology

It improves the efficiency and reliability of request processing, avoids system overload caused by excessive data volume, and improves system processing capabilities and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819840A_ABST
    Figure CN118819840A_ABST
Patent Text Reader

Abstract

The invention provides a request processing method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a business type to which a received first request belongs; determining a target dimension associated with the first request and a first key value of the first request under the target dimension according to the service type; obtaining a candidate channel associated with the target dimension and a second key value corresponding to the candidate channel; matching the first key value with the second key value, and determining a target channel corresponding to the first request; and processing the first request based on the current limiting threshold value corresponding to the target channel. Therefore, the processing efficiency and reliability of the request can be improved, system overload caused by overlarge data volume is avoided, and the processing capacity and stability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a request processing method, device, electronic device and storage medium. Background Art

[0002] With the rapid growth of Internet users, the amount of request data received by the server is also increasing. A large number of requests may cause server overload, affecting user experience and system stability. Therefore, it is necessary to divert and limit the requests to ensure service quality and system stability, and avoid problems such as excessive service load and slow service response caused by traffic surge. Summary of the invention

[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the first purpose of this application is to propose a request processing method to achieve detailed diversion of business requests, avoid system overload, and improve the accuracy and reliability of traffic management.

[0005] The second objective of this application is to provide a request processing device.

[0006] The third objective of the present application is to provide an electronic device.

[0007] A fourth objective of the present application is to provide a computer-readable storage medium.

[0008] A fifth object of the present application is to provide a computer program product.

[0009] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a request processing method, including:

[0010] Determining a service type to which the received first request belongs;

[0011] Determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension;

[0012] Acquire a candidate channel associated with the target dimension and a second key value corresponding to the candidate channel;

[0013] Matching the first key value with the second key value to determine a target channel corresponding to the first request;

[0014] The first request is processed based on the current limiting threshold corresponding to the target channel.

[0015] To achieve the above-mentioned purpose, the second aspect of the present application proposes a request processing device, including:

[0016] A first determining module, used to determine the business type to which the received first request belongs;

[0017] A second determination module is used to determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension;

[0018] An acquisition module, used to acquire a candidate channel associated with the target dimension and a second key value corresponding to the candidate channel;

[0019] A third determining module, configured to match the first key value with the second key value to determine a target channel corresponding to the first request;

[0020] A processing module is used to process the first request based on the current limiting threshold corresponding to the target channel.

[0021] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the request processing method as described in the first aspect embodiment.

[0022] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the request processing method described in the first aspect embodiment.

[0023] To achieve the above-mentioned purpose, the fifth aspect embodiment of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the request processing method described in the first aspect embodiment.

[0024] The request processing method, device, electronic device and storage medium provided in the present application first determine the business type to which the received first request belongs, and then determine the target dimension associated with the first request and the first key value of the first request under the target dimension according to the business type. Then obtain the candidate channel associated with the target dimension and the second key value corresponding to the candidate channel, match the first key value with the second key value, determine the target channel corresponding to the first request, and then process the first request based on the current limiting threshold corresponding to the target channel. Thus, by determining the target channel corresponding to the business request transmission based on the business type to which the business request belongs and the key value under the target dimension, and based on the current limiting threshold of the target transmission channel, the business request can be diverted and limited. Thereby, the processing efficiency and reliability of the request can be improved, the system overload caused by excessive data volume can be avoided, and the system processing capacity and stability can be improved.

[0025] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0027] Figure 1 A flowchart of a request processing method provided in an embodiment of the present application;

[0028] Figure 2 A flowchart of another request processing method provided in an embodiment of the present application;

[0029] Figure 3 A flowchart of another request processing method provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of the structure of a request processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0032] The request processing method and device according to the embodiments of the present application are described below with reference to the accompanying drawings.

[0033] It should be noted that the execution subject of the request processing method in the embodiment of the present application is a request processing device, which can be implemented by software and / or hardware and can be configured in an electronic device, which may include but is not limited to a terminal, a server, etc.

[0034] Figure 1 A flowchart of a request processing method provided in an embodiment of the present application.

[0035] In the existing solution for limiting the flow of business requests, it is usually achieved by distributing requests with different URL paths to different channels according to the Uniform Resource Locator (URL) of the request. However, the conditions for request diversion in this way are relatively simple. When user business suddenly increases and the server access traffic is large, the system may be paralyzed and cannot effectively support high-concurrency scenarios, affecting the processing efficiency of requests.

[0036] In response to these problems, in this application, the target channel corresponding to the business request transmission is determined based on the business type to which the business request belongs and the key value under the target dimension, and the flow limiting threshold of the target transmission channel is used to achieve flow diversion and flow limiting of the business request. This can improve the processing efficiency and reliability of the request, avoid system overload caused by excessive data volume, and improve the system processing capacity and stability.

[0037] like Figure 1 As shown, the request processing method includes the following steps:

[0038] Step 101: Determine the service type to which the received first request belongs.

[0039] Among them, the first request can be an instruction or data request sent by a user to the server through any client (such as a browser, mobile application, etc.). The message of the first request can include a field for identifying the business type or business scenario to which the first request belongs. For example, the name of the field can be BusinessType, etc.

[0040] In an embodiment of the present application, after receiving the first request, the business type of the first request can be parsed according to the URL path, or the business type of the first request can be determined according to the fields in the message of the first request, etc. The present disclosure does not limit this.

[0041] It should be noted that the present application can simultaneously receive multiple first requests sent by different clients and process them in parallel. The request processing system provided by the present application can improve the processing capability of the system in high-concurrency scenarios by introducing efficient load balancing strategies (such as polling or minimum number of connections, etc.) and server-side concurrent processing models (such as event-driven or multi-threaded, etc.).

[0042] Step 102: Determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension.

[0043] The target dimension is the basis for limiting the flow of the first request, and may include at least one of the geographic location, user group, and business type.

[0044] It should be noted that different types of businesses have significant differences in business characteristics, needs, and operational strategies, so the target dimensions that need to be focused on when controlling business traffic should also be different. For example, for businesses that provide localized services, such as weather queries and food recommendations, services need to be provided based on geographic location, so the target dimension that should be focused on is geographic location; or, financial businesses can provide different service content for different user groups, so the target dimension that is focused on is usually the user group.

[0045] In the embodiment of the present application, the message of the first request may contain multiple dimension information that can be used to limit the flow of the request, so it is possible to first determine which dimension is needed to limit the flow of the first request according to the business type. Then, after determining the target dimension associated with the first request, the value of the target dimension, that is, the first key value, can be obtained in the message of the first request.

[0046] For example, when the target dimension is geographic location, the first key value of the first request under the geographic location can be "Guangzhou", "Shanghai", etc. When the target dimension is user group, the first key value of the first request under the user group can be "ordinary personnel", "employees", etc. When the target dimension is business type, the first key value of the first request under the business type can be "5g business activation" or "Internet business", etc. When the target dimensions are geographic location and user group, the first key value can be "Guangzhou" and "employees", or "Shanghai" and "employees", etc.

[0047] It should be noted that the target dimensions for limiting the flow of requests of any business type are not fixed, and dimensions can be added or modified according to actual application needs, etc., and this disclosure does not limit this.

[0048] Step 103: Acquire candidate channels associated with the target dimension and second key values ​​corresponding to the candidate channels.

[0049] The second key value refers to the value of the request on the target dimension that any candidate channel allows to transmit when it is determined that the requests are to be diverted on the target dimension.

[0050] In an embodiment of the present application, in the database of the request processing system, the number of candidate channels under different dimensions and the routing rules (i.e., the second key value corresponding to each candidate channel) can be pre-configured. Then, after determining the target dimension associated with the received first request, multiple candidate channels associated with the target dimension are obtained in the database, and each candidate channel can correspond to one or more second key values, and the second key values ​​corresponding to different candidate channels are different. Thus, by making the routing rules of the channel configurable, it is convenient to modify or add routing rules at any time to meet the ever-changing business needs, thereby increasing the flexibility and maintainability of the request processing system.

[0051] Step 104: Match the first key value with the second key value to determine the target channel corresponding to the first request.

[0052] In the embodiment of the present application, the second key value identical to the first key value can be searched among all the second key values ​​corresponding to the candidate channels, and then the candidate channel corresponding to the second key value is determined as the target channel corresponding to the first request. Thus, the candidate channels can be screened to determine through which channel the first request should be transmitted to the server when diverting based on the target dimension.

[0053] In an embodiment of the present application, the request processing system can determine the target channel corresponding to the first request through the routing asserter of the custom gateway module (gateway), combined with the above-mentioned logic of target dimension determination and the key-value matching logic, and mark the service address of the target channel for the first request.

[0054] It is understandable that different candidate channels are independent, that is, the second key values ​​corresponding to different candidate channels are also completely different. Therefore, there will be no situation where the first key value matches multiple second key values, and the target channel corresponding to the first request is unique.

[0055] It should be noted that in some possible cases, such as the first key value has not yet defined a corresponding channel, the channel configuration is unreasonable, or the business type information of the first request is inaccurate, etc., it may cause the first key value to not match any second key value. In this case, a default channel can be pre-set in the database to handle those first requests that cannot be matched to the target channel, or a message that the first request cannot be matched to the target channel can be returned to the alarm platform first, and then the operation and maintenance personnel can optimize the channel routing rules based on this information, increase the coverage of the second key value, and improve the accuracy of the match.

[0056] It is understandable that when the target dimension is only one business dimension, i.e., geographic location or user group, etc., as long as the first key value matches one of the second key values ​​corresponding to any candidate channel, any candidate channel can be determined as the target channel. Alternatively, when the target dimension is two or more business dimensions, the second key value of any candidate channel needs to match the first key value under each target dimension at the same time to determine any candidate channel as the target channel.

[0057] Step 105: Process the first request based on the current limiting threshold corresponding to the target channel.

[0058] In this application, each candidate channel can correspond to a flow limiting threshold, which represents the maximum value of the flow that can be accommodated in the candidate channel, and is used to perform flow control for specific backend services, thereby improving the independence, reliability and practicality of the flow control of each channel.

[0059] It should be noted that the current limiting threshold can be manually set according to business needs, or can be determined based on the historical request volume associated with the second key value corresponding to the channel, etc. For example, the current limiting threshold can be expressed as 100,000 per second or 200,000 per second, and the present disclosure does not limit this.

[0060] In an embodiment of the present application, the request processing system can use a traffic monitoring tool to measure the current traffic value of the target channel, and then determine the relationship between the traffic value and the current limiting threshold. Based on the different size relationships, different processing methods can be adopted for the first request.

[0061] When the current traffic value is less than the current limiting threshold, it can be said that the backend server corresponding to the target channel has sufficient resources to process the first request, so the first request can be sent to the server through the target channel. Alternatively, when the current traffic value is equal to or greater than the current limiting threshold, it can be said that the server has reached the upper limit of its processing capacity. At this time, continuing to process the first request may cause too many processing requests and server overload. Therefore, it can be determined that the first request has failed, and request failure information is returned to the client that sent the first request.

[0062] In this embodiment, the business type to which the received first request belongs is first determined, and then the target dimension associated with the first request and the first key value of the first request under the target dimension are determined according to the business type. Then, the candidate channel associated with the target dimension and the second key value corresponding to the candidate channel are obtained, the first key value is matched with the second key value, the target channel corresponding to the first request is determined, and then the first request is processed based on the current limiting threshold corresponding to the target channel. Thus, the target channel corresponding to the business request transmission is determined based on the business type to which the business request belongs and the key value under the target dimension, and the current limiting threshold of the target transmission channel is used to realize the diversion and current limiting of the business request. Thereby, the processing efficiency and reliability of the request can be improved, the system overload caused by excessive data volume can be avoided, and the system processing capacity and stability can be improved.

[0063] Figure 2 A flowchart of another request processing method provided in an embodiment of the present application.

[0064] like Figure 2 As shown, the request processing method may include the following steps:

[0065] Step 201: determine the flow limiting granularity of each business dimension.

[0066] The service dimension may include at least one of a geographical location, a user group, a service type, etc. When limiting the flow, flow control may be performed from one dimension, or multiple dimensions may be combined to perform flow control.

[0067] Among them, the flow control granularity refers to the different levels or scopes targeted when implementing flow control in any business dimension. The flow control granularity can determine the specific application objects of the flow control.

[0068] In the embodiments of the present application, the flow limiting granularity of each business dimension can be determined according to the flow limiting accuracy required in the actual business. For example, for geographical location, the flow limiting granularity may be city, district, etc.; for user groups, the flow limiting granularity may be occupation, age, credit rating, etc.; for business type, the flow limiting granularity may be the importance of the business, etc., and this disclosure does not limit this.

[0069] Step 202: Determine a second key-value set corresponding to each business dimension based on the current limiting granularity.

[0070] For example, when the business scenario is to provide weather services within Guangdong Province, the city of Guangdong Province can be used as the flow limiting granularity of the geographical location, so the second key value set corresponding to the geographical location can include Guangzhou, Shenzhen, etc. Alternatively, when the province of China is used as the flow limiting granularity of the geographical location, the second key value set corresponding to the geographical location can include Guangdong, Jiangsu, etc.

[0071] It should be noted that the second key-value set corresponding to each business dimension is not fixed, and can be self-defined according to actual current limiting needs, or can be expanded when the range of the second key-value set cannot meet the needs.

[0072] Step 203: Obtain the historical request volume associated with each second key value in the second key value set.

[0073] It should be noted that the historical request volume can be the amount of request data within a preset time period, and the preset time period can be determined according to the accuracy of flow control, for example, the amount of requests within one second. In addition, the historical request volume can be the average value of the number of requests per second within a period of time, or the maximum value of the number of requests per second within a period of time, etc., which is not limited in this disclosure.

[0074] In an embodiment of the present application, for each second key value, in the historical request records on the server side, historical requests in which all messages contain the second key value within a preset time period can be obtained, and the data volume of all historical requests can be counted, so that the channel diversion configuration can be made more in line with actual needs based on the actual request traffic size, thereby improving the reliability and accuracy of the channel configuration.

[0075] Step 204: Determine a candidate channel corresponding to each second key value according to the historical request volume associated with each second key value.

[0076] In an embodiment of the present application, all second key values ​​can be sorted according to the size of the historical request amount associated with each second key value in any second key value set, and then according to the capacity limitation of the channel, it is determined whether to correspond one second key value to one candidate channel or multiple second key values ​​to one candidate channel.

[0077] Optionally, multiple request amount gradient thresholds can be pre-set, such as a first gradient threshold, a second gradient threshold, etc., where the first gradient threshold is the maximum request amount that the channel can handle per unit time, and the second gradient threshold is half of the maximum request amount. Then, when any second key value is greater than or close to the first gradient value, it can be determined that any second key value corresponds to a candidate channel alone. Alternatively, when any two second key values ​​are close to the second gradient threshold, the two second key values ​​can be determined to correspond to the same candidate channel. This application does not limit this.

[0078] It should be noted that it is also possible to determine whether the two second key values ​​correspond to the same candidate channel or to different candidate channels based on whether the two second key values ​​are correlated in a business scenario of actual application.

[0079] It should be noted that the second key value corresponding to a candidate channel can not only include multiple second key values ​​in any second key value set, but also include multiple second key values ​​in different second key value sets, and the second key values ​​in different second key value sets are in an AND relationship. For example, when performing business diversion in a cross-border e-commerce scenario, the geographical location of the request (i.e., the country or region where the user is located) and the specific business type (such as order modification or payment processing, etc.) can be considered at the same time to divert the request to different server groups for processing through the channel. The second key values ​​corresponding to the candidate channel can be "China" and "Order Payment".

[0080] Optionally, the reference request quantity associated with the candidate channel may be determined according to the second key value corresponding to the candidate channel and the historical request quantity associated with the second key value. Then, the current limiting threshold corresponding to the candidate channel may be determined based on the reference request quantity associated with the candidate channel.

[0081] The reference request volume refers to the historical request volume associated with all second key values ​​corresponding to the candidate channel.

[0082] It should be noted that the sum or maximum value of the reference request quantities associated with the candidate channels can be calculated based on the request processing capacity of the actual channel or business needs, and the obtained value can be determined as the current limiting threshold corresponding to the candidate channel, so that the current limiting threshold can be more reasonable, avoid excessive restriction or excessive relaxation, and improve the stability of the channel.

[0083] Optionally, the maximum value of the reference request amounts may be determined as the current limiting threshold corresponding to the candidate channel.

[0084] Alternatively, the sum of the reference request amounts may be determined as the current limiting threshold corresponding to the candidate channels.

[0085] Alternatively, the sum of the maximum value of the reference request amount and the preset margin may be determined as the current limiting threshold corresponding to the candidate channel.

[0086] Among them, the preset margin can be customized according to business needs, for example, it can be 10% of the maximum value of the reference request amount, etc., and this application does not limit this.

[0087] It should be noted that the current limiting algorithm used by each candidate channel when controlling the flow can also be determined based on the reference request volume, such as the token bucket algorithm, leaky bucket algorithm, time window algorithm, query per second (QPS) current limiting, etc. In this application, the current limiting algorithms corresponding to different candidate channels can be different to improve the diversity and reliability of channel current limiting.

[0088] It is understandable that due to the different stability of different current limiting algorithms and different tolerances to traffic surges, the appropriate current limiting algorithm can be selected to control traffic based on the size of the reference request volume and the trend of changes in the historical period. For example, the token bucket algorithm can smoothly limit the rate at which each user or application sends requests, allowing a certain degree of traffic bursts, and is suitable for high-traffic scenarios. The leaky bucket algorithm can control traffic at a fixed rate and has good stability. It is suitable for scenarios with high traffic and long-term control. The time window algorithm can limit the number of connection requests received within a specific time window to prevent a sudden large number of connection requests from affecting normal operation. It is suitable for scenarios with small traffic surges.

[0089] In this embodiment, the flow limiting granularity of each business dimension is first determined, and then based on the flow limiting granularity, the second key value set corresponding to each business dimension is determined, and then the historical request volume associated with each second key value in the second key value set is obtained, and then the candidate channel corresponding to each second key value is determined based on the historical request volume associated with each second key value. Thus, by determining multiple second key values ​​based on the flow limiting granularity under the business dimension, and then classifying multiple second key values ​​according to the historical request volume associated with the second key values, each corresponding to a candidate channel. Thus, the classification of channels under different business dimensions is realized, which provides conditions for the subsequent use of channels of different classifications to divert requests, and improves the accuracy and reliability of request processing.

[0090] Figure 3 A flowchart of another request processing method provided in an embodiment of the present application.

[0091] like Figure 3 As shown, the request processing method may include the following steps:

[0092] Step 301: Determine the service type to which the received first request belongs.

[0093] Step 302: Determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension.

[0094] Step 303: Acquire the candidate channel associated with the target dimension and the second key value corresponding to the candidate channel.

[0095] Step 304: Match the first key value with the second key value to determine the target channel corresponding to the first request.

[0096] For detailed description of the above steps 301 to 304, please refer to other embodiments of the present disclosure and will not be repeated here.

[0097] Step 305, determining the current flow value of the target channel.

[0098] In an embodiment of the present application, the request processing system can obtain various interaction information, such as request duration, by adopting suitable traffic monitoring tools, such as Prometheus, Grafana, etc., and performing tracking at the interface corresponding to the channel, and can monitor the requests sent to any channel in real time and count the current traffic value.

[0099] Step 306: compare the current flow value with the flow limit threshold corresponding to the target channel.

[0100] In the embodiment of the present application, it is possible to determine whether the current target channel has sufficient resources to process the first request by judging the size relationship between the current flow value and the current limiting threshold corresponding to the target channel.

[0101] Step 307: When the traffic value is greater than the current limiting threshold, a request failure is returned to the client associated with the first request.

[0102] In an embodiment of the present application, when the traffic value is greater than the current limiting threshold, it means that the current target channel has reached the maximum request processing capacity and there are insufficient resources to process the first request. In this case, the first request can be rejected and a preset request failure message or request error message can be returned to the client associated with the first request.

[0103] In the present application, after receiving the returned request failure information or request error information, the client can directly resend the service request, or wait for a period of time and re-push the service in the order of increasing time.

[0104] Optionally, when the current traffic value is less than the current limiting threshold, the first request may be sent to the target channel, so that the target channel may transmit the first request to a corresponding server for processing.

[0105] It should be noted that whether the target channel can currently process the first request may also be determined according to a current limiting algorithm corresponding to the target channel.

[0106] For example, when the current limiting algorithm corresponding to the target channel is the token bucket algorithm, the speed at which the target channel token bucket algorithm generates tokens is constant and can be customized, and the number of tokens in the token bucket is also configurable (that is, it can be the current limiting threshold obtained above), indicating the maximum number of requests that can be processed at one time. After determining the target channel corresponding to the first request, the first request can obtain tokens from the token bucket associated with the target channel. When there are enough available tokens in the token bucket, the first request can obtain tokens, allowing the first request to be sent to the server for processing. Alternatively, when there are no available tokens in the token bucket, the first request cannot obtain a token, and the first request is refused to be sent to the server, and the request fails.

[0107] Step 308: Increase the number of request failures associated with the target channel by 1.

[0108] In the embodiment of the present application, the request processing system can perform tracking at the inflection point of distributing requests to each channel, monitor whether each request is sent successfully, and then count the number of request failures corresponding to each channel. In the case where any first request is restricted, the number of request failures associated with the target channel can be increased by 1.

[0109] It should be noted that in the present application, the key information of the first request (such as the first key value of the first request under the target dimension, or the target channel corresponding to the first request, etc.) can be recorded in a preset monitoring queue, so that it can be determined in the monitoring queue which type of requests corresponding to key values ​​or requests corresponding to target channels have a high failure rate, which is convenient for operation and maintenance personnel to perform maintenance.

[0110] Step 309: When the number of request failures reaches a preset alarm threshold, alarm information associated with the target channel is generated and sent to the alarm platform.

[0111] Among them, the preset alarm threshold can be determined based on the actual accuracy requirements for request processing stability, the current limiting algorithm corresponding to the target channel, etc. For example, it can be 5 per minute, 2 per second, etc., and this application does not limit this.

[0112] In an embodiment of the present application, when the number of request failures reaches a preset alarm threshold, an alarm message can be generated and sent to an alarm platform to remind operation and maintenance personnel that there may be configuration errors or abnormalities in the target channel, so as to facilitate operation and maintenance personnel to perform maintenance in a timely and accurate manner, improve the robustness of the request processing system, and further improve the request processing efficiency.

[0113] It should be noted that in the present application, the number of request failures associated with all channels can also be added together and a corresponding alarm threshold can be set. When the value obtained after the addition reaches the alarm threshold, an alarm message can also be generated and sent to the alarm platform to remind the operation and maintenance personnel that the routing rules of the current channel configuration may have low accuracy, so as to correct the routing rules of the candidate channels, which will help reduce the monitoring workload of the operation and maintenance personnel and improve the sustainability of the system traffic balance.

[0114] In this embodiment, the current flow value of the target channel is first determined, and the current flow value is compared with the current limiting threshold corresponding to the target channel. Then, when the flow value is greater than the current limiting threshold, the request failure is returned to the client associated with the first request, and the number of request failures associated with the target channel is increased by 1. After that, when the number of request failures reaches the preset alarm threshold, an alarm message associated with the target channel is generated and sent to the alarm platform. Thus, the relationship between the current flow value and the current limiting threshold is judged. When the first request fails, the number of request failures is updated, and then the alarm message is sent when the number of failures reaches the alarm threshold, so that the operation and maintenance personnel can perform maintenance in a timely and accurate manner, improve the robustness of the request processing system, and further improve the request processing efficiency.

[0115] In order to implement the above embodiment, the present application also proposes a request processing device.

[0116] Figure 4 A schematic diagram of the structure of a request processing device provided in an embodiment of the present application.

[0117] like Figure 4 As shown, the request processing device 400 includes:

[0118] A first determining module 401 is used to determine the service type to which the received first request belongs;

[0119] A second determination module 402 is used to determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension;

[0120] An acquisition module 403 is used to acquire a candidate channel associated with a target dimension and a second key value corresponding to the candidate channel;

[0121] A third determination module 404 is used to match the first key value with the second key value to determine a target channel corresponding to the first request;

[0122] The processing module 405 is used to process the first request based on the current limiting threshold corresponding to the target channel.

[0123] In some embodiments, the acquisition module 403 is further used to:

[0124] Determine the flow limit granularity for each business dimension;

[0125] Based on the current limiting granularity, determine the second key value set corresponding to each business dimension;

[0126] Obtain the historical request volume associated with each second key value in the second key value set;

[0127] According to the historical request volume associated with each second key value, a candidate channel corresponding to each second key value is determined.

[0128] In some embodiments, the dimension includes at least one of geographic location, user group, and business type.

[0129] In some embodiments, the acquisition module 403 is further used to:

[0130] Determine a reference request quantity associated with the candidate channel according to the second key value corresponding to the candidate channel and the historical request quantity associated with the second key value;

[0131] Based on the reference request volume associated with the candidate channel, a current limiting threshold corresponding to the candidate channel is determined.

[0132] In some embodiments, the acquisition module 403 is further specifically configured to:

[0133] The maximum value of the reference request amount is determined as the current limiting threshold corresponding to the candidate channel; or,

[0134] The sum of the reference request amounts is determined as the current limiting threshold corresponding to the candidate channel; or,

[0135] The sum of the maximum value of the reference request amount and the preset margin is determined as the current limiting threshold corresponding to the candidate channel.

[0136] In some embodiments, the processing module 405 is specifically configured to:

[0137] Determine the current flow value of the target channel;

[0138] Compare the current flow value with the current limiting threshold corresponding to the target channel;

[0139] When the flow value is less than the flow limit threshold, the first request is sent to the target channel.

[0140] In some embodiments, the processing module 405 is further configured to:

[0141] When the traffic value is greater than the current limiting threshold, a request failure is returned to the client associated with the first request;

[0142] Increase the number of failed requests associated with the target channel by 1;

[0143] When the number of request failures reaches the preset alarm threshold, an alarm message associated with the target channel is generated and sent to the alarm platform.

[0144] It should be noted that the aforementioned explanation of the request processing method embodiment is also applicable to the request processing device of this embodiment, and will not be repeated here.

[0145] In an embodiment of the present application, the business type to which the received first request belongs is first determined, and then the target dimension associated with the first request and the first key value of the first request under the target dimension are determined according to the business type. Then, the candidate channel associated with the target dimension and the second key value corresponding to the candidate channel are obtained, the first key value is matched with the second key value, the target channel corresponding to the first request is determined, and then the first request is processed based on the current limiting threshold corresponding to the target channel. Thus, the target channel corresponding to the business request transmission is determined based on the business type to which the business request belongs and the key value under the target dimension, and the current limiting threshold of the target transmission channel is used to realize the diversion and current limiting of the business request. Thereby, the processing efficiency and reliability of the request can be improved, the system overload caused by excessive data volume can be avoided, and the system processing capacity and stability can be improved.

[0146] In order to implement the above embodiments, the present application also proposes an electronic device, including: a processor, and a memory connected to the processor for communication; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the request processing method provided by the above embodiments.

[0147] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the request processing method provided by the above embodiments.

[0148] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the request processing method provided by the above embodiments when executed by a processor.

[0149] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0150] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

[0151] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.

[0152] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0153] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0154] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0155] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0156] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0157] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0158] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0159] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A request processing method, characterized in that: include: Determining a service type to which the received first request belongs; Determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension; Acquire a candidate channel associated with the target dimension and a second key value corresponding to the candidate channel; Matching the first key value with the second key value to determine a target channel corresponding to the first request; The first request is processed based on the current limiting threshold corresponding to the target channel.

2. The method according to claim 1, characterized in that Before acquiring the candidate channel corresponding to the target dimension and the second key value corresponding to the candidate channel, the method further includes: Determine the flow limit granularity for each business dimension; Based on the current limiting granularity, determine a second key value set corresponding to each of the business dimensions; Obtain the historical request volume associated with each second key value in the second key value set; According to the historical request volume associated with each second key value, a candidate channel corresponding to each second key value is determined.

3. The method according to claim 1 or 2, characterized in that The dimension includes at least one of geographical location, user group, and business type.

4. The method according to any one of claim 2, characterized in that: After determining the candidate channel corresponding to each second key value, the method further includes: Determine a reference request amount associated with the candidate channel according to the second key value corresponding to the candidate channel and the historical request amount associated with the second key value; Based on the reference request amount associated with the candidate channel, a current limiting threshold corresponding to the candidate channel is determined.

5. The method according to claim 4, characterized in that The determining, based on the reference request amount associated with the candidate channel, a current limiting threshold corresponding to the candidate channel includes: Determine the maximum value of the reference request amounts as the current limiting threshold corresponding to the candidate channel; or, Determine the sum of the reference request amounts as the current limiting threshold corresponding to the candidate channel; or, The sum of the maximum value of the reference request amount and the preset margin is determined as the current limiting threshold corresponding to the candidate channel.

6. The method according to claim 1, characterized in that The processing of the first request based on the current limiting threshold corresponding to the target channel includes: Determine the current flow value of the target channel; Compare the current flow value with the current limiting threshold corresponding to the target channel; When the flow value is less than the flow limiting threshold, the first request is sent to the target channel.

7. The method according to claim 6, characterized in that After comparing the current flow value with the current limiting threshold corresponding to the target channel, the method further includes: When the traffic value is greater than the current limiting threshold, returning a request failure to the client associated with the first request; Add 1 to the number of failed requests associated with the target channel; When the number of request failures reaches a preset alarm threshold, alarm information associated with the target channel is generated and sent to the alarm platform.

8. A request processing device, characterized in that: include: A first determining module, used to determine the business type to which the received first request belongs; A second determination module is used to determine, according to the business type, a target dimension associated with the first request and a first key value of the first request under the target dimension; An acquisition module, used to acquire a candidate channel associated with the target dimension and a second key value corresponding to the candidate channel; A third determining module, configured to match the first key value with the second key value to determine a target channel corresponding to the first request; A processing module is used to process the first request based on the current limiting threshold corresponding to the target channel.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the request processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the request processing method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the request processing method according to any one of claims 1 to 7.