Distributed server request processing method and device, equipment and storage medium

By monitoring the number of path requests and selecting the server with the smallest load to process task requests, the problem of task processing inefficiency caused by soaring pressure on the main server is solved, and load balancing and efficiency improvement is achieved.

CN120583088APending Publication Date: 2025-09-02INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510731689.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

In the banking financial business system, when the pressure on the main server soars, the existing technology causes inefficient task processing requests for client nodes to be processed through requests for current limiting or circuit breaking.

Method used

By monitoring the number of requests under the path, determine the path corresponding to the minimum number of requests as the target path, and write the task processing request under the path, and select the server with the lowest load pressure for processing.

Benefits of technology

Load balancing is realized and the efficiency of task processing request processing of client nodes is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120583088A_ABST
    Figure CN120583088A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of financial science and technology, in particular to a distributed server request processing method and device, equipment and a storage medium, and the method comprises the steps: monitoring the number of requests under each path in a path set, and obtaining an initial request number set; determining a path corresponding to the minimum request number in the initial request number set to obtain a target path; writing a task processing request under the target path; wherein the server corresponding to the target path is a target server; and obtaining a processing result obtained by processing the task processing request after the target server monitors the task processing request. According to the invention, the processing efficiency of the task processing request sent by the client node is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The banking and financial business system is built on the corresponding server. A single server can usually provide services for multiple client nodes. To ensure the stability of the service, the server is usually set up in a master-slave mode, that is, a master server and a backup server are set up at the same time. When the master server is operating normally, the master server is used to provide services to each client node and process the task processing requests sent by the client node. Once the master server fails, it will immediately switch to the backup server and use the backup server to provide services to each client node.

[0003] If the number of task processing requests sent by the client node is too large, the pressure on the main server will soar. However, since the main server has not failed, it will still use the main server to adopt request throttling or request circuit breaking to continue processing excessive task processing requests. This will result in low processing efficiency of the task processing requests sent by the client node. Summary of the Invention

[0004] In order to improve the processing efficiency of task processing requests sent by client nodes, the present application provides a distributed server request processing method, device, equipment and storage medium.

[0005] In a first aspect, the present application provides a distributed server request processing method, comprising:

[0006] Monitor the number of requests under each path in the path set to obtain the initial request number set;

[0007] Determine the path corresponding to the minimum number of requests in the initial request number set to obtain a target path;

[0008] Writing a task processing request under the target path; wherein the server corresponding to the target path is the target server;

[0009] Obtain a processing result obtained by the target server processing the task processing request after monitoring the task processing request.

[0010] Through the above implementation, before the client node sends the corresponding task processing request to the server, it can first determine the server with the smallest number of requests under the current path, and then let the server process the task processing request sent by itself. In this way, the client can not only use multiple servers to process its own task processing requests, but also select the server with the smallest current request processing pressure from multiple servers to process its own task processing requests. This helps to achieve load balancing among the servers, and in this way it is easy to improve the processing efficiency of the task processing requests sent by the client node.

[0011] Preferably, determining the path corresponding to the minimum number of requests in the initial request number set to obtain the target path includes:

[0012] In response to the presence of an initial request quantity greater than a preset quantity threshold in the initial request quantity set, deleting the initial request quantity greater than the preset quantity threshold to obtain a target request quantity set;

[0013] The path corresponding to the smallest initial request quantity in the target request quantity set is determined as the target path.

[0014] Through the above implementation, the initial request quantity in the initial request quantity set that is greater than the preset quantity threshold is cleared, which makes it easier to clear the initial request quantity corresponding to the path that cannot be the target path in advance, thereby improving the efficiency of subsequent screening of the minimum request quantity in the target request quantity set.

[0015] Preferably, determining the path corresponding to the smallest initial request quantity in the target request quantity set as the target path includes:

[0016] Determine the minimum number of requests in the target request number set to obtain the target request number;

[0017] In response to the number of target requests being multiple, determining server numbers in paths corresponding to the number of target requests, and obtaining a number set;

[0018] A target path is determined based on the paths corresponding to the server numbers in the number set.

[0019] Through the above implementation, when there are multiple target requests, a path corresponding to a server number is determined as the target path from the number set corresponding to each target request number. This makes it easy to determine the corresponding target path selection strategy when there are multiple target requests.

[0020] Preferably, determining the target path based on the path corresponding to each server number in the number set includes:

[0021] Determine the path corresponding to the smallest number in the number set as the target path; or,

[0022] Determine the path corresponding to the largest number in the number set as the target path; or,

[0023] A path corresponding to a random number in the number set is determined as the target path.

[0024] Through the above implementation, a path corresponding to a server number is determined as the target path from the number set corresponding to each target request quantity, which facilitates providing multiple selection strategies for determining the target path.

[0025] Preferably, the present application also provides a distributed server request processing method, comprising:

[0026] In response to the request processing service startup, register the path;

[0027] In response to a task processing request written under the path, processing the task processing request to obtain a processing result;

[0028] Feedback the processing result to the node corresponding to the task processing request;

[0029] Among them, the path of the write task processing request is the target path determined by the node, and the steps for determining the target path are: the node monitors the number of requests under each path in the path set to obtain an initial request quantity set; determines the path corresponding to the minimum number of requests in the initial request quantity set to obtain the target path.

[0030] Through the above implementation, the client node will write the task processing request under the path corresponding to the smallest number of requests in the initial request set, that is, select the server with the smallest current task processing pressure to process the task processing request. In this way, the client can not only use multiple servers to process its own task processing requests, but also select the server with the smallest current request processing pressure from multiple servers to process its own task processing requests. This helps to achieve load balancing among the servers, and in this way it is easy to improve the processing efficiency of the task processing requests sent by the client node.

[0031] Preferably, after processing the task processing request and obtaining the processing result, the method further includes:

[0032] Delete the task processing request corresponding to the processing result.

[0033] Through the above implementation, after the task processing request is completed, the task processing request written under the path is deleted, so that the subsequent client can know the current load pressure of each server when sending a request.

[0034] In a second aspect, the present application provides a distributed server request processing device, comprising:

[0035] The quantity monitoring module is used to monitor the number of requests under each path in the path set and obtain the initial request quantity set;

[0036] A path determination module is used to determine the path corresponding to the minimum number of requests in the initial request number set to obtain a target path;

[0037] A request writing module, configured to write a task processing request under the target path; wherein the server corresponding to the target path is the target server;

[0038] The result acquisition module is used to acquire a processing result obtained by the target server after processing the task processing request after monitoring the task processing request.

[0039] Through the above implementation, before the client node sends the corresponding task processing request to the server, it can first determine the server with the smallest number of requests under the current path, and then let the server process the task processing request sent by itself. In this way, the client can not only use multiple servers to process its own task processing requests, but also select the server with the smallest current request processing pressure from multiple servers to process its own task processing requests. This helps to achieve load balancing among the servers, and in this way it is easy to improve the processing efficiency of the task processing requests sent by the client node.

[0040] In a third aspect, the present application provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.

[0041] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned method when executed by a processor.

[0042] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps of any of the above method embodiments when executed by a processor.

[0043] The above-mentioned distributed server request processing method, apparatus, device and storage medium obtain an initial request quantity set by monitoring the number of requests under each path in the path set; determine the path corresponding to the smallest number of requests in the initial request quantity set to obtain a target path; write a task processing request under the target path; wherein the server corresponding to the target path is the target server; obtain the processing result obtained by the target server after processing the task processing request after monitoring the task processing request. Through the above implementation, before sending the corresponding task processing request to the server, the client node can first determine the server with the smallest number of requests under the current path, and then make the server process the task processing request sent by itself. In this way, the client can not only use multiple servers to process its own task processing request, but also select the server with the smallest current request processing pressure from multiple servers to process its own task processing request. This helps to achieve load balancing of each server, and in this way, it is easy to improve the processing efficiency of the task processing request sent by the client node.

[0044] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 A flow chart of a distributed server request processing method provided in an embodiment of the present application;

[0047] Figure 2 This is a flow chart of another distributed server request processing method provided in an embodiment of the present application;

[0048] Figure 3 This is a structural diagram of a distributed server request processing device provided in an embodiment of the present application;

[0049] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0050] Figure 5 This is a diagram of the internal structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure.

[0052] It should be noted that the terms "first," "second," and the like in the specification and claims herein and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0053] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" could mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the related objects.

[0054] Example 1

[0055] Figure 1 A flow chart of a distributed server request processing method provided in Example 1 of this application, refer to Figure 1 The method may be performed by a device for performing the method, and the device may be implemented by software and / or hardware. The method includes:

[0056] S110 , monitoring the number of requests under each path in the path set to obtain an initial request number set.

[0057] Among them, in this embodiment, the distributed server includes at least two servers, and the service area is used to provide request processing services for the client nodes of the bank. The request processing service is that the server processes the task processing request sent by the client node and feeds back the corresponding request processing result to the client node; after the request processing service is started, each server in the distributed server will register the corresponding path one by one on the distributed coordination service framework; illustratively, the distributed coordination service framework in this embodiment is ZooKeeper, which is a distributed coordination service framework used to solve common core problems such as consistency, metadata management, distributed locks, and cluster coordination in distributed systems. It provides highly reliable collaborative services for distributed systems through concise primitives and is widely used in large distributed frameworks such as Hadoop, Kafka, and Dubbo; taking one of the servers as an example, the path registered by the server is " / root / servers / server1".

[0058] It should be noted that the client node will send a corresponding task processing request to a distributed server. After the task processing request is sent, it will be stored in the path of the server. The number of task processing requests in the path is recorded as the request quantity. In other words, each server has a corresponding request quantity. The set of request quantities for each server is recorded as the initial request quantity set. The client node can monitor this initial request quantity set from ZooKeeper, that is, the request quantity corresponding to each server.

[0059] S120: Determine a path corresponding to the minimum number of requests in the initial request number set to obtain a target path.

[0060] Among them, the number of requests corresponding to a server is used to reflect the load pressure of the server. If the number of requests corresponding to a server is larger, the load pressure of the server is larger. When facing a new task processing request, generally, the server with smaller load pressure has faster processing speed. Therefore, in this embodiment, when a new task processing request is generated, the task processing request will be assigned to the server with the smallest load pressure, so that the load of each server in the distributed server is balanced to achieve improved processing efficiency of task processing requests. To this end, it is necessary to first determine the path corresponding to the server with the smallest load pressure, that is, to determine the path of the server corresponding to the smallest number of requests in the initial request set, and record the path as the target path, so that after receiving a new task processing request, the task processing request can be written to the target path, that is, the new task processing request is assigned to the server with the smallest current load pressure for processing.

[0061] S130. Write a task processing request under the target path; wherein the server corresponding to the target path is the target server.

[0062] Among them, writing the task processing request under the target path means that the task processing request is assigned to the server with the smallest current load pressure for processing. Each server has its corresponding path, and the server corresponding to the target path is recorded as the target server.

[0063] S140: Obtain a processing result obtained by the target server processing the task processing request after monitoring the task processing request.

[0064] Among them, the server also monitors the distributed coordination service framework to determine whether a new task processing request is written under its corresponding path. If written, the new task processing request is processed and the corresponding processing result is obtained; subsequently, the server will feedback the processing result to the client node that issued the task processing request.

[0065] It should be noted that, in this embodiment, the number of requests under each path in the path set is monitored to obtain an initial request number set; the path corresponding to the smallest number of requests in the initial request number set is determined to obtain a target path; a task processing request is written under the target path; wherein the server corresponding to the target path is the target server; and the processing result obtained by the target server after processing the task processing request after monitoring the task processing request is obtained. Through the above implementation, before sending the corresponding task processing request to the server, the client node can first determine the server with the smallest number of requests under the current path, and then make the server process the task processing request sent by itself. In this way, the client can not only use multiple servers to process its own task processing request, but also select the server with the smallest current request processing pressure from multiple servers to process its own task processing request. This helps to achieve load balancing of each server, and in this way, it is easy to improve the processing efficiency of the task processing request sent by the client node.

[0066] Example 2

[0067] A distributed server request processing method provided in a second embodiment of the present application optimizes the step of "determining the path corresponding to the minimum number of requests in the initial request set to obtain the target path" in the first embodiment. It should be noted that for portions not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0068] S210 , monitoring the number of requests under each path in the path set to obtain an initial request number set.

[0069] S221 : In response to the initial request quantity set including an initial request quantity greater than a preset quantity threshold, delete the initial request quantity greater than the preset quantity threshold to obtain a target request quantity set.

[0070] Among them, the resources of the server are limited, that is, the number of task processing requests that the server can process in parallel is also limited. When the number of task processing requests processed in parallel by a server reaches a certain number, it can no longer accept new task processing requests. To determine whether the number of task processing requests currently processed by a server has reached a certain number, this embodiment presets a number threshold based on historical experience data. The number threshold is used to compare with the number of initial requests in the initial request number set, wherein the number of task processing requests currently processed in parallel by each server is also the initial request number. If the number of initial requests is greater than the number threshold, it means that the number of task processing requests currently processed by the server corresponding to the initial request number has reached a certain number and can no longer process new task processing requests. Subsequently, a server needs to be matched for a new task processing request. The service with the initial request number greater than the number threshold is obviously no longer available to process the new task processing request. Therefore, the initial request number corresponding to the server can be first deleted from the initial request number set. Subsequently, the server corresponding to the smallest initial request number in the initial request number set needs to be selected to process the new task processing request. Initial requests with a number greater than the number threshold are deleted from the initial request number set in advance, which helps to improve the efficiency of screening the smallest initial request number from the initial request number set. The number set obtained by deleting the initial request number that is greater than the number threshold from the initial request number set is recorded as the standard request number set.

[0071] S222: Determine the path corresponding to the smallest initial request quantity in the target request quantity set as the target path.

[0072] The target path is the path corresponding to the smallest initial request quantity in the target request quantity set.

[0073] S230. Write a task processing request under the target path; wherein the server corresponding to the target path is the target server.

[0074] S240: Obtain a processing result obtained by the target server processing the task processing request after monitoring the task processing request.

[0075] Example 3

[0076] A distributed server request processing method is provided in a third embodiment of the present application. This method optimizes the step of "determining the path corresponding to the smallest number of initial requests in the target request set as the target path" in the second embodiment. It should be noted that for portions not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. This method includes:

[0077] S310 , monitoring the number of requests under each path in the path set to obtain an initial request number set.

[0078] S321: In response to the initial request quantity set including an initial request quantity greater than a preset quantity threshold, delete the initial request quantity greater than the preset quantity threshold to obtain a target request quantity set.

[0079] S322A: Determine the minimum number of requests in the target request number set to obtain the target request number.

[0080] The target request quantity is the minimum request quantity in the target request quantity set.

[0081] S322B: In response to the number of target requests being multiple, determine the server numbers in the paths corresponding to the respective target request numbers to obtain a number set.

[0082] It should be noted that the target request quantity set is composed of multiple target request quantities, and the minimum request quantity in the target request quantity set may exist simultaneously. For example, the target request quantity set is [23, 34, 18, 7, 7], where the minimum target request quantity in the target request quantity set is 2, that is, 2 7s. The path corresponding to each server contains the server number corresponding to the service. For example, assume that there are two paths corresponding to the target request quantities, the first path is " / root / servers / server1", and the second path is " / root / servers / server2". The server number corresponding to the first path is "1", and the server number corresponding to the second path is "2". The set of server numbers in the paths corresponding to each target request quantity is recorded as a number set.

[0083] S322C: Determine a target path based on the paths corresponding to the server numbers in the number set.

[0084] Among them, a path corresponding to a server number can be selected from the number set based on a self-set selection strategy, and the path is used as the target path. The target path is used for subsequent writing of new task processing requests.

[0085] S330. Write a task processing request under the target path; wherein the server corresponding to the target path is the target server.

[0086] S340: Obtain a processing result obtained by the target server processing the task processing request after monitoring the task processing request.

[0087] Example 4

[0088] A fourth embodiment of the present application provides a distributed server request processing method, which optimizes the "determining a target path based on the paths corresponding to the server numbers in the number set" in the third embodiment. It should be noted that for portions not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0089] S410 , monitoring the number of requests under each path in the path set to obtain an initial request number set.

[0090] S421: In response to the initial request quantity set including an initial request quantity greater than a preset quantity threshold, delete the initial request quantity greater than the preset quantity threshold to obtain a target request quantity set.

[0091] S422A: Determine the minimum number of requests in the target request number set to obtain the target request number.

[0092] S422B: In response to the number of target requests being multiple, determine the server numbers in the paths corresponding to the respective target request numbers to obtain a number set.

[0093] S422C1. Determine the path corresponding to the smallest number in the number set as the target path; or

[0094] Among them, one self-set selection strategy is: determine the path corresponding to the smallest number in the number set as the target path.

[0095] S422C2. Determine the path corresponding to the largest number in the number set as the target path; or

[0096] Among them, one self-designed selection strategy is: determine the path corresponding to the largest number in the number set as the target path.

[0097] S422C3. Determine a path corresponding to a random number in the number set as the target path.

[0098] Among them, one self-designed selection strategy is: determine the path corresponding to a random number in the number set as the target path.

[0099] S430. Write a task processing request under the target path; wherein the server corresponding to the target path is the target server.

[0100] S440: Obtain a processing result obtained by the target server processing the task processing request after monitoring the task processing request.

[0101] Example 5

[0102] Figure 2 A flow chart of a distributed server request processing method provided in Example 5 of this application is provided. Figure 2 The method may be performed by a device for performing the method, and the device may be implemented by software and / or hardware. The method includes:

[0103] S510 , in response to the request processing service startup, register the path.

[0104] Among them, for request processing services, each server in the distributed server will register the corresponding path in the distributed coordination service framework one by one; for example, the path registered by a server is " / root / servers / server1".

[0105] S520 : In response to the task processing request written under the path, process the task processing request to obtain a processing result.

[0106] Among them, after the client node determines the target path, it will write a task processing request in the target path; each server will monitor its corresponding path. If it monitors a new task processing request written under its corresponding path, the server will serve as the target server and process the new task processing request to obtain the corresponding processing result.

[0107] S530: Feedback the processing result to the node corresponding to the task processing request.

[0108] After obtaining the processing result, the target server also feeds back the processing result to the client node that sent the task processing request.

[0109] Among them, the path of the write task processing request is the target path determined by the node, and the steps for determining the target path are: the node monitors the number of requests under each path in the path set to obtain an initial request quantity set; determines the path corresponding to the minimum number of requests in the initial request quantity set to obtain the target path.

[0110] It should be noted that the steps of determining the target path can be specifically referred to in the above steps S110 to S120 and will not be repeated here.

[0111] Example 6

[0112] A distributed server request processing method is provided in Example 6 of the present application. This method supplements the steps after Example 5. It should be noted that for parts not described in detail in this embodiment, reference can be made to the descriptions of other embodiments. This method includes:

[0113] S610: In response to the request processing service startup, register the path.

[0114] S620 : In response to the task processing request written under the path, process the task processing request to obtain a processing result.

[0115] S630: Feedback the processing result to the node corresponding to the task processing request.

[0116] Among them, the path of the write task processing request is the target path determined by the node, and the steps for determining the target path are: the node monitors the number of requests under each path in the path set to obtain an initial request quantity set; determines the path corresponding to the minimum number of requests in the initial request quantity set to obtain the target path.

[0117] S640: Delete the task processing request corresponding to the processing result.

[0118] It should be noted that since both the server and client nodes will monitor the number of task processing requests under the path to determine the current load pressure of the server, after a task processing request has been processed, it needs to be cleared in time so that the server and client nodes can understand the current load pressure of the server in a timely manner.

[0119] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed 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 portion of steps or stages in other steps.

[0120] Example 7

[0121] Based on the same inventive concept, this embodiment also provides a distributed server request processing device for implementing the above-mentioned distributed server request processing method. The implementation solution provided by this device is similar to the implementation solution described in the above-mentioned method. Therefore, the specific limitations of one or more embodiments of the distributed server request processing device provided below can be found in the above-mentioned limitations of the distributed server request processing method and will not be repeated here.

[0122] In this embodiment, Figure 3 As shown, a distributed server request processing device is provided, comprising:

[0123] The quantity monitoring module is used to monitor the number of requests under each path in the path set and obtain the initial request quantity set;

[0124] A path determination module is used to determine the path corresponding to the minimum number of requests in the initial request number set to obtain a target path;

[0125] A request writing module, configured to write a task processing request under the target path; wherein the server corresponding to the target path is the target server;

[0126] The result acquisition module is used to acquire a processing result obtained by the target server after processing the task processing request after monitoring the task processing request.

[0127] Each module in the distributed server request processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0128] It should be noted that, in this embodiment, the number of requests under each path in the path set is monitored to obtain an initial request number set; the path corresponding to the smallest number of requests in the initial request number set is determined to obtain a target path; a task processing request is written under the target path; wherein the server corresponding to the target path is the target server; and the processing result obtained by the target server after processing the task processing request after monitoring the task processing request is obtained. Through the above implementation, before sending the corresponding task processing request to the server, the client node can first determine the server with the smallest number of requests under the current path, and then make the server process the task processing request sent by itself. In this way, the client can not only use multiple servers to process its own task processing request, but also select the server with the smallest current request processing pressure from multiple servers to process its own task processing request. This helps to achieve load balancing of each server, and in this way, it is easy to improve the processing efficiency of the task processing request sent by the client node.

[0129] Example 8

[0130] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. 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 computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network 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, it implements a distributed server request processing method.

[0131] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure 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 component arrangement.

[0132] Example 9

[0133] In this embodiment, a computer readable storage medium is provided. Figure 5 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0134] Example 10

[0135] In this embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0136] 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 disclosure are all information and data authorized by the user or fully authorized by all parties.

[0137] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented 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 memory, database or other media used in the embodiments provided in the present disclosure may include at least one of non-volatile and volatile memory. Non-volatile memory may 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 may include random access memory (RAM) or external cache memory, etc. By way of 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 disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in each embodiment provided in this disclosure may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc.

[0138] The technical features of the above embodiments can 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 specification.

[0139] The above-described embodiments merely represent several implementation methods of the present disclosure. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present disclosure. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present disclosure, all of which fall within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be determined by the appended claims.

Claims

1. A distributed server request processing method, characterized in that: include: Monitor the number of requests under each path in the path set to obtain the initial request number set; Determine the path corresponding to the minimum number of requests in the initial request number set to obtain a target path; Writing a task processing request under the target path; wherein the server corresponding to the target path is the target server; Obtain a processing result obtained by the target server processing the task processing request after monitoring the task processing request.

2. The method according to claim 1, characterized in that Determining a path corresponding to a minimum number of requests in the initial request number set to obtain a target path includes: In response to the presence of an initial request quantity greater than a preset quantity threshold in the initial request quantity set, deleting the initial request quantity greater than the preset quantity threshold to obtain a target request quantity set; The path corresponding to the smallest initial request quantity in the target request quantity set is determined as the target path.

3. The method according to claim 2, characterized in that The step of determining the path corresponding to the smallest initial request quantity in the target request quantity set as the target path includes: Determine the minimum number of requests in the target request number set to obtain the target request number; In response to the number of target requests being multiple, determining server numbers in paths corresponding to the number of target requests, and obtaining a number set; A target path is determined based on the paths corresponding to the server numbers in the number set.

4. The method according to claim 3, characterized in that The determining of the target path based on the path corresponding to each server number in the number set includes: Determine the path corresponding to the smallest number in the number set as the target path; or, Determine the path corresponding to the largest number in the number set as the target path; or, A path corresponding to a random number in the number set is determined as the target path.

5. A distributed server request processing method, characterized in that: include: In response to the request processing service startup, register the path; In response to a task processing request written under the path, processing the task processing request to obtain a processing result; Feedback the processing result to the node corresponding to the task processing request; Among them, the path of the write task processing request is the target path determined by the node, and the steps for determining the target path are: the node monitors the number of requests under each path in the path set to obtain an initial request quantity set; determines the path corresponding to the minimum number of requests in the initial request quantity set to obtain the target path.

6. The method according to claim 5, characterized in that After processing the task processing request and obtaining the processing result, the method further includes: Delete the task processing request corresponding to the processing result.

7. A distributed server request processing device, characterized in that: The device comprises: The quantity monitoring module is used to monitor the number of requests under each path in the path set and obtain the initial request quantity set; A path determination module is used to determine the path corresponding to the minimum number of requests in the initial request number set to obtain a target path; A request writing module, configured to write a task processing request under the target path; wherein the server corresponding to the target path is the target server; The result acquisition module is used to acquire a processing result obtained by the target server after processing the task processing request after monitoring the task processing request.

8. 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.

9. 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.

10. 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.