A request processing method, device, equipment and medium for high-concurrency business scenarios

By determining the interception ratio of concurrent business requests based on the configuration parameters and bearing weight of the server room in high-concurrency business scenarios, intercepting concurrent business requests solves the problem of the system being difficult to process concurrent requests in high-concurrency situations, and achieves the goal of slowing down the server pressure and improve processing efficiency.

CN118474107BActive Publication Date: 2025-01-21GUANGZHOU SANQI DREAM NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410377733.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-01-21
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In high concurrency business scenarios, it is difficult for the system to effectively handle concurrent requests, resulting in excessive server pressure and increased risk of system paralysis, affecting the stability and availability of services.

Method used

By receiving concurrent business requests, the interception parameters and interception ratio are determined according to the configuration parameters and load bearing weight of the server room, and the concurrent business requests are intercepted to reduce the server load.

Benefits of technology

Effectively slow down the pressure of the server, avoid system paralysis, improve the processing efficiency of the remaining business requests, and ensure the stability and availability of the service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474107B_ABST
    Figure CN118474107B_ABST
Patent Text Reader

Abstract

The present application discloses a request processing method, device, equipment and medium for a high-concurrency business scenario, and the present application belongs to the field of computer technology. The method includes: receiving concurrent business requests; determining the allocation ratio of concurrent business requests to each server room according to the configuration parameters of the server room; obtaining the interception parameters of the server room; wherein the interception parameters are determined based on the load weight of the server in the server room; determining the interception ratio of the server room to concurrent business requests according to the interception parameters; performing interception operations on the concurrent business requests according to the interception ratio; and sending the remaining business requests after the interception operation to the server in the server room for the server to respond to the business. This technical solution can intercept some concurrent business requests, which is conducive to alleviating server pressure, avoiding system paralysis, and improving the processing efficiency of the remaining business requests to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and specifically relates to a request processing method, device, equipment and medium for high-concurrency business scenarios. Background Art

[0002] A high-concurrency business scenario refers to a business scenario in which the system needs to process a large number of concurrent requests or operations within a short period of time.

[0003] In order to cope with high concurrency, traditional enterprises usually adopt some technical means, such as distributed architecture, caching technology and asynchronous processing, etc. However, in high-concurrency business scenarios, if the system does not have good concurrency processing and load balancing capabilities, when the server is under too much pressure, the risk of system paralysis will also increase significantly, making it difficult to ensure the stability and availability of the service.

[0004] Therefore, how to reasonably intercept concurrent business requests to relieve server pressure is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a request processing method, device, equipment and medium for high-concurrency business scenarios, which can intercept some concurrent business requests, help alleviate server pressure, avoid system paralysis, and improve the processing efficiency of remaining business requests to a certain extent.

[0006] In a first aspect, an embodiment of the present application provides a method for request processing in a high-concurrency business scenario, the method comprising:

[0007] Receive concurrent business requests;

[0008] Determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0009] Obtaining an interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room;

[0010] Determining the interception ratio of the server room to concurrent business requests according to the interception parameter;

[0011] Performing an interception operation on the concurrent service requests according to the interception ratio;

[0012] The remaining business requests after the interception operation are sent to the server in the server room for the server to respond to the business.

[0013] Further, determining the interception ratio of the server room to the concurrent service requests according to the interception parameter includes:

[0014] Obtaining the load weight of the server in the server room;

[0015] The interception ratio of the server room to the concurrent service requests is determined according to the interception parameter and the bearer weight.

[0016] Further, determining the interception ratio of the server room to the concurrent service requests according to the interception parameter and the bearer weight includes:

[0017] Determined using the following formula:

[0018]

[0019] Among them, A is the interception ratio, x is the interception parameter, q is the carrying weight, and Sum is the summation function.

[0020] Further, the interception parameters of the server room are obtained, including:

[0021] Obtaining the load weight of each server in the server room;

[0022] The load-bearing weights of the servers are summed up to obtain the total load-bearing weight of the server room;

[0023] The interception parameter of the server room is determined according to the total bearer weight and a preset corresponding relationship between the total bearer weight and the interception parameter.

[0024] Further, according to the configuration parameters of the server room, determining the allocation ratio of the concurrent service requests to each server room includes:

[0025] Determine the configuration parameters of the server room according to the number of servers configured in the server room and the carrying capacity of each server;

[0026] The allocation ratio of the concurrent service requests to each server room is determined according to the configuration parameters of the server room.

[0027] Furthermore, before receiving the concurrent service request, the method further includes:

[0028] Receiving unknown service requests;

[0029] Identifying whether the unknown service request includes a request feature of a preset concurrent service request;

[0030] If included, it is determined that the unknown service request is a concurrent service request.

[0031] Further, identifying whether the unknown service request includes a request feature of a preset concurrent service request includes:

[0032] Identify whether the request interface of the unknown service request is a target interface;

[0033] If it is a target interface, it is determined that the unknown service request includes a request feature of a preset concurrent service request.

[0034] In a second aspect, an embodiment of the present application provides a request processing device for a high-concurrency business scenario, the device comprising:

[0035] A business request receiving module, used for receiving concurrent business requests;

[0036] An allocation ratio determination module, used to determine the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0037] An interception parameter acquisition module, used to obtain the interception parameters of the server room; wherein the interception parameters are determined based on the load weight of the servers in the server room;

[0038] An interception ratio determination module, used to determine the interception ratio of the server room to concurrent business requests according to the interception parameters;

[0039] A service request interception module, used for intercepting the concurrent service requests according to the interception ratio;

[0040] The business response module is used to send the remaining business requests after the interception operation to the server in the server room for the server to perform business response.

[0041] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0042] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0043] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0044] In an embodiment of the present application, a concurrent business request is received; according to the configuration parameters of the server room, the allocation ratio of the concurrent business request to each server room is determined; the interception parameter of the server room is obtained; wherein the interception parameter is determined based on the load weight of the server in the server room; according to the interception parameter, the interception ratio of the server room to the concurrent business request is determined; the concurrent business request is intercepted according to the interception ratio; the remaining business requests after the interception operation are sent to the server in the server room for the server to respond to the business. Through the above-mentioned method of request processing in a high-concurrency business scenario, some concurrent business requests can be intercepted, which is conducive to alleviating server pressure, avoiding system paralysis, and improving the processing efficiency of the remaining business requests to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 1 of the present application;

[0046] Figure 2 This is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 2 of the present application;

[0047] Figure 3 It is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 3 of the present application;

[0048] Figure 4 It is a flowchart of a request processing method for a high-concurrency business scenario provided in Embodiment 4 of the present application;

[0049] Figure 5 This is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 5 of the present application;

[0050] Figure 6 This is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 6 of the present application;

[0051] Figure 7 It is a structural diagram of a request processing device for a high-concurrency business scenario provided in Embodiment 7 of the present application;

[0052] Figure 8 It is a schematic diagram of the structure of the electronic device provided in Example 8 of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all of the content is shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0055] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0056] In conjunction with the accompanying drawings, the following describes in detail a request processing method, apparatus, device and medium for a high-concurrency business scenario provided by an embodiment of the present application through specific embodiments and their application scenarios.

[0057] Embodiment 1

[0058] Figure 1 1 is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 1 of the present application. Figure 1 As shown, the specific steps include:

[0059] S101, receiving concurrent service requests;

[0060] The application scenario of this solution can be a scenario of processing concurrent business requests.

[0061] Based on the above scenario, it can be understood that the execution subject of this scenario can be an intelligent terminal that processes concurrent business requests, such as a concurrent business processing platform, a background server of concurrent business, etc., and no excessive restrictions are made here.

[0062] Concurrent business requests can be business requests from a large number of users that need to be processed simultaneously. For example, in a red envelope grabbing activity, 100,000 users simultaneously send red envelope grabbing requests.

[0063] The method of receiving concurrent service requests may be that the user triggers the sending instruction of concurrent service requests through operations such as clicking, and the user's terminal device sends the service request to the smart terminal. The smart terminal receives concurrent service requests from different addresses and performs statistics.

[0064] S102, determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0065] The server room can be a real hardware device, including arithmetic units, controllers, memory, input devices and output devices. There can be multiple servers in the server room to process concurrent business requests at the same time to improve the efficiency of request processing.

[0066] A server can be a high-availability computer that can provide computing or application services. The server has high-speed CPU computing power and powerful I / O external data throughput capabilities, can control the network operating system, and provide network users with centralized computing, information publishing, and data management services.

[0067] Configuration parameters may be attribute parameters of each device in the server room, including model, number of cores, and memory size. Configuration parameters may reflect the ability of the server room to process requests.

[0068] The method for determining the allocation ratio of concurrent business requests to the server rooms can be to obtain the configuration parameters of each server room, analyze the operating capacity corresponding to each configuration parameter, and determine the allocation ratio of concurrent business requests to the server rooms according to the operating capacity of each server room, that is, the server room with a higher configuration has a stronger operating capacity and can process more requests at the same time, and the allocation ratio should be increased appropriately. For example, if the configuration parameters of two server rooms are roughly the same and their operating capacities are the same, the allocation ratio of each server room can be set to 50%.

[0069] S103, obtaining an interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room;

[0070] The interception parameter can be a parameter used to determine the interception capability of the server room. When the number of concurrent business requests exceeds the capacity of the server room, in order to avoid causing the server room to be stuck or paralyzed, some concurrent business requests will be intercepted to ensure that the server room can smoothly process the remaining concurrent business requests. The interception parameter can limit the number of intercepted requests.

[0071] The load weight of a server can be the ratio of concurrent business requests allocated to the server. For example, if there are server A and server B in the server room, and their load weights are 1 and 3 respectively, then the ratio of concurrent business requests currently to be processed allocated to server A and server B is 1:3.

[0072] The method of obtaining the interception parameters of the server room can be that the intelligent terminal obtains the server's load weight and the corresponding interception parameters through big data, takes the interception parameters as labels and the load weight as input variables, and performs supervised training to obtain the correlation between the load weight and the interception parameters, and then builds a big data model. The load weight of the current server is obtained and input into the pre-built big data model. The big data model provides feedback on the interception parameters of the server room based on the pre-learned correlation between the load weight and the interception parameters.

[0073] S104, determining the interception ratio of the server room to concurrent business requests according to the interception parameter;

[0074] The interception ratio may be the ratio of the number of concurrent business requests that need to be intercepted to the total number of concurrent business requests.

[0075] The method for determining the interception ratio of concurrent business requests in the server room is that the staff can enter the completed algorithm code into the smart terminal in advance. After the smart terminal obtains the interception parameters, the interception parameters are substituted into the pre-set algorithm to calculate the interception ratio of concurrent business requests in the server room.

[0076] S105, performing an interception operation on the concurrent service request according to the interception ratio;

[0077] The method for intercepting concurrent business requests is to count the concurrent business requests, calculate the product of the interception ratio and the number of concurrent business requests as the interception number of concurrent business requests that need to be intercepted, and randomly select concurrent business requests that are consistent with the interception number from all concurrent business requests for interception to prevent them from being sent to the backend.

[0078] S106: Send the remaining business requests after the interception operation to the server in the server room, so that the server can perform business response.

[0079] The remaining business requests may be the business requests remaining after removing the intercepted parts from the concurrent business requests received by the server room. The remaining business requests need to be processed by the server, and therefore need to be sent to the server in the server room.

[0080] The remaining service requests may be sent to the servers in the server room by obtaining the load weight of each server and distributing the remaining service requests according to the load weight. For example, if the load weights of server A, server B, and server C are 1, 1, and 2 respectively, and the number of remaining service requests is 80,000, then the number of service requests distributed to server A, server B, and server C is 20,000, 20,000, and 40,000 respectively.

[0081] For example, taking concurrent red envelope requests as an example, 14 4-core*8G servers are set up to form two server room load balancing clusters (7 servers in each room, each server can carry 15,000 concurrent red envelope requests, that is, the load weight of each server is 1), where the allocation ratio of the two server rooms is set to 50%, the interception parameter is 3, and the calculation shows that the interception ratio is 30%. 300,000 concurrent red envelope requests are issued, and the number of red envelope requests allocated to each server room is 150,000. According to the interception ratio, the number of red envelope requests intercepted in each server room is 45,000. Therefore, in the records of the monitoring data dashboard, the two server rooms processed a total of 210,000 concurrent red envelope requests, avoiding 90,000 concurrent red envelope requests from being sent to the server.

[0082] In an embodiment of the present application, a concurrent business request is received; according to the configuration parameters of the server room, the allocation ratio of the concurrent business request to each server room is determined; the interception parameter of the server room is obtained; wherein the interception parameter is determined based on the load weight of the server in the server room; according to the interception parameter, the interception ratio of the server room to the concurrent business request is determined; the concurrent business request is intercepted according to the interception ratio; the remaining business requests after the interception operation are sent to the server in the server room for the server to respond to the business. Through the above-mentioned request processing method for a high-concurrency business scenario, some concurrent business requests can be intercepted, which is conducive to alleviating server pressure, avoiding system paralysis, and improving the processing efficiency of the remaining business requests to a certain extent.

[0083] Embodiment 2

[0084] Figure 2It is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: determining the interception ratio of the server room to concurrent business requests according to the interception parameter, including: obtaining the load weight of the server in the server room; determining the interception ratio of the server room to concurrent business requests according to the interception parameter and the load weight.

[0085] like Figure 2 As shown, specifically including the following:

[0086] S201, receiving concurrent service requests;

[0087] S202, determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0088] S203, obtaining an interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room;

[0089] S204, obtaining the load weight of the server in the server room;

[0090] The method of obtaining the bearing weight of the server in the server room can be that the intelligent terminal sends a bearing weight acquisition instruction to the server room, and after the server room responds, the bearing weight of each server in the room is obtained and sent to the intelligent terminal, and the intelligent terminal receives and stores the decoded bearing weight value. Among them, the bearing weight can also be set in advance by the staff through the server room.

[0091] S205, determining the interception ratio of the server room to the concurrent service requests according to the interception parameter and the bearer weight;

[0092] The method for determining the interception ratio of concurrent business requests in a server room is to predict the maximum number of business requests that the server room can carry based on the load weights of all servers in the server room, and calculate the maximum number of business requests that the server room can intercept based on the interception parameters. The intelligent terminal calculates the number of intercepted business requests in the current concurrent business requests that does not exceed the maximum number of intercepted business requests, and the number of corresponding remaining concurrent business requests that does not exceed the maximum number of carried business requests, and uses the ratio of the number of intercepted business requests to the number of concurrent business requests as the interception ratio of concurrent business requests in the server room.

[0093] S206, performing an interception operation on the concurrent service request according to the interception ratio;

[0094] S207: Send the remaining business requests after the interception operation to the server in the server room, so that the server can respond to the business requests.

[0095] Optionally, determining the interception ratio of the server room to the concurrent service requests according to the interception parameter and the bearer weight includes:

[0096] Determined using the following formula:

[0097]

[0098] Among them, A is the interception ratio, x is the interception parameter, q is the carrying weight, and Sum is the summation function.

[0099] The summation function adds up the load weights of all servers in the server room to obtain the summation result.

[0100] For example, if there are four servers with a load weight of 1 in the server room and the interception parameter is 4, the interception ratio is:

[0101]

[0102] The benefit of this setting is that the interception ratio of concurrent business requests can be determined based on the interception parameters and the server's load weight, which helps to avoid situations such as excessive operating pressure in the server room and improve the processing efficiency of the remaining concurrent business requests.

[0103] Embodiment 3

[0104] Figure 3 It is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 3 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: obtaining the interception parameters of the server room, including: obtaining the load weight of each server in the server room; summing up the load weight of each server to obtain the sum of the load weights of the server room; determining the interception parameters of the server room according to the sum of the load weights and the pre-set correspondence between the sum of the load weights and the interception parameters.

[0105] like Figure 3 As shown, specifically including the following:

[0106] S301, receiving concurrent service requests;

[0107] S302, determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0108] S303, obtaining the load weight of each server in the server room;

[0109] S304, summing up the load weights of the servers to obtain the total load weight of the server room;

[0110] Addition is a basic mathematical operation that involves adding two or more values ​​to get a total.

[0111] The total load weight of the server room can be obtained by adding the load weights of the servers, and using a summation function to calculate the sum of the load weights as the total load weight of the server room.

[0112] S305, determining the interception parameter of the server room according to the total bearer weight and the corresponding relationship between the total bearer weight and the interception parameter set in advance;

[0113] The predetermined correspondence between the sum of the carrying weights and the interception parameters may be the correlation between the sum of the carrying weights and the interception parameters learned in advance through a big data model.

[0114] The method for determining the interception parameters of the server room can be to use the sum of the load weights as an input variable and the interception parameters as labels on the basis of a big data model that can predict the interception parameters of the server room according to the load weights of the servers, and to perform iterative training to obtain the correlation between the sum of the load weights and the interception parameters. The currently acquired sum of the load weights is input into the updated big data model, and the big data model provides feedback on the interception parameters of the current server room according to the correlation between the sum of the load weights and the interception parameters.

[0115] S306, determining the interception ratio of the server room to concurrent business requests according to the interception parameter;

[0116] S307, performing an interception operation on the concurrent service request according to the interception ratio;

[0117] S308: Send the remaining business requests after the interception operation to the server in the server room, so that the server can respond to the business requests.

[0118] The advantage of this setting of the scheme is that the interception parameters of the server room can be determined according to the correspondence between the sum of the load weights and the interception parameters, and the process of determining the interception parameters can be standardized, which is conducive to making the determination of the interception parameters more in line with the current load capacity of the server room and avoiding paralysis of the server room.

[0119] Embodiment 4

[0120] Figure 4It is a flowchart of a request processing method for a high-concurrency business scenario provided by Example 4 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: according to the configuration parameters of the server room, the allocation ratio of the concurrent business requests to each server room is determined, including: according to the configuration number of servers in the server room and the carrying capacity of each server, the configuration parameters of the server room are determined; according to the configuration parameters of the server room, the allocation ratio of the concurrent business requests to each server room is determined.

[0121] like Figure 4 As shown, specifically including the following:

[0122] S401, receiving concurrent service requests;

[0123] S402, determining configuration parameters of the server room according to the number of servers configured in the server room and the carrying capacity of each server;

[0124] The server's carrying capacity can be the maximum number of concurrent business requests that the current server can handle simultaneously.

[0125] The configuration parameters of the server room can be determined by presetting the corresponding relationship between the configuration quantity and the coefficient, obtaining the configuration quantity and the carrying capacity of the servers in the current server room, obtaining the coefficient corresponding to the configuration quantity according to the pre-set corresponding relationship, summing the carrying capacity of each server, and calculating the product of the summation result and the coefficient as the configuration parameter of the server room. For example, when the configuration quantity is 3, the corresponding coefficient is 1.2, and the carrying capacity of each server is 2000, 2000, and 3000 respectively. At this time, the configuration parameters of the server room are:

[0126] 1.2×(2000+2000+3000)=8400;

[0127] S403, determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0128] The method for determining the allocation ratio of concurrent business requests to each server room may be to use the ratio of the configuration parameters of each server room as the allocation ratio of concurrent business requests to each server room. For example, if the configuration parameter of server room A is 8400 and the configuration parameter of server room B is 9600, then the allocation ratio of concurrent business requests to each server room is:

[0129] 8400:9600=7:8;

[0130] That is, if there are 15,000 concurrent business requests, 7,000 of them will be allocated to server room A, and 8,000 of them will be allocated to server room B. The probability ratio of each concurrent business request being allocated to server room A and server room B is 7:8.

[0131] S404, obtaining an interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room;

[0132] S405, determining the interception ratio of the server room to concurrent business requests according to the interception parameter;

[0133] S406, performing an interception operation on the concurrent service request according to the interception ratio;

[0134] S407: Send the remaining business requests after the interception operation to the server in the server room, so that the server can perform business response.

[0135] The advantage of this setting is that the configuration parameters can be determined according to the configuration number and carrying capacity of the servers in the server room, and concurrent business requests can be allocated according to the configuration parameters, which is conducive to the reasonable allocation of concurrent business requests and avoids the situation where the server room is overloaded.

[0136] Embodiment 5

[0137] Figure 5 This is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 5 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: before receiving a concurrent business request, the method also includes: receiving an unknown business request; identifying whether the unknown business request includes a request feature of a preset concurrent business request; if so, determining that the unknown business request is a concurrent business request.

[0138] like Figure 5 As shown, specifically including the following:

[0139] S501, receiving an unknown service request;

[0140] An unknown service request may be a service request of a location type and a request purpose issued by a user.

[0141] The method of receiving the unknown service request may be that a user operation triggers a sending instruction of the unknown service request, the user's terminal device sends the service request to the smart terminal, and the smart terminal receives and reads the unknown service request.

[0142] S502, identifying whether the unknown service request includes a request feature of a preset concurrent service request; if it does, executing S503;

[0143] The request features of the preset concurrent business requests can be based on the types of business requests that need to be processed in large quantities in advance, and the common request features of the concurrent business requests can be extracted. The request features include information such as the interface address, request type, and request purpose, which are common features of all current concurrent business requests.

[0144] The method for identifying whether an unknown business request includes request features of preset concurrent business requests can be that the staff pre-sets the relevant information of the concurrent business request, and the intelligent terminal extracts features of the concurrent business request. When an unknown business request is received, the feature extraction is performed on the unknown business request, and the features of the unknown business request are compared with the features of the concurrent business request. If there are request features of the concurrent business in the features of the unknown business request, then the current unknown business request includes the request features of the preset concurrent business request.

[0145] S503, determining that the unknown service request is a concurrent service request;

[0146] The method of determining that the unknown service request is a concurrent service request may be to add a concurrent service request tag to the current unknown service request after determining that there are concurrent service request features in the unknown service request features, and store it in a corresponding location for processing.

[0147] S504, determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0148] S505, obtaining an interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room;

[0149] S506, determining the interception ratio of the server room to concurrent business requests according to the interception parameter;

[0150] S507, performing an interception operation on the concurrent service request according to the interception ratio;

[0151] S508: Send the remaining business requests after the interception operation to the server in the server room, so that the server can perform business response.

[0152] The advantage of this arrangement of the present solution is that it can determine whether an unknown service request is a concurrent service request based on the request characteristics of the preset concurrent service request, so as to avoid sending the unknown service request to the server and affecting the server's processing efficiency for concurrent service requests.

[0153] Embodiment 6

[0154] Figure 6 It is a flowchart of a request processing method for a high-concurrency business scenario provided in Example 6 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: identifying whether the unknown business request includes the request characteristics of the preset concurrent business request, including: identifying whether the request interface of the unknown business request is the target interface; if it is the target interface, determining that the unknown business request includes the request characteristics of the preset concurrent business request.

[0155] like Figure 6 As shown, specifically including the following:

[0156] S601, receiving an unknown service request;

[0157] S602, identifying whether the request interface of the unknown service request is a target interface; if it is a target interface, executing S603;

[0158] A target can be a logical interface used to identify and locate a specific application in network communication. In network communication, when data needs to be transferred from one computer to another, it needs to be transferred through specific channels, which are interfaces.

[0159] The target interface may be the interface specified by the transmission concurrent service request.

[0160] The method for identifying whether the request interface of an unknown business request is the target interface is that the staff may determine the target port in advance based on the request characteristics of the concurrent business request and the address of the server. After receiving the unknown business request, the interface information recorded in the unknown business request is extracted, and the interface information is compared with the target interface. If the interface information is consistent with the target interface, it is determined that the request interface of the unknown business request is the target interface.

[0161] S603, determining that the unknown service request includes a request feature of a preset concurrent service request;

[0162] The method of determining that the unknown service request includes the request feature of the preset concurrent service request may be that if it is identified that the request interface of the unknown service request is the target interface, then determining that the unknown service request includes the request feature of the preset concurrent service request.

[0163] S604, determining that the unknown service request is a concurrent service request;

[0164] S605, determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0165] S606, obtaining an interception parameter of the server room; wherein the interception parameter is determined based on a load weight of a server in the server room;

[0166] S607, determining the interception ratio of the server room to concurrent business requests according to the interception parameter;

[0167] S608, performing an interception operation on the concurrent service request according to the interception ratio;

[0168] S609: Send the remaining business requests after the interception operation to the server in the server room, so that the server can perform business response.

[0169] The benefit of this arrangement of the solution is that it can determine whether the unknown business request includes the request features of the preset concurrent business request based on the target interface, which is conducive to standardizing the judgment criteria of concurrent business requests and improving the accuracy of identifying concurrent business requests.

[0170] Embodiment 7

[0171] Figure 7 It is a structural diagram of a request processing device for a high-concurrency business scenario provided in Example 7 of the present application.

[0172] like Figure 7 As shown, specifically including the following:

[0173] A service request receiving module 701 is used to receive concurrent service requests;

[0174] The allocation ratio determination module 702 is used to determine the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room;

[0175] The interception parameter acquisition module 703 is used to obtain the interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room;

[0176] An interception ratio determination module 704, configured to determine the interception ratio of the server room to concurrent service requests according to the interception parameters;

[0177] A service request interception module 705, configured to intercept the concurrent service requests according to the interception ratio;

[0178] The business response module 706 is used to send the remaining business requests after the interception operation to the server in the server room for the server to perform business response.

[0179] In an embodiment of the present application, a business request receiving module is used to receive concurrent business requests; an allocation ratio determination module is used to determine the allocation ratio of the concurrent business requests to each server room according to the configuration parameters of the server room; an interception parameter acquisition module is used to obtain the interception parameters of the server room; wherein the interception parameters are determined based on the load weight of the servers in the server room; an interception ratio determination module is used to determine the interception ratio of the server room to concurrent business requests according to the interception parameters; a business request interception module is used to intercept the concurrent business requests according to the interception ratio; and a business response module is used to send the remaining business requests after the interception operation to the server in the server room for the server to respond to the business. Through the above-mentioned request processing device for a high-concurrency business scenario, some concurrent business requests can be intercepted, which is conducive to alleviating server pressure, avoiding system paralysis, and improving the processing efficiency of the remaining business requests to a certain extent.

[0180] In the embodiment of the present application, a device for request processing in a high-concurrency business scenario can be a device, or a component, integrated circuit or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0181] In the embodiment of the present application, a device for request processing in a high-concurrency business scenario may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0182] A request processing device for a high-concurrency business scenario provided in an embodiment of the present application can implement each process implemented in the above-mentioned method embodiments. To avoid repetition, it will not be repeated here.

[0183] Embodiment 8

[0184] like Figure 8As shown, an embodiment of the present application also provides an electronic device 800, including a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, each process of an embodiment of a device for request processing in the above-mentioned high-concurrency business scenario is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0185] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0186] Embodiment 9

[0187] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the device embodiment for request processing in the above-mentioned high-concurrency business scenario are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0188] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0189] Embodiment 10

[0190] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the device embodiment for request processing in the above-mentioned high-concurrency business scenario, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0191] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0192] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0193] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0194] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0195] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A request processing method for a high-concurrency business scenario, characterized in that: The method comprises: Receive concurrent business requests; Determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room; Obtaining the interception parameter of the server room; wherein the interception parameter is determined based on the load weight of the server in the server room; the way to obtain the interception parameter of the server room is that the intelligent terminal obtains the load weight of the server and the corresponding interception parameter through big data, takes the interception parameter as a label and the load weight as an input variable, performs supervised training to obtain the correlation between the load weight and the interception parameter, and then constructs a big data model; obtains the load weight of the current server, inputs it into the pre-constructed big data model, and the big data model feeds back the interception parameter of the server room according to the pre-learned correlation between the load weight and the interception parameter; Determining the interception ratio of the server room to concurrent business requests according to the interception parameter; Performing an interception operation on the concurrent service requests according to the interception ratio, randomly selecting concurrent service requests that are consistent with the interception number for interception, and preventing them from being sent to the backend; Sending the remaining business requests after the interception operation to the server in the server room for the server to respond to the business; Wherein, determining the interception ratio of the server room to the concurrent service requests according to the interception parameter includes: Obtaining the load weight of the server in the server room; Determining the interception ratio of the server room to the concurrent service requests according to the interception parameter and the bearer weight; The interception ratio is determined using the following formula: Among them, A is the interception ratio, x is the interception parameter, q is the carrying weight, and Sum is the summation function.

2. According to a request processing method for a high-concurrency business scenario according to claim 1, it is characterized in that: Obtaining the interception parameters of the server room, including: Obtaining the load weight of each server in the server room; The load-bearing weights of the servers are summed up to obtain the total load-bearing weight of the server room; The interception parameter of the server room is determined according to the total bearer weight and a preset corresponding relationship between the total bearer weight and the interception parameter.

3. According to a request processing method for a high-concurrency business scenario according to claim 1, it is characterized in that: Determining the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room, including: Determine the configuration parameters of the server room according to the number of servers configured in the server room and the carrying capacity of each server; The allocation ratio of the concurrent service requests to each server room is determined according to the configuration parameters of the server room.

4. According to a method for processing requests in a high-concurrency business scenario according to claim 1, it is characterized in that: Before receiving the concurrent service request, the method further includes: Receiving unknown service requests; Identifying whether the unknown service request includes a request feature of a preset concurrent service request; If included, it is determined that the unknown service request is a concurrent service request.

5. A request processing method for a high-concurrency business scenario according to claim 4, characterized in that: Identifying whether the unknown service request includes a request feature of a preset concurrent service request includes: Identify whether the request interface of the unknown service request is a target interface; If it is a target interface, it is determined that the unknown service request includes a request feature of a preset concurrent service request.

6. A request processing device for high-concurrency business scenarios, characterized in that: The device comprises: A business request receiving module, used for receiving concurrent business requests; An allocation ratio determination module, used to determine the allocation ratio of the concurrent service requests to each server room according to the configuration parameters of the server room; An interception parameter acquisition module is used to obtain the interception parameters of the server room; wherein the interception parameters are determined based on the load weight of the server in the server room; the way to obtain the interception parameters of the server room is that the intelligent terminal obtains the load weight of the server and the corresponding interception parameters through big data, uses the interception parameters as labels and the load weight as input variables, and performs supervised training to obtain the correlation between the load weight and the interception parameters, and then constructs a big data model; obtains the load weight of the current server, and inputs it into the pre-constructed big data model, and the big data model feeds back the interception parameters of the server room according to the pre-learned correlation between the load weight and the interception parameters; An interception ratio determination module is used to determine the interception ratio of the server room to concurrent business requests according to the interception parameters; wherein determining the interception ratio of the server room to concurrent business requests according to the interception parameters includes: Obtaining the load weight of the server in the server room; Determining the interception ratio of the server room to the concurrent service requests according to the interception parameter and the bearer weight; The interception ratio is determined using the following formula: Among them, A is the interception ratio, x is the interception parameter, q is the carrying weight, and Sum is the summation function; A service request interception module is used to intercept the concurrent service requests according to the interception ratio, randomly select concurrent service requests that are consistent with the interception number, and intercept them to prevent them from being sent to the backend; The business response module is used to send the remaining business requests after the interception operation to the server in the server room for the server to perform business response.

7. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of a request processing method for a high-concurrency business scenario are implemented as described in any one of claims 1 to 5.

8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of a request processing method for a high-concurrency business scenario according to any one of claims 1-5 are implemented.

Citation Information

Patent Citations

  • Method and device for concurrency control

    CN104270431A

  • Flow control method, device and equipment and computer readable storage medium

    CN113364697A