Request processing method and device, equipment, readable storage medium and program product
By screening the target interface and dividing the request according to the request and priority, the request rejection and resource occupation problems were solved under traditional flow control methods, and the request processing efficiency and user experience were improved.
Patent Information
- Application Number
- CN202411522224.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-28
AI Technical Summary
In high concurrency scenarios, traditional server traffic control methods will reject requests without distinction, resulting in a reduced user experience and an increased network resource usage, affecting server processing efficiency.
By obtaining the request logo and interface information, the target interface is screened, and the requests are divided into the first and second categories according to the request quantity and priority. The first type of request is sent to the target interface, and the second type of request is sent to the spare interface.
The request processing efficiency has been improved, the user waiting time is reduced, the service resource utilization rate is optimized, and the over occupation of network resources is avoided.
Smart Images

Figure CN119376945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a request processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of cloud computing technology, the number of concurrent requests between terminals and servers is also growing rapidly. In high-concurrency scenarios, in order to ensure the stability of the server's system services, it is necessary to control the flow of each request.
[0003] In the traditional way, a traffic threshold is set for the server. If the number of requests received by the server in a short period of time reaches the traffic threshold, the server will indiscriminately reject the requests. This method greatly reduces the user experience and may cause users to click and retry repeatedly, increasing the occupation of network resources and thus affecting the server's processing efficiency of requests. Summary of the invention
[0004] Based on this, it is necessary to provide a request processing method, apparatus, computer device, computer-readable storage medium and computer program product that can improve request processing efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides a request processing method, comprising:
[0006] In the case of receiving multiple requests, obtain the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests; based on each of the request identifiers and the interface information, filter the target interface that meets the interface filtering conditions in each of the interfaces; in the case where the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface, determine the request priority of each of the requests based on each of the request identifiers; divide each of the requests into a first category of requests and a second category of requests according to each of the request priorities and the request amount threshold, wherein the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request amount corresponding to the first category of requests is less than or equal to the request amount threshold; send the first category of requests to the target interface, and send the second category of requests to interfaces other than the target interface.
[0007] In one of the embodiments, the request identifier includes a user type identifier and a business type identifier; determining the request priority of each request based on each request identifier includes: determining the user priority configured for each user type identifier, and the business priority configured for each business type identifier; for each request, analyzing the priority of the request based on the user priority and the business priority to obtain the request priority of the request.
[0008] In one of the embodiments, for each of the requests, the priority of the request is analyzed based on the user priority and the business priority to obtain the request priority of the request, including: for each of the requests, obtaining the type association information between the user type identifier and the business type identifier; based on the adjustment coefficient corresponding to the type association information, adjusting the user priority and the business priority to obtain the user adjustment priority and the business adjustment priority; based on the user adjustment priority and the business adjustment priority, analyzing the priority of the request to obtain the request priority of the request.
[0009] In one of the embodiments, the second type of request includes multiple target requests; sending the second type of request to interfaces other than the target interface includes: determining interfaces other than the target interface as backup interfaces among the interfaces; determining delayed sending durations that match the request priorities of the respective target requests; and for each of the target requests, sending the target request to the backup interface at a request sending time corresponding to the delayed sending duration.
[0010] In one of the embodiments, the interface information includes an interface idle rate; based on each of the request identifiers and each of the interface information, the target interface that meets the interface screening conditions is screened in each of the interfaces, including: screening a plurality of candidate interfaces that match each of the request identifiers in each of the interfaces; and screening a target interface whose interface idle rate is greater than a preset idle rate in each of the candidate interfaces.
[0011] In one of the embodiments, the method also includes: obtaining the flow control frequency of the token bucket configured for the target interface, the request response time of the target interface for each request in the first type of request, and the average response time of the target interface to historical requests; adjusting the flow control frequency to obtain a new flow control frequency according to the numerical difference between each request response time and the average response time; and determining an adjusted request volume threshold based on the new flow control frequency, wherein the request volume threshold and the flow control frequency are positively correlated.
[0012] In a second aspect, the present application further provides a request processing device, including:
[0013] An acquisition module is used to, when receiving multiple requests, obtain the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests; an interface screening module is used to screen the target interfaces that meet the interface screening conditions from each of the interfaces based on the request identifiers and the interface information; a priority determination module is used to determine the request priority of each of the requests based on the request identifiers when the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface; a request classification module is used to classify each of the requests into first-category requests and second-category requests according to the request priorities and the request amount threshold, wherein the request priority of each request in the first-category requests is greater than or equal to the request priority of each request in the second-category requests, and the request amount corresponding to the first-category requests is less than or equal to the request amount threshold; a request sending module is used to send the first-category requests to the target interface, and send the second-category requests to interfaces other than the target interface.
[0014] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0015] In the case of receiving multiple requests, obtain the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests; based on each of the request identifiers and the interface information, filter the target interface that meets the interface filtering conditions in each of the interfaces; in the case where the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface, determine the request priority of each of the requests based on each of the request identifiers; divide each of the requests into a first category of requests and a second category of requests according to each of the request priorities and the request amount threshold, wherein the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request amount corresponding to the first category of requests is less than or equal to the request amount threshold; send the first category of requests to the target interface, and send the second category of requests to interfaces other than the target interface.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0017] In the case of receiving multiple requests, obtain the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests; based on each of the request identifiers and the interface information, filter the target interface that meets the interface filtering conditions in each of the interfaces; in the case where the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface, determine the request priority of each of the requests based on each of the request identifiers; divide each of the requests into a first category of requests and a second category of requests according to each of the request priorities and the request amount threshold, wherein the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request amount corresponding to the first category of requests is less than or equal to the request amount threshold; send the first category of requests to the target interface, and send the second category of requests to interfaces other than the target interface.
[0018] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0019] In the case of receiving multiple requests, obtain the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests; based on each of the request identifiers and the interface information, filter the target interface that meets the interface filtering conditions in each of the interfaces; in the case where the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface, determine the request priority of each of the requests based on each of the request identifiers; divide each of the requests into a first category of requests and a second category of requests according to each of the request priorities and the request amount threshold, wherein the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request amount corresponding to the first category of requests is less than or equal to the request amount threshold; send the first category of requests to the target interface, and send the second category of requests to interfaces other than the target interface.
[0020] The above-mentioned request processing method, device, computer equipment, computer-readable storage medium and computer program product, when receiving multiple requests, obtain the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests, and based on each request identifier and each interface information, screen the target interface that meets the interface screening condition in each interface, so that the subsequent target interface can process the first request, thereby improving the overall processing efficiency of each request. In the case where the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface, the request priority of each request is determined based on each request identifier, and each request is divided into a first category request and a second category request according to each request priority and request amount threshold, wherein the request priority of each request in the first category request is greater than or equal to the request priority of each request in the second category request, and the request amount corresponding to the first category request is less than or equal to the request amount threshold. Using the above-mentioned method, the first category request with a higher priority is sent to the target interface, and the second category request with a lower priority is sent to the interface other than the target interface, which is conducive to the timely processing of the request by each interface, thereby improving the request processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0022] FIG1 is an application environment diagram of a request processing method in one embodiment;
[0023] FIG2 is a schematic diagram of a process flow of a request processing method in one embodiment;
[0024] FIG3 is a schematic flow chart of a method for determining request priority in one embodiment;
[0025] FIG4 is a flow chart of a method for determining request priority in another embodiment;
[0026] FIG5 is a schematic flow chart of a flow control method in one embodiment;
[0027] FIG6 is a schematic diagram of the structure of a token bucket in one embodiment;
[0028] FIG7 is a structural block diagram of a request processing device in one embodiment;
[0029] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.
[0032] The request processing method provided in the embodiment of the present application can be applied in the application environment shown in FIG1. The terminal 102 communicates with the target server 104 through the network, and the terminal 102 communicates with the candidate server 106 through the network. The data storage system can store the data that the target server 104 and the candidate server 106 need to process. The data storage system can be integrated on the target server 104 or the candidate server 106, or it can be placed on the cloud or other network servers.
[0033] When receiving multiple requests, the terminal 102 obtains the request identifiers of each of the multiple requests and the interface information of each of the multiple interfaces for processing the requests. Based on each request identifier and each interface information, the terminal 102 screens the target interface that meets the interface screening condition in each interface. When the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface, the terminal 102 determines the request priority of each request based on each request identifier. According to each request priority and the request amount threshold, the terminal 102 divides each request into a first-class request and a second-class request, wherein the request priority of each request in the first-class request is greater than or equal to the request priority of each request in the second-class request, and the request amount corresponding to the first-class request is less than or equal to the request amount threshold. The terminal 102 sends the first-class request to the target interface and sends the second-class request to the interface other than the target interface. The target interface may be an interface in the target server 104.
[0034] The alternative server 106 can obtain the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests from the terminal 102 when receiving multiple requests. The alternative server 106 selects the target interface that meets the interface screening condition from the interfaces based on the request identifiers and the interface information. When the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface, the alternative server 106 determines the request priority of each request based on the request identifiers. The alternative server 106 divides each request into a first-class request and a second-class request according to the request priority and the request amount threshold, wherein the request priority of each request in the first-class request is greater than or equal to the request priority of each request in the second-class request, and the request amount corresponding to the first-class request is less than or equal to the request amount threshold. The alternative server 106 sends the first-class request to the target interface and sends the second-class request to the interface other than the target interface. Among them, the target interface can be an interface in the target server 104. The alternative server 106 can also directly obtain the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests.
[0035] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The target server 104 and the candidate server 106 may each be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.
[0036] In an exemplary embodiment, as shown in FIG2 , a request processing method is provided, which is described by taking the method applied to the terminal 102 in FIG1 as an example, and includes the following S202 to S210. Among them:
[0037] S202: When multiple requests are received, obtain request identifiers of the multiple requests and interface information of the multiple interfaces for processing the requests.
[0038] The request may be a message sent to a server based on a specific network communication protocol, such as an HTTP protocol request. The request may be a message sent from a terminal to a server, and the server may process the request to obtain a response, which indicates feedback information obtained from processing the request.
[0039] The request identifier may be identification information in the request, and the identification information may include information such as the request initiator, the request receiver, and the request time.
[0040] An interface can represent a virtual interface at the software level. At the software level, a virtual interface can represent a reference type. Specifically, a virtual interface can represent members that a class or other type must implement, such as methods, properties, indexers, and events.
[0041] The interface can also be an interface in the server. For example, Web API interface, service interface. Among them, Web API is an interface that communicates through the HTTP protocol, which allows clients (such as browsers, mobile applications, etc.) to interact with the server to obtain or update data. The service interface represents the service access point provided by the server. These services can be database access, file processing, business logic, etc. The service interface defines how the client interacts with these services, including the format of the request, the format of the response, and error handling.
[0042] The interface information may represent the attributes of the information processing dimension of the interface. For example, the interface information includes the interface address, the processing capability of the interface for requests, and the historical processing records of the interface for various requests.
[0043] Specifically, when receiving multiple requests, the terminal can obtain the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests. The terminal can also obtain the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests from the server.
[0044] In one embodiment, the terminal may obtain interface information corresponding to an interface in the target server from the target server. The terminal may obtain request identifiers of respective multiple requests from different clients.
[0045] S204, based on each request identifier and each interface information, select a target interface that meets the interface screening condition from each interface.
[0046] The interface screening condition indicates the screening condition configured for each interface. If the interface meets the interface screening condition, the interface can be the target interface. If the interface does not meet the interface screening condition, the interface can be the backup interface.
[0047] The interface screening condition may include a first screening condition configured for the request identifier and a second screening condition configured for the interface information. The target interface may be an interface that satisfies both the first screening condition and the second screening condition. The target interface may also be an interface that satisfies at least one of the first screening condition or the second screening condition.
[0048] If the interface satisfies the first screening condition, it may indicate that the interface can process the request corresponding to the request identifier in the first screening condition. If the interface satisfies the second screening condition, it may indicate that the interface information of the interface matches the information specified in the second screening condition. For example, the interface information may include an interface idle rate, and the information specified in the second screening condition may be a threshold configured for the interface idle rate. If the interface idle rate is greater than the threshold, it may indicate that the interface information matches the information specified in the second screening condition.
[0049] The target interface indicates the interface that meets the interface filter criteria.
[0050] Specifically, the interface screening condition includes a first screening condition configured for the request identifier and a second screening condition configured for the interface information. The terminal can screen the first interface that meets the first screening condition from each interface. The terminal can screen the second interface that meets the second screening condition from each interface. The terminal can combine the first interface and the second interface to obtain the target interface. The target interface can be the union of each first interface and each second interface. The target interface can also be the intersection of each first interface and each second interface. For example, the first interface includes interface 1, interface 2, and interface 3, and the second interface includes interface 3 and interface 4. The union indicates that the target interface is interface 1, 2, 3, and 4. The intersection indicates that the target interface is interface 3.
[0051] In one embodiment, the interface information includes an interface idle rate, and the terminal can select multiple candidate interfaces matching each request identifier from each interface. The terminal can select a target interface whose interface idle rate is greater than a preset idle rate from each candidate interface.
[0052] S206: When the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface, determine the request priority of each request based on each request identifier.
[0053] The request volume may represent the number of requests per unit time.
[0054] The request volume threshold may indicate the upper limit of the number of requests that an interface (which may be a target interface or other interface) can carry within a unit of time. For example, the request volume threshold of an interface may indicate that the interface can accept or process a maximum of 100 requests within 1 second.
[0055] If the request volume corresponding to each request is greater than or equal to the request volume threshold of the target interface, it means that if all requests are sent to the target interface, the target interface is at risk of overload and downtime, affecting the stability of the system corresponding to the interface.
[0056] The request priority may indicate the basis for sorting the requests. The higher the request priority, the higher the request can be sorted, and the lower the request priority, the lower the request can be sorted.
[0057] Specifically, when the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface, the terminal may determine the request priority of each request based on each request identifier.
[0058] Specifically, the request identifier may include a service type identifier and a user type identifier, and the terminal may determine the request priority of each request according to the service type identifier and / or the user type identifier.
[0059] In one of the embodiments, ideally, each request corresponds to a service type identifier and a user type identifier, but in some cases, the request lacks a service type or a user type identifier. The terminal can determine the total number of service type identifiers and the total number of user type identifiers corresponding to each request. If the total number of service type identifiers is greater than the total number of user type identifiers, the terminal can determine the request priority of each request based on the service type identifier. For a request that lacks a service type identifier, a default priority can be determined as the request priority of the request.
[0060] In one embodiment, if the total number of service type identifiers is less than the total number of user type identifiers, the terminal may determine the request priority of each request based on the user type identifier. For a request lacking a user type identifier, a default priority may be determined as the request priority of the request.
[0061] In one of the embodiments, if the total number of service type identifiers is equal to the total number of user type identifiers, the terminal may determine the request priority of each request based on the service type identifier and the user type identifier.
[0062] Specifically, the terminal may also determine the request priority of each request only according to each user type identifier. The terminal may also determine the request priority of each request only according to each service type identifier.
[0063] The terminal may also determine the user priority configured for each user type identifier and the service priority configured for each service type identifier. The terminal may analyze the priority of the request based on the user priority and the service priority for each request to obtain the request priority of the request.
[0064] S208: Classify each request into a first category request and a second category request according to each request priority and request amount threshold.
[0065] The first type of request may represent multiple requests with higher request priorities. The second type of request may represent multiple requests with lower request priorities. The request priority of each request in the first type of request is greater than or equal to the request priority of each request in the second type of request.
[0066] The request volume corresponding to the first type of request represents the request volume corresponding to each request in the first type of request. Specifically, the request volume corresponding to the first type of request may represent the total number of requests in the first type of request.
[0067] The request volume corresponding to the first type of request is less than or equal to the request volume threshold, which can ensure that if the first type of request is sent to the target interface corresponding to the request volume threshold, the target interface will not be at risk of overload or downtime.
[0068] Specifically, the terminal may classify each request into first-category requests and second-category requests according to each request priority and request amount threshold. In one embodiment, the terminal may sort each request according to each request priority. The terminal may determine the order corresponding to the request amount threshold and the previous multiple requests as first-category requests, and determine the other requests as second-category requests. For example, there are 10 requests, and the request amount threshold is 4. The 10 requests are sorted in descending order according to the size of the request priority, and the top 4 requests are determined as first-category requests, and the bottom 6 requests are determined as second-category requests.
[0069] S210, sending the first type of request to the target interface, and sending the second type of request to an interface other than the target interface.
[0070] Among them, the interface other than the target interface may be a spare interface. The spare interface may be an interface with weaker request processing capability than the target interface. The spare interface may also be an interface whose interface address is adjacent to the interface address of the target interface. The spare interface may also be an interface whose historical processing record is similar to that of the target interface.
[0071] Specifically, the terminal may send the first type of request to the target interface, and send the second type of request to an interface other than the target interface.
[0072] In one embodiment, the terminal may determine an interface other than the target interface as a standby interface, in order to ensure the system stability corresponding to the standby interface. The terminal may determine the sending strategy of each request according to the priority of each request in the second type request. The terminal may send the request corresponding to the sending strategy to the standby interface according to each sending strategy.
[0073] In one embodiment, the sending strategy includes: requesting corresponding sending batches, the terminal can sequentially send the requests contained in each sending batch to the standby interface. For example, the terminal can divide each request in the second type of request into a first batch of requests and a second batch of requests according to the respective request priorities of each request, and the terminal can first send the first batch of requests to the standby interface, and then send the second batch of requests to the standby interface.
[0074] In one embodiment, the sending strategy further includes: a delayed sending time of the request, and the terminal can send the request to the standby interface according to the delayed sending time of the request. For example, the terminal can first determine the delayed sending time that matches the request priority of each target request. The terminal can send the target request to the standby interface according to the request sending time corresponding to the delayed sending time for each target request.
[0075] In the above request processing method, when multiple requests are received, the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests are obtained, and based on the request identifiers and the interface information, the target interfaces that meet the interface screening conditions are screened in each interface, so that the subsequent target interface can process the first request, thereby improving the overall processing efficiency of each request. When the request volume corresponding to each request is greater than or equal to the request volume threshold of the target interface, the request priority of each request is determined based on each request identifier, and each request is divided into a first category request and a second category request according to each request priority and the request volume threshold, wherein the request priority of each request in the first category request is greater than or equal to the request priority of each request in the second category request, and the request volume corresponding to the first category request is less than or equal to the request volume threshold. By using the above method, the first category request with a higher priority is sent to the target interface, and the second category request is sent to the interface other than the target interface, which is conducive to the timely processing of the request by each interface, thereby improving the request processing efficiency.
[0076] In one embodiment, as shown in FIG3 , S206 includes S302 to S304 . Among them:
[0077] S302: Determine the user priority configured for each user type identifier and the service priority configured for each service type identifier.
[0078] The request identifier may include a user type identifier and a service type identifier.
[0079] The user type identifier may be an identifier corresponding to the request initiator of the request. The user type identifier may also be a terminal identifier corresponding to the terminal that generates the request. The business type identifier may be an identifier corresponding to the business to which the request belongs. The business may be a specific business of a specific industry, for example, a loan business, a savings business, etc. in the financial industry.
[0080] User priority indicates the priority configured for user type. The higher the user priority, the more important the request with the corresponding user type identifier is. Business priority indicates the priority configured for business type. The higher the business priority, the more impact the request with the corresponding business type identifier has on the core business / core service.
[0081] Specifically, the terminal can obtain the user priority configured for each user type identifier and the service priority configured for each service type identifier. In one embodiment, in order to facilitate subsequent processing of requests for missing service type identifiers or missing user type identifiers, the terminal can also obtain user default priority and service default priority.
[0082] S304: For each request, the priority of the request is analyzed based on the user priority and the service priority to obtain the request priority of the request.
[0083] There are many ways to analyze the priority of a request. Specifically, for each request, the terminal may compare the user priority and the service priority and determine the higher priority as the request priority of the request.
[0084] In one embodiment, the terminal may further sort the user priority and the service priority respectively to obtain the user priority sorting and the service priority sorting. The terminal may perform average processing on the sorting of the two priorities to obtain the request priority of the request.
[0085] In one embodiment, the terminal may obtain type association information between the user type identifier and the service type identifier for each request. The terminal may adjust the user priority and the service priority based on the adjustment coefficient corresponding to the type association information to obtain the user adjustment priority and the service adjustment priority. The terminal may analyze the priority of the request based on the user adjustment priority and the service adjustment priority to obtain the request priority of the request.
[0086] In this embodiment, the request identifier includes a user type identifier and a service type identifier. The terminal can determine the user priority configured for each user type identifier and the service priority configured for each service type identifier. For each request, the terminal can analyze the priority of the request based on the user priority and the service priority to obtain the request priority of the request, and analyze the priority of the request based on the priorities of multiple dimensions to obtain the request priority of the request, thereby improving the accuracy of determining the request priority.
[0087] In one embodiment, as shown in FIG4 , S304 includes S402 to S406 . Among them:
[0088] S402: For each request, obtain type association information between the user type identifier and the service type identifier.
[0089] Among them, the type association information can indicate the degree of influence of each user type identifier on each business type identifier. For example, the user type identifier of a request is that the requesting party of the request is device A, and the business type identifier of the request is that the request belongs to core business A. If all the requests issued by device A are to call core business A, and the number of calls exceeds the average number of historical calls, it can be considered that the user type identifier has a high degree of influence on the business type identifier. Similarly, if only 10% of the requests issued by device A are to call core business A, it is considered that the user type identifier has a low degree of influence on the business type identifier.
[0090] Specifically, as shown in the comparison table of type identifiers and type association information in Table 1 below, the terminal can count the number of occurrences of requests for each service type identifier for each user type identifier. The terminal can determine the degree of influence between the user type identifier and the service type identifier based on the number of occurrences of each request.
[0091] Table 1 Comparison table of type identification and type association information
[0092]
[0093] Among them, as shown in Table 1 above, the type association information (influence degree) between user type identifier a and service type A is 0.66. The type association information (influence degree) between user type identifier a and service type B is 0.33. The type association information (influence degree) between user type identifier b and service type A is 0.5. The type association information (influence degree) between user type identifier b and service type B is 0.5. It should be noted that the higher the value corresponding to the type association information, the more important the request corresponding to the corresponding user type identifier and the corresponding service type identifier is.
[0094] S404: Adjust the user priority and the service priority based on the adjustment coefficient corresponding to the type association information to obtain the user adjustment priority and the service adjustment priority.
[0095] The adjustment coefficient may be a coefficient configured for the type association information, and the adjustment coefficient may be positively correlated with the value of the type association information.
[0096] Specifically, the terminal may adjust the user priority according to the adjustment coefficient to obtain the user adjustment priority. The terminal may adjust the service priority according to the adjustment coefficient to obtain the service adjustment priority.
[0097] S406: Analyze the priority of the request based on the user adjustment priority and the service adjustment priority to obtain the request priority of the request.
[0098] There are many ways to analyze the priority of a request. Specifically, for each request, the terminal can compare the user adjustment priority and the service adjustment priority, and determine the higher priority as the request priority of the request.
[0099] In one embodiment, the terminal may further sort the user adjustment priority and the service adjustment priority respectively to obtain the user adjustment priority sorting and the service adjustment priority sorting. The terminal may perform average processing on the sorting of the two priorities to obtain the request priority of the request.
[0100] In one of the embodiments, for a request that lacks a service type identifier or a user type identifier, the terminal may determine the request priority of the request based on the user default priority and the service default priority. For a request that only lacks a service type identifier, the terminal may determine the user default priority as the request priority of the request. For a request that only lacks a user type identifier, the terminal may determine the service default priority as the request priority of the request.
[0101] In this embodiment, for each request, the terminal can obtain type association information between the user type identifier and the service type identifier. The terminal can adjust the user priority and the service priority based on the adjustment coefficient corresponding to the type association information to obtain the user adjustment priority and the service adjustment priority. The terminal can analyze the priority of the request based on the user adjustment priority and the service adjustment priority to obtain the request priority of the request, and increase or decrease the user priority or the service priority by adjusting the adjustment coefficient, thereby obtaining an accurate request priority.
[0102] In one embodiment, the second type of request includes multiple target requests, and the second type of request is sent to interfaces other than the target interface, including: determining interfaces other than the target interface as backup interfaces in each interface, determining delayed sending times that match the request priorities of each target request, and for each target request, sending the target request to the backup interface at the request sending time corresponding to the delayed sending time.
[0103] The target request identifies the request in the second request. The standby interface indicates the interface other than the target interface among the interfaces.
[0104] The delay time indicates the waiting time before the target request is sent. The longer the delay time is, the later the target request is sent. Conversely, the shorter the delay time is, the earlier the target request is sent.
[0105] Specifically, if the delay sending duration is 0 or less than the first preset duration, it is considered that the corresponding target request is sent at the first time and the first batch. If the delay sending duration is greater than the second preset duration, it is considered that the corresponding target request is rejected and sent to the interface. If the delay sending duration is greater than or equal to the first preset duration, and less than or equal to the second preset duration, the longer the delay sending duration is, the later the target request is sent.
[0106] The request sending time indicates the estimated sending time of the request. The request priority may be inversely correlated with the delay sending time, that is, the higher the request priority, the shorter the delay sending time.
[0107] Specifically, the terminal may obtain the system time when an interface other than the target interface is determined as a standby interface in each interface. The terminal may determine the delayed sending duration that matches the request priority of each target request. For each target request, the terminal may determine the request sending time corresponding to the delayed sending duration according to the system time and the delayed sending duration. The terminal may send the target request to the standby interface according to the request sending time.
[0108] In this embodiment, the terminal can determine the interfaces other than the target interface as standby interfaces in each interface, and determine the delayed sending duration that matches the request priority of each target request. For each target request, the terminal can send the target request to the standby interface according to the request sending time corresponding to the delayed sending duration, determine the delayed sending duration according to the request priority, and give priority to sending the target request with a higher request priority to the standby interface, thereby ensuring that the standby interface gives priority to processing the target request with a higher degree of importance, ensuring the normal operation of the core service, and improving the system stability corresponding to the interface.
[0109] In one embodiment, the interface information includes interface idleness, and based on each request identifier and each interface information, a target interface that meets the interface screening conditions is screened in each interface, including: screening multiple candidate interfaces that match each request identifier in each interface, and screening a target interface whose interface idle rate is greater than a preset idle rate in each candidate interface.
[0110] The candidate interface represents an interface that matches the request identifier. Matching the request identifier may mean that the interface processes a large number of requests with the request identifier, or that the interface processes the requests with the request identifier with high accuracy, or that the interface processes the requests with the request identifier at a high speed.
[0111] The interface idle rate is an indicator of the busyness of the interface. It reflects the proportion or time that the interface is not used within a period of time.
[0112] The preset idle rate may be an idle rate configured for the interface. If the interface idle rate of the candidate interface is greater than the preset idle rate, it means that the interface busyness of the candidate interface is relatively low.
[0113] Specifically, the terminal may obtain the network topology structure, the traffic pattern of the interface, and the protocol type of the interface corresponding to the interface. The terminal determines the interface idle rate of each structure according to the network topology structure, the traffic pattern, and the protocol type.
[0114] In one embodiment, the terminal may obtain a bandwidth idle rate and determine the bandwidth idle rate as an interface idle rate.
[0115] In one embodiment, the terminal can determine the predicted idle rate of each structure according to the network topology, traffic pattern and protocol type. The terminal can perform idle rate analysis on the interface based on the bandwidth idle rate and the predicted idle rate to obtain the interface idle rate of the interface.
[0116] In this embodiment, the interface information includes interface idleness, and the terminal can filter multiple candidate interfaces that match each request identifier from each interface. The terminal can filter a target interface whose interface idleness rate is greater than a preset idleness rate from each candidate interface, filter out an accurate target interface, and provide a basis for subsequently sending the request to the target structure, thereby improving the processing efficiency of the request.
[0117] In one embodiment, the request processing method also includes: obtaining the flow control frequency of the token bucket configured for the target interface, the request response time of the target interface for each request in the first category, and the average response time of the target interface to historical requests, adjusting the flow control frequency according to the numerical difference between each request response time and the average response time to obtain a new flow control frequency, and determining an adjusted request volume threshold based on the new flow control frequency, wherein the request volume threshold and the flow control frequency are positively correlated.
[0118] Among them, the token bucket can be a flow control algorithm.
[0119] The flow control frequency indicates the flow control parameters in the token bucket. The higher the flow control frequency, the faster the tokens are generated in the token bucket, that is, the more tokens are generated per unit time, and the number of tokens is positively correlated with the size of the request. In other words, the higher the flow frequency, the more requests can be sent to the interface.
[0120] The request response time indicates the processing time of each request by the interface.
[0121] Historical requests refer to the requests received and processed by the interface during the historical period.
[0122] The average response time indicates the average processing time of each request by the interface during the historical period.
[0123] The numerical difference between the request response time and the average response time indicates the difference between the time it takes for the interface to receive and process requests and the average response time during the current period. If the time difference is larger, it means that the interface takes too long to process requests during the current period, and there is a risk of interface overload or downtime, and the system stability corresponding to the interface is poor. At this time, the terminal can appropriately lower the flow control frequency in the token bucket, thereby reducing the number of requests sent to the interface. Conversely, if the time difference is smaller, it means that the interface takes too short to process requests during the current period, and there is no risk of interface overload or downtime, and the system stability corresponding to the interface is strong. In order to further improve the efficiency of the interface in processing requests, the flow control frequency in the token bucket can be appropriately increased, thereby increasing the number of requests sent to the interface.
[0124] The new flow control frequency indicates the new flow control frequency after adjustment.
[0125] Specifically, the terminal can determine the numerical difference between each request response time and the average response time (the difference between the request response time and the average response time). The terminal determines the total numerical difference corresponding to each request based on the numerical difference of each request. If the total numerical difference is greater than zero, the terminal can reduce the flow control frequency to obtain a new flow control frequency. The new flow control frequency is less than the flow control frequency. The terminal can determine the adjusted request quantity threshold based on the new flow control frequency. The adjusted request quantity threshold is less than the request quantity threshold. The same goes for the opposite reason, which will not be elaborated here.
[0126] In one embodiment, the terminal may count the numerical differences of each request to obtain the total numerical differences corresponding to each request. For example, the numerical differences of each request may be averaged to obtain the total numerical differences corresponding to each request. For another example, the numerical differences of each request may be summed to obtain the total numerical differences corresponding to each request.
[0127] In this embodiment, the terminal can obtain the flow control frequency of the token bucket configured for the target interface, the request response time of each request in the first type of request, and the average response time of the target interface to historical requests. The terminal can adjust the flow control frequency to obtain a new flow control frequency according to the numerical difference between each request response time and the average response time, and obtain an accurate new flow control frequency. The terminal can determine the adjusted request volume threshold based on the new flow control frequency, wherein the request volume threshold and the flow control frequency are positively correlated, and accurately adjust the request volume threshold based on the new flow control frequency. The terminal can increase the flow control frequency when the response time of each request is long, avoid the risk of overload and downtime of the interface, and improve the system stability. The terminal can also lower the flow control frequency when the response time of each request is short, thereby reducing the number of service instances of the interface and improving the system resource utilization corresponding to the interface. Dynamic adjustment of the request volume threshold takes into account both the system stability and system resource utilization of the interface.
[0128] In one embodiment, as shown in FIG5 , a flow control method is provided, including:
[0129] S502: When multiple requests are received, obtain request identifiers of the multiple requests and interface information of the multiple interfaces for processing the requests.
[0130] S504: Filter multiple candidate interfaces that match each request identifier from each interface.
[0131] The interface information includes the interface idle rate.
[0132] S506: Filter target interfaces whose interface idle rates are greater than a preset idle rate from among the candidate interfaces.
[0133] S508: When the request volume corresponding to each request is greater than or equal to the request volume threshold of the target interface, determine the user priority configured for each user type identifier and the service priority configured for each service type identifier.
[0134] The request identifier includes a user type identifier and a service type identifier.
[0135] For example, a monitoring module that is always running can be established to track and record the interface request volume in real time to ensure the accuracy and immediacy of the data. Then the terminal can determine the initial request volume threshold of the interface based on the change in the interface request volume over a period of time and the number of interface error reports.
[0136] Exemplarily, when the request volume corresponding to each request is greater than or equal to the request volume threshold of the target interface, the terminal can automatically reallocate resources or start a backup system to balance the load and maximize resource utilization efficiency.
[0137] S510: For each request, obtain type association information between the user type identifier and the service type identifier.
[0138] S512: Adjust the user priority and the service priority based on the adjustment coefficient corresponding to the type association information to obtain the user adjustment priority and the service adjustment priority.
[0139] S514: Analyze the priority of the request based on the user adjustment priority and the service adjustment priority to obtain the request priority of the request.
[0140] S516: Classify each request into a first category request and a second category request according to each request priority and request amount threshold.
[0141] Among them, the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request volume corresponding to the first category of requests is less than or equal to the request volume threshold.
[0142] S518, sending the first type of request to the target interface,
[0143] S520: Determine interfaces other than the target interface as standby interfaces among the interfaces.
[0144] Among them, the second type of request includes multiple target requests.
[0145] S522, determine the delayed sending duration that matches the request priority of each target request.
[0146] S524, for each target request, sending the target request to the standby interface according to the request sending time corresponding to the delayed sending duration.
[0147] S526, obtaining the flow control frequency of the token bucket configured for the target interface, the request response time of the target interface for each first request, and the average response time of the target interface to historical requests.
[0148] Exemplarily, the token bucket supports personalized flow control components, and the terminal can set the flow control frequency in the token bucket. The flow control component features are as follows: ① Automatically increase r tokens per unit time; ② The total number of tokens does not exceed the token bucket limit value n; ③ After obtaining a token, the total number of tokens decreases by one; ④ When the token cannot be obtained, the thread is blocked for 100 milliseconds and the token is obtained again.
[0149] For example, as shown in FIG6 , a specific schematic diagram of the structure of a token bucket is provided, which requires a personalized caller in system A. (1) Personalize the flow control component (the flow control frequency can be specified, n tokens / second); (2) Call the flow control component to obtain a token; (3) Send a request to the called party (system B).
[0150] S528, adjusting the flow control frequency according to the numerical differences between each request response time and the average response time to obtain a new flow control frequency.
[0151] S530: Determine an adjusted request volume threshold based on the new flow control frequency, wherein the request volume threshold and the flow control frequency are positively correlated.
[0152] In this embodiment, the terminal can obtain the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests when receiving multiple requests. The terminal can screen the target interface that meets the interface screening condition in each interface based on each request identifier and each interface information, so that the subsequent target interface can process the first request, thereby improving the overall processing efficiency of each request. When the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface, the terminal can determine the request priority of each request based on each request identifier. The terminal can divide each request into a first-class request and a second-class request according to each request priority and the request amount threshold, wherein the request priority of each request in the first-class request is greater than or equal to the request priority of each request in the second-class request, and the request amount corresponding to the first-class request is less than or equal to the request amount threshold. The above method is adopted, and the first-class request with a higher priority is sent to the target interface, and the second-class request is sent to the interface other than the target interface, which is conducive to the timely processing of the request by each interface, thereby improving the request processing efficiency. This method can actively perform personalized flow limitation on the caller. When running at full load, the call frequency can be guaranteed to be constant within the specified value.
[0153] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] Based on the same inventive concept, the embodiment of the present application also provides a request processing device for implementing the request processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more request processing device embodiments provided below can refer to the limitations on the request processing method above, and will not be repeated here.
[0155] In an exemplary embodiment, as shown in FIG. 7 , a request processing device 700 is provided, comprising: an acquisition module 702, an interface screening module 704, a priority determination module 706, a request division module 708 and a request sending module 710, wherein:
[0156] The acquisition module 702 is used to acquire the request identifiers of the multiple requests and the interface information of the multiple interfaces for processing the requests when multiple requests are received;
[0157] The interface screening module 704 is used to screen target interfaces that meet the interface screening conditions from among the interfaces based on the request identifiers and the interface information;
[0158] A priority determination module 706, configured to determine the request priority of each request based on each request identifier when the request amount corresponding to each request is greater than or equal to the request amount threshold of the target interface;
[0159] A request classification module 708, configured to classify each request into a first category of requests and a second category of requests according to each request priority and a request volume threshold, wherein the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request volume corresponding to the first category of requests is less than or equal to the request volume threshold;
[0160] The request sending module 710 is used to send the first type of request to the target interface, and send the second type of request to the interface other than the target interface.
[0161] In one embodiment, the request identifier includes a user type identifier and a business type identifier, and the priority determination module 706 includes: a priority determination unit, used to determine the user priority configured for each user type identifier, and the business priority configured for each business type identifier; a priority analysis unit, used to analyze the priority of the request based on the user priority and the business priority for each request to obtain the request priority of the request.
[0162] In one of the embodiments, the priority analysis unit includes: an identification acquisition component, used to obtain type association information between a user type identification and a business type identification for each request; a priority adjustment component, used to adjust the user priority and the business priority based on an adjustment coefficient corresponding to the type association information, to obtain a user adjustment priority and a business adjustment priority; a priority analysis component, used to analyze the priority of the request based on the user adjustment priority and the business adjustment priority, to obtain a request priority of the request.
[0163] In one embodiment, the second type of request includes multiple target requests, and the request sending module 710 includes: an interface determination unit, used to determine the interfaces other than the target interface as backup interfaces in each interface; a duration determination unit, used to determine the delayed sending duration that matches the request priority of each target request; and a request sending unit, which, for each target request, sends the target request to the backup interface at the request sending time corresponding to the delayed sending duration.
[0164] In one embodiment, the interface information includes an interface idle rate, and the interface screening module 704 includes: a first screening unit, used to screen multiple candidate interfaces matching each request identifier in each interface; and a second screening unit, used to screen a target interface whose interface idle rate is greater than a preset idle rate in each candidate interface.
[0165] In one embodiment, the request processing device 700 also includes: an information acquisition module 702, which is used to obtain the flow control frequency of the token bucket configured for the target interface, the request response time of the target interface for each request in the first category, and the average response time of the target interface to historical requests; a frequency adjustment module, which is used to adjust the flow control frequency to obtain a new flow control frequency according to the numerical difference between each request response time and the average response time; a threshold determination module, which is used to determine the adjusted request volume threshold based on the new flow control frequency, wherein the request volume threshold and the flow control frequency are positively correlated.
[0166] Each module in the above request processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0167] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store interface information data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a request processing method is implemented.
[0168] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0169] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.
[0170] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0171] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.
[0172] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0174] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A request processing method, characterized in that: The method comprises: When multiple requests are received, obtaining request identifiers of the multiple requests and interface information of the multiple interfaces for processing the requests; Based on each of the request identifiers and each of the interface information, screening target interfaces that meet interface screening conditions from each of the interfaces; In a case where the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface, determining the request priority of each of the requests based on each of the request identifiers; According to the request priorities and the request quantity threshold, the requests are divided into first-category requests and second-category requests, wherein the request priority of each request in the first-category requests is greater than or equal to the request priority of each request in the second-category requests, and the request quantity corresponding to the first-category requests is less than or equal to the request quantity threshold; The first type of request is sent to the target interface, and the second type of request is sent to an interface other than the target interface.
2. The method according to claim 1, characterized in that The request identifier includes a user type identifier and a service type identifier; Determining the request priority of each request based on each request identifier includes: Determine the user priority configured for each of the user type identifiers, and the service priority configured for each of the service type identifiers; For each of the requests, the priority of the request is analyzed based on the user priority and the service priority to obtain the request priority of the request.
3. The method according to claim 2, characterized in that For each of the requests, analyzing the priority of the request based on the user priority and the service priority to obtain the request priority of the request includes: For each of the requests, obtaining type association information between the user type identifier and the service type identifier; Adjust the user priority and the service priority based on the adjustment coefficient corresponding to the type association information to obtain a user adjustment priority and a service adjustment priority; The priority of the request is analyzed based on the user adjustment priority and the service adjustment priority to obtain a request priority of the request.
4. The method according to claim 1, characterized in that: The second type of request includes multiple target requests; The sending the second type of request to an interface other than the target interface comprises: Determining interfaces other than the target interface as standby interfaces among the interfaces; Determine the delayed sending durations that match the request priorities of the respective target requests; For each of the target requests, the target request is sent to the standby interface according to the request sending time corresponding to the delayed sending duration.
5. The method according to claim 1, characterized in that The interface information includes an interface idle rate; The step of screening target interfaces that meet interface screening conditions from among the interfaces based on the request identifiers and the interface information includes: Screening multiple candidate interfaces matching each of the request identifiers from each of the interfaces; A target interface whose interface idle rate is greater than a preset idle rate is selected from each of the candidate interfaces.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining a flow control frequency of a token bucket configured for the target interface, a request response time of the target interface for each request in the first category, and an average response time of the target interface to historical requests; According to the numerical differences between each of the request response times and the average response time, adjusting the flow control frequency to obtain a new flow control frequency; Based on the new flow control frequency, an adjusted request volume threshold is determined, wherein the request volume threshold and the flow control frequency are positively correlated.
7. A request processing device, characterized in that: The device comprises: An acquisition module, used for acquiring request identifiers of the multiple requests and interface information of the multiple interfaces for processing the requests when multiple requests are received; An interface screening module, used for screening target interfaces that meet interface screening conditions from among the interfaces based on the request identifiers and the interface information; A priority determination module, configured to determine the request priority of each of the requests based on each of the request identifiers when the request amount corresponding to each of the requests is greater than or equal to the request amount threshold of the target interface; a request classification module, configured to classify each of the requests into a first category of requests and a second category of requests according to each of the request priorities and the request volume threshold, wherein the request priority of each request in the first category of requests is greater than or equal to the request priority of each request in the second category of requests, and the request volume corresponding to the first category of requests is less than or equal to the request volume threshold; The request sending module is used to send the first type of request to the target interface, and send the second type of request to an interface other than the target interface.
8. The device according to claim 7, characterized in that The request identifier includes a user type identifier and a service type identifier, and the priority determination module includes: A priority determination unit, used to determine the user priority configured for each of the user type identifiers, and the service priority configured for each of the service type identifiers; The priority analysis unit is used to analyze the priority of each request based on the user priority and the service priority to obtain the request priority of the request.
9. The device according to claim 8, characterized in that The priority analysis unit comprises: An identification acquisition component, used for acquiring type association information between the user type identification and the service type identification for each of the requests; A priority adjustment component, used to adjust the user priority and the service priority based on the adjustment coefficient corresponding to the type association information to obtain a user adjustment priority and a service adjustment priority; The priority analysis component is used to analyze the priority of the request based on the user adjustment priority and the service adjustment priority to obtain the request priority of the request.
10. The device according to claim 7, characterized in that The second type of request includes multiple target requests, and the request sending module includes: An interface determination unit, configured to determine, among the interfaces, interfaces other than the target interface as standby interfaces; A duration determination unit, used to determine a delayed sending duration that matches the request priority of each of the target requests; The request sending unit sends, for each of the target requests, the target request to the standby interface according to the request sending time corresponding to the delayed sending duration.
11. The device according to claim 7, characterized in that The interface information includes an interface idle rate, and the interface screening module includes: A first screening unit, used for screening a plurality of candidate interfaces matching each of the request identifiers from each of the interfaces; The second screening unit is used to screen a target interface whose interface idle rate is greater than a preset idle rate from the candidate interfaces.
12. The device according to any one of claims 7 to 11, characterized in that The device also includes: An information acquisition module, used to obtain the flow control frequency of the token bucket configured for the target interface, the request response time of the target interface for each request in the first type of request, and the average response time of the target interface to historical requests; A frequency adjustment module, used to adjust the flow control frequency to obtain a new flow control frequency according to the numerical difference between each of the request response times and the average response time; The threshold determination module is used to determine an adjusted request quantity threshold based on the new flow control frequency, wherein the request quantity threshold and the flow control frequency are positively correlated.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.