Processing method, device and electronic device

By setting up a queue in shared memory and processing processes asynchronously, the problem of slow response to client requests is solved, efficient inter-process communication and request processing is achieved, and system performance is improved.

CN112084045BActive Publication Date: 2024-08-27BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010950297.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-10
Publication Date
2024-08-27
Estimated Expiration
2040-09-10

AI Technical Summary

Technical Problem

In the prior art, when communicating between processes, the server responds to client requests slowly and has low request processing performance, especially when multiple clients send a large number of requests to the server.

Method used

By setting the first queue and the second queue in shared memory, the leader process adds the processes in the first queue to the second queue, clears the processes in the first queue, and responds to the processes in the second queue using asynchronous processing. Implement batch processing of client requests.

Benefits of technology

It improves the processing efficiency and performance of client requests, ensures fast and efficient interaction between the client and server, reduces IO interaction, and improves the system's response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112084045B
    Figure CN112084045B
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for processing a process. If a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue; a notification is sent to a server process through the leading process to notify the server process to add processes in the first queue to a second queue and clear processes in the first queue; and the server process responds to the leading process and processes in the second queue. In this method, multiple client processes are received in batches through the first queue, and these client processes are executed through the second queue, so that the first queue continues to receive subsequent client processes without affecting the first queue. This method can quickly process client processes in batches, and the client and the server can interact quickly and efficiently, thereby improving the processing efficiency and performance of client requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of process processing, and in particular to a method, device and electronic equipment for processing a process. Background Art

[0002] Interactive communication between processes can be achieved in many ways, such as pipes, FIFO (First Input First Output), message queues, semaphores, shared memory, etc. Among them, pipes are half-duplex working modes, with slow communication speed and limited capacity, and only parent and child processes can communicate through pipes; FIFO can achieve communication between any processes, but the speed is slow; the capacity of message queues is limited by the system; semaphores cannot transmit complex messages, but can only synchronize messages; shared memory is easy to control capacity and fast, but there are process security issues. Regardless of which of the above methods is used, the server can only receive and process client requests one by one in sequence. When multiple clients send a large number of requests to the server, the server responds to client requests slowly and the request processing performance is low. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a method, device and electronic device for processing a process, so as to improve the processing efficiency and performance of client requests.

[0004] In a first aspect, an embodiment of the present invention provides a method for processing a process, comprising: if a first process combination is received within a first time period, determining a leading process from the first process combination, and adding processes other than the leading process in the first process combination to a first queue; wherein the first process combination includes multiple client processes; sending a notification to a server process through the leading process to notify the server process to add processes in the first queue to a second queue and clear processes in the first queue; and responding to the leading process and processes in the second queue through the server process.

[0005] Furthermore, the first queue and the second queue are set in a shared memory; wherein the shared memory is used to be accessed by the client process and the server process.

[0006] Furthermore, the step of sending a notification to the server process through the leader process includes: if it is detected that the leader process is hung, electing a new leader process from the processes in the first queue, and sending a notification to the server process through the new leader process.

[0007] Furthermore, before the step of clearing the processes in the first queue, the method also includes: if a new client process other than the first process combination is received, setting the new client process to a waiting state until the first queue is cleared; after the step of clearing the processes in the first queue, the method also includes: adding the new client process to the first queue.

[0008] Furthermore, the step of responding to the leading process and the processes in the second queue through the server process includes: processing the leading process and the processes in the second queue in an asynchronous manner through the server process to generate a response message corresponding to each process; and returning each response message to the client process corresponding to the response message.

[0009] Furthermore, the second queue includes multiple sub-queues; the process in the first queue is located in the first sub-queue in the second queue; the method also includes: in the process of processing the process in the first sub-queue, if there is a new process that needs to be added to the second queue, the new process is added to the second sub-queue in the second queue.

[0010] Furthermore, the step of returning each response message to the client process corresponding to the response message includes: if there are multiple target response messages corresponding to the same target client process, merging the multiple target response messages to obtain a merged message; and sending the merged message to the target client process.

[0011] In a second aspect, an embodiment of the present invention provides a device for processing processes, the device comprising: a determination module, for determining a leading process from the first process combination if a first process combination is received within a first time period, and adding processes other than the leading process in the first process combination to a first queue; wherein the first process combination includes multiple client processes; a notification module, for sending a notification to a server process through the leading process to notify the server process to add processes in the first queue to a second queue and clear processes in the first queue; and a response module, for responding to the leading process and processes in the second queue through the server process.

[0012] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement a method of the processing process of any one of the first aspects.

[0013] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method of any processing process of the first aspect.

[0014] The embodiments of the present invention bring the following beneficial effects:

[0015] The embodiment of the present invention provides a method, device and electronic device for processing a process. If a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue; a notification is sent to a server process through the leading process to notify the server process to add processes in the first queue to a second queue and clear processes in the first queue; and the server process responds to the leading process and processes in the second queue. In this method, multiple client processes are received in batches through the first queue, and these client processes are executed through the second queue, so that the first queue continues to receive subsequent client processes without affecting the first queue. This method can quickly process client processes in batches, and the client and server can interact quickly and efficiently, thereby improving the processing efficiency and performance of client requests.

[0016] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A flowchart of a method for processing a process provided by an embodiment of the present invention;

[0020] Figure 2 A flowchart of another method for processing a process provided by an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of the structure of a device for processing a process provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] Currently, interactive communication between processes can be achieved in many ways, such as pipes, FIFOs, message queues, semaphores, shared memory, etc.; For example, pipes, FIFOs, message queues, semaphores, shared memory, etc.; Among them, pipes are half-duplex working modes, that is, data can only flow in one direction, which belongs to one-way transmission, has fixed read and write ends, and has slow communication speed and limited capacity, and only parent and child processes can communicate through pipes; FIFO can realize communication between any processes, but the speed is slow; the capacity of the message queue is limited by the system, and it should be noted that when reading data for the first time, the situation that the data was not read last time should be considered; semaphores cannot transmit complex messages, but can only synchronize messages; shared memory is easy to control capacity and has a fast speed, but there are process security issues, such as when one process is writing, the other process should pay attention to reading and writing issues.

[0025] Based on this, the embodiments of the present invention provide a method, device and electronic device for processing a process. The technology can be applied to various devices, especially to devices such as servers and service terminals.

[0026] To facilitate understanding of this embodiment, a method for processing a process disclosed in an embodiment of the present invention is first introduced in detail. The execution subject of the method is a device, such as a server; Figure 1 As shown, the method comprises the following steps:

[0027] Step S102, if a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue; wherein the first process combination includes a plurality of client processes;

[0028] The first time period can be 1 second, 2 seconds, or 3 seconds, which can be set according to actual needs; the first process combination can be all client processes received in the first time period; wherein the client process can be generated when the client sends a task request to the server. Multiple client processes can be generated by one client or multiple clients; the leader process can be the first client process received in the first time period; the first queue can be set in a shared memory, which can be accessed by the client process and the server; the first queue is used to repeatedly save the process combination received by the server in the preset time period; wherein the shared memory can be understood as a mapped section of memory that can be accessed by other processes. This section of shared memory can be created by one process, but can be accessed by multiple processes. It can be used in conjunction with other communication mechanisms to achieve synchronization and communication between processes.

[0029] Specifically, the server may receive multiple client processes within a first time period, such as within the first second. The multiple client processes are usually arranged in the time order when the client sends the request. The first received client process can be set as the leading process. After receiving the leading process, the server can obtain a time window, which can be 1 second, and add the processes other than the leading process in the first process combination received within the 1 second to the first queue. The leading process can be used to send a notification to the server so that the first queue continues to receive the second process combination in the second time period to achieve batch processing of client processes.

[0030] Step S104, sending a notification to the server process through the leader process to notify the server process to add the processes in the first queue to the second queue and clear the processes in the first queue;

[0031] The above-mentioned server process can run in a device, such as a server; the above-mentioned second queue can also be set in a shared memory, and the second queue can be used to store the processes added to the first queue in batches; after adding the processes in the first queue to the second queue, in order to be able to receive the client processes in the next time period, the processes in the first queue need to be cleared.

[0032] Specifically, after the first process combination is added to the first queue, the leading process can send a notification to the server process within a set time period, and after the server process receives the notification, the processes in the first queue are added to the second queue; in addition, in order to enable the first queue to continue to be used, a new client process in the next time period is added, and the processes in the first queue are cleared at the same time, so that the first queue and the second queue can be executed concurrently.

[0033] Step S106, responding to the leading process and the processes in the second queue through the server process.

[0034] The processes in the second queue may include a batch of process combinations or multiple batches of process combinations; a batch of process combinations may correspond to the first process combinations, and each batch of process combinations corresponds to the client processes received within the time period.

[0035] Specifically, the server process can process the leading process and the processes in the second queue asynchronously or synchronously. After processing the leading process and the processes in the second queue, it can generate a corresponding response message for each client process, and send each response message to the corresponding client process, so that the client process can obtain the execution result from the response message; if the server sends multiple response messages to a client continuously at the same time, you can also choose to merge the multiple response messages and send them together, thereby reducing IO (Input / Output) interaction.

[0036] The first queue and the second queue are set in a shared memory; wherein the shared memory is used to be accessed by a client process and a server process.

[0037] The embodiment of the present invention provides a method for processing a process. If a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue; a notification is sent to a server process through the leading process to notify the server process to add processes in the first queue to a second queue and clear processes in the first queue; and the server process responds to the leading process and processes in the second queue. In this method, multiple client processes are received in batches through the first queue, and these client processes are executed through the second queue, so that the first queue continues to receive subsequent client processes without affecting the first queue. This method can quickly process client processes in batches, and the client and server can interact quickly and efficiently, thereby improving the processing efficiency and performance of client requests.

[0038] The embodiment of the present invention also provides another method for processing a process. This embodiment focuses on describing the specific implementation of the step of sending a notification to the server process through the leader process (implemented by step S204), the specific implementation of the step before and after clearing the processes in the first queue (implemented by step S206), and the specific implementation of the step of responding to the leader process and the processes in the second queue through the server process (implemented by steps S208-S210). Figure 2 As shown, the method comprises the following steps:

[0039] Step S202: if a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue;

[0040] Step S204, if it is detected that the leader process is hung, a new leader process is elected from the processes in the first queue, and a notification is sent to the server process through the new leader process to notify the server process to add the processes in the first queue to the second queue;

[0041] After adding the processes other than the leader process in the first process combination to the first queue, during the preset timeout period when the processes in the first queue are waiting to be awakened (the leader process sends a notification to the server process), if the server detects that the leader process is dead, for example, the client corresponding to the leader process is closed, a new leader process can be elected from the processes in the first queue through the server. For example, the first process in the first queue can be used as the new leader process, or a random selection can be made. Finally, a notification is sent to the server process through the new leader process to notify the server process to add the surviving processes in the first queue to the second queue.

[0042] Step S206, if a new client process other than the first process combination is received, the new client process is set to a waiting state until the first queue is cleared; the new client process is added to the first queue;

[0043] After the server process adds the processes in the first queue to the second queue, there are still processes in the first queue. If the server receives a new client process other than the first process combination, that is, receives a new client process in the next time period of the first time period, where the new client process can be one or more; since there are still processes in the first queue, the new client process cannot be directly added to the first queue. The server can set the new client process to a waiting state, which will be canceled after the first queue is cleared. After the first queue is cleared, the first queue can be reused, and the waiting state set for the new client process is canceled, and the new client process can be added to the first queue.

[0044] In addition, in order to correspond to the batch-processed processes in the first queue, the second queue may include multiple subqueues; the processes in the first queue are located in the first subqueue of the second queue; the method further includes: in the process of processing the processes in the first subqueue, if there is a new process that needs to be added to the second queue, the new process is added to the second subqueue of the second queue. It can be understood that the second queue may include multiple subqueues, and the specific number of subqueues can be divided according to batches, which are respectively used to join multiple batches of client processes received by the first queue in different time periods.

[0045] Step S208, processing the leading process and the processes in the second queue in an asynchronous manner through the server process, and generating a response message corresponding to each process;

[0046] Since multiple batches of process combinations may be received in batches in the first queue, multiple batches of process combinations may be received in the second queue. The above asynchronous processing can be understood as processing processes according to asynchronous programs, that is, multiple client processes received within a period of time can be executed concurrently, and response messages corresponding to each process can be generated at the same time.

[0047] Step S210, returning each response message to the client process corresponding to the response message;

[0048] The above response message usually includes the execution result of the request task of the corresponding client process. Specifically, each response message can be returned to the client process corresponding to the response message one by one, or multiple response messages can be combined and sent.

[0049] A possible implementation:

[0050] If there are multiple target response messages corresponding to the same target client process, the multiple target response messages are merged to obtain a merged message; and the merged message is sent to the target client process.

[0051] Since a target client may send multiple requests to the server at the same time, that is, multiple client processes, the server process can merge multiple target response messages corresponding to the same target client process to obtain a merged message after processing the client process and generating the corresponding response message. The merged message can contain multiple execution results. Finally, the merged message is sent to the target client process so that the client can perform subsequent operations based on the received response message, which can reduce the IO interaction between the client and the server and improve processing efficiency.

[0052] In this method, a first queue and a second queue are set in the shared memory running on the server. The first queue receives the process combination in batches, and the batch processing method can improve the efficiency of the receiving process; and the received process combination is added to the subqueue of the second queue respectively, so that the received process is executed concurrently by the first queue and the second queue. In the scenario of high concurrent interaction, multiple processes can interact quickly and efficiently, receive the client's request tasks faster, and respond to the client's tasks faster. The first queue and the second queue can be processed concurrently, and the client process can be processed quickly and in batches. The client and the server can interact quickly and efficiently, which improves the processing efficiency and performance of the client request. In addition, if there are multiple target response messages corresponding to the same target client process, the multiple target response messages are merged to obtain a merged message; the merged message is sent to the target client process. The IO interaction between the client and the server is reduced.

[0053] Corresponding to the above method embodiment, the embodiment of the present invention provides a device for processing a process, such as Figure 3 As shown, the device comprises:

[0054] The determination module 31 is configured to determine a leading process from the first process combination if a first process combination is received within a first time period, and add processes other than the leading process in the first process combination to a first queue; wherein the first process combination includes a plurality of client processes;

[0055] The notification module 32 is used to send a notification to the server process through the leader process to notify the server process to add the processes in the first queue to the second queue and clear the processes in the first queue;

[0056] The response module 33 is used to respond to the leading process and the processes in the second queue through the server process.

[0057] The embodiment of the present invention provides a device for processing processes. If a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue; a notification is sent to a server process through the leading process to notify the server process to add processes in the first queue to a second queue and clear processes in the first queue; and the server process responds to the leading process and processes in the second queue. In this method, multiple client processes are received in batches through the first queue, and these client processes are executed through the second queue, so that the first queue continues to receive subsequent client processes without affecting the first queue. This method can quickly process client processes in batches, and the client and server can interact quickly and efficiently, thereby improving the processing efficiency and performance of client requests.

[0058] Furthermore, the first queue and the second queue are set in a shared memory; wherein the shared memory is used to be accessed by the client process and the server process.

[0059] Furthermore, the above-mentioned determination module is also used for: if it is detected that the leader process is hung, electing a new leader process from the processes in the first queue, and sending a notification to the server process through the new leader process.

[0060] Furthermore, the notification module is also used to: if a new client process other than the first process combination is received, set the new client process to a waiting state until the first queue is cleared; after clearing the processes in the first queue, add the new client process to the first queue.

[0061] Furthermore, the above-mentioned response module is also used to: process the leading process and the processes in the second queue in an asynchronous processing manner through the server process, generate a response message corresponding to each process; and return each response message to the client process corresponding to the response message.

[0062] Furthermore, the above-mentioned second queue includes multiple sub-queues; the process in the first queue is located in the first sub-queue in the second queue; the above-mentioned response module is also used for: in the process of processing the process in the first sub-queue, if there is a new process that needs to be added to the second queue, the new process is added to the second sub-queue in the second queue.

[0063] Furthermore, the above-mentioned response module is also used for: if there are multiple target response messages corresponding to the same target client process, merging the multiple target response messages to obtain a merged message; and sending the merged message to the target client process.

[0064] The device for processing a process provided by the embodiment of the present invention has the same technical features as the method for processing a process provided by the above embodiment, and therefore can solve the same technical problems and achieve the same technical effects.

[0065] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method of the above processing process.

[0066] See also Figure 4 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned processing method.

[0067] Further, Figure 4 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0068] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0069] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0070] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method of the above-mentioned processing process.

[0071] The computer program product of the method, device and electronic device for processing a process provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0073] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0074] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0075] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0076] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the responsive technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for processing a process, characterized in that The method comprises: If a first process combination is received within a first time period, a leading process is determined from the first process combination, and processes other than the leading process in the first process combination are added to a first queue; wherein the first process combination includes a plurality of client processes; Sending a notification to the server process through the leader process to notify the server process to add the processes in the first queue to the second queue and clear the processes in the first queue; Responding to the leading process and the processes in the second queue through the server process; The step of responding to the leading process and the processes in the second queue through the server process includes: Processing the leader process and the processes in the second queue in an asynchronous manner through the server process to generate a response message corresponding to each process; Returning each of the response messages to the client process corresponding to the response message; The second queue includes a plurality of sub-queues; the process in the first queue is located in the first sub-queue of the second queue; the method further includes: During the process of processing the processes in the first sub-queue, if there is a new process that needs to be added to the second queue, the new process is added to the second sub-queue in the second queue.

2. The method according to claim 1, characterized in that The first queue and the second queue are set in a shared memory; wherein the shared memory is used to be accessed by the client process and the server process.

3. The method according to claim 1, characterized in that The step of sending a notification to the server process through the leader process includes: If it is detected that the leader process is hung, a new leader process is elected from the processes in the first queue, and the notification is sent to the server process through the new leader process.

4. The method according to claim 1, characterized in that: Before the step of clearing the processes in the first queue, the method further includes: if a new client process other than the first process combination is received, setting the new client process to a waiting state until the first queue is cleared; After the step of clearing the processes in the first queue, the method further includes: adding the new client process to the first queue.

5. The method according to claim 1, characterized in that The step of returning each of the response messages to the client process corresponding to the response message comprises: If there are multiple target response messages corresponding to the same target client process, merge the multiple target response messages to obtain a merged message; The merge message is sent to the target client process.

6. A device for processing a process, characterized in that The device comprises: a determination module, configured to, if a first process combination is received within a first time period, determine a leading process from the first process combination, and add processes other than the leading process in the first process combination to a first queue; wherein the first process combination includes a plurality of client processes; A notification module, used for sending a notification to the server process through the leader process to notify the server process to add the processes in the first queue to the second queue and clear the processes in the first queue; A response module, used for responding to the leader process and the processes in the second queue through the server process; Wherein, the response module is also used for: Processing the leader process and the processes in the second queue in an asynchronous manner through the server process to generate a response message corresponding to each process; Returning each of the response messages to the client process corresponding to the response message; The second queue includes a plurality of subqueues; the process in the first queue is located in the first subqueue in the second queue; the device is further used for: During the process of processing the processes in the first sub-queue, if there is a new process that needs to be added to the second queue, the new process is added to the second sub-queue in the second queue.

7. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method of the processing process according to any one of claims 1 to 5.

8. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method of the processing process described in any one of claims 1 to 5.