Reverse proxy system event scheduling method, computer device, medium and product

By introducing event scheduling queues and batch processing strategies in the reverse proxy system, the performance bottlenecks of existing systems in high concurrency and big data transmission are solved, and more efficient resource utilization and response speed are achieved.

CN119484497AActive Publication Date: 2025-02-18BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411511765.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

When the existing reverse proxy system handles a large number of new connections, long connections and large block data transmission, there are problems such as serialization of event processing, uneven resource allocation, insufficient resource utilization and poor overall response speed.

Method used

Using a reverse proxy system event scheduling method, by obtaining the type of target events triggered in the preset period, calling the target database and functions, adding the target event to the preset scheduling queue, and based on the preset processing strategy and processing proportion The information calls out events in the queue in batches.

Benefits of technology

It improves the system's response speed and overall efficiency, ensures that important events are quickly processed, optimizes resource utilization, reduces system load, and improves the stability of the system in high concurrency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484497A_ABST
    Figure CN119484497A_ABST
Patent Text Reader

Abstract

The invention discloses a reverse proxy system event scheduling method, a computer device, a medium and a product. The method comprises the steps that the type of a target event triggered in a preset period is obtained, a target database and a target function are called based on the type, and the target database comprises preset priority information and processing proportion information; adding the target event into a preset scheduling queue according to the target function and preset priority information; and based on a preset processing strategy, processing the proportion information to call out the target events in the preset scheduling queue in batches. According to the method, latest event information can be obtained in real time, and newly occurring events can be processed in time; through classified scheduling, it can be ensured that important events can be processed faster, the overall efficiency is improved, the response time is shortened, the processing efficiency is improved, the events can be effectively managed especially in a high-concurrency scene, and the system stability is improved; the batch processing can effectively control the system load, avoids the performance bottleneck caused by processing excessive events at one time, and improves the processing flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of reverse proxy system event scheduling, and in particular to a method, computer device, medium, and product for reverse proxy system event scheduling. Background Art

[0002] As an open source and high-performance HTTP Web server and reverse proxy server architecture, Nginx has been widely used in the Internet field. Its main features include small memory usage, high concurrency, high scalability, high reliability, and support for hot deployment. With the development of technology, Nginx-based reverse proxy systems gradually support the processing of multiple application protocols. These systems usually need to handle a large number of new connections, long connections, and large-scale data transmission. To this end, the system adopts the edge trigger mode of Epoll, combined with event-driven connection management and data transmission management, to improve the overall performance of the system.

[0003] Although Nginx and its reverse proxy system have significant advantages in performance, there is still room for improvement in the stress test of certain performance indicators. For example, indicators such as the number of new connections or the throughput performance value of large blocks of data need to be optimized.

[0004] In the prior art, the Nginx working process mainly processes the read, write and time events of the connection in a loop. This serial processing of events results in computing resources not being allocated to related events in priority, thus affecting the overall performance of the system. Specifically, the edge triggering mode of Epoll is still limited in the performance of the system in some extreme cases when processing a large number of connections, such as the throughput test of large blocks of data. This is mainly because the event processing mechanism has bottlenecks when processing complex events, resulting in the inability to fully utilize system resources; in a multi-process or multi-threaded environment, there is a problem of uneven resource allocation. For example, some high-priority requests may not be processed in time due to insufficient resource allocation, affecting the overall response speed of the system. Summary of the invention

[0005] In view of this, the embodiments of the present disclosure provide a method, computer device, medium, and product for event scheduling of a reverse proxy system, which can solve the problems existing in the prior art such as serialization of event processing, uneven resource allocation, insufficient resource utilization, and poor overall response speed.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for scheduling events in a reverse proxy system, including:

[0007] Obtain the type of target event triggered within a preset period, and call the target database and the target function based on the type, wherein the target database includes preset priority information, processing ratio

[0008] information;

[0009] Adding the target event to a preset scheduling queue according to the target function and the preset priority information;

[0010] Based on the preset processing strategy and the processing ratio information, the target events in the preset scheduling queue are called out in batches.

[0011] Optionally, when the type is a new connection, the target database includes a priority for accepting a connection that is greater than a priority for reading and writing data;

[0012] When the type is bulk data transmission, the preset priority information includes that the priority of reading and writing data is greater than the priority of accepting connection.

[0013] Optionally, when the target event belongs to an Epoll event, the target function is the ngx_epoll_process_events function;

[0014] When the target event belongs to an accept connection event or an event queue, the target function is the ngx_event_process_posted function;

[0015] When the target event is a time event, the target function is the ngx_event_expire_timers function.

[0016] Optionally, calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes:

[0017] Acquire the single call-out quantity of target events of corresponding priority according to the processing ratio information, and acquire the call-out order of all events from high to low priority according to the preset priority information;

[0018] Determine whether the number of target events corresponding to each priority level is less than the single call-out number, and if not, call out the target events in the preset scheduling queue in batches according to the single call-out number and the call-out order of all events;

[0019] If the number of target events corresponding to each priority level is less than the single call-out number, obtain the actual number of target events corresponding to each priority level, and call out the target events in the preset scheduling queue in batches based on the actual number and the call-out order of all events.

[0020] Optionally, calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes:

[0021] Acquire the single call-out quantity of target events of corresponding priority according to the processing ratio information, and acquire the call-out order of all events from high to low priority according to the preset priority information;

[0022] Determine whether the number of target events corresponding to each priority class is less than the single call-out number; if not, obtain the number of priority types of all different priorities in the preset scheduling queue, and determine whether the number of priority types is greater than 2; if not, call out the target events in the preset scheduling queue in batches according to the single call-out number and the call-out order of all events;

[0023] If the number of priority types is greater than 2, the events to be called out corresponding to the first two priority types with the highest priority are obtained according to the order of calling out all events and the number of single calls out, the two priority types are recorded as a polling combination, and the target events in the preset scheduling queue are batch-called based on the polling combination;

[0024] When all events corresponding to higher priorities in the polling combination are called out, the events to be called out corresponding to the next priority are obtained according to the order in which all events are called out, and the next priority and the lower priority in the polling combination are recorded as the updated polling combination, and the target events in the preset scheduling queue are batch-called based on the updated polling combination;

[0025] If the number of target events corresponding to each priority level is less than the single call-out number, obtaining the actual number of target events corresponding to each priority level;

[0026] Obtain the number of priority types of all different priorities in the preset scheduling queue, and determine whether the number of priority types is greater than 2. If not, call out the target events in the preset scheduling queue in batches based on the actual number and the order in which all events are called out;

[0027] If the number of priority types is greater than 2, the events to be called out corresponding to the first two priority types with the highest priority are obtained according to the order of calling out all events and the number of single calls out, the two priority types are recorded as a polling combination, and based on the polling combination and the corresponding actual quantity, the target events in the preset scheduling queue are called out in batches;

[0028] When all events corresponding to higher priorities in the polling combination are called out, the events to be called out corresponding to the next priority are obtained according to the order in which all events are called out, and the next priority and the lower priority in the polling combination are recorded as the updated polling combination, and the target events in the preset scheduling queue are called out in batches based on the updated polling combination and the corresponding actual quantity.

[0029] Optionally, calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes:

[0030] According to the processing ratio information, the single call-out ratio and the single processing total amount of all events corresponding to different priorities are obtained;

[0031] Acquire the calling order of all events with the highest priority from the lowest priority according to the preset priority information, and acquire the number of events corresponding to each priority level corresponding to the calling order of all events;

[0032] Determine the target outbound volume for the highest priority event based on the total single processing volume and single outbound ratio;

[0033] The target output is P1. Among them, E is the total amount of single processing, N1 is the total amount of events of the first priority, and N2 is the total amount of events of the second priority. The first priority is higher than the second priority.

[0034] Determine whether the target call-out amount is not less than half of the number of events corresponding to the highest priority and is greater than the target threshold. If so, determine the single call-out amount of the event corresponding to the highest priority as the target threshold; the target threshold is W,

[0035] If not, the target call-out amount is determined to be the single call-out amount of the event corresponding to the highest priority;

[0036] Determine whether the event quantity is less than the single call-out quantity, and if not, call out the target events in the preset scheduling queue in batches according to the call-out order of all events and the single call-out quantity;

[0037] If so, the target events in the preset scheduling queue are batch-called according to the calling order of all events and the event quantity.

[0038] Optionally, calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes:

[0039] According to the processing ratio information, the single call-out ratio and the single processing total amount of all events corresponding to different priorities are obtained, and according to the single processing total amount and the single call-out ratio, the target call-out amount of events corresponding to different priorities is determined; wherein, the target event with the highest priority has the highest proportion;

[0040] Acquire the order of all events with the highest priority from the lowest priority according to the preset priority information, and acquire the actual number corresponding to each priority level corresponding to the order of all events;

[0041] If the actual quantities corresponding to all class priorities are less than the target call-out quantity of the event corresponding to the highest priority, the actual quantities corresponding to different priorities shall be used as the single call-out quantity of the corresponding priority;

[0042] If the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order of all events and the target call-out quantity;

[0043] If the actual number of events corresponding to the highest priority is less than the target call-out quantity corresponding to the highest priority, obtain all other priorities whose actual numbers of events corresponding to other priorities are not less than the target call-out quantity corresponding to the highest priority, and use the target call-out quantity corresponding to the highest priority as the single call-out quantity of the event corresponding to the highest priority among all other priorities, and use the actual number of events corresponding to the highest priority as the single call-out quantity of the event corresponding to the highest priority.

[0044] Optionally, calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes:

[0045] According to the processing ratio information, the single call-out ratio and the single processing total amount of all events corresponding to different priorities are obtained, and according to the single processing total amount and the single call-out ratio, the target call-out amount of events corresponding to different priorities is determined; wherein, the target event with the highest priority has the highest proportion;

[0046] Acquire the call-out order of all events from high to low priority according to the preset priority information, and acquire the actual number corresponding to each priority level corresponding to the call-out order of all events;

[0047] If the actual quantities corresponding to all class priorities are less than the target call-out quantity of the event corresponding to the highest priority, the actual quantities corresponding to different priorities shall be used as the single call-out quantity of the corresponding priority;

[0048] If the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order of all events and the target call-out quantity;

[0049] If the actual number of events corresponding to the highest priority is less than the target call-out quantity corresponding to the highest priority, the actual number of events corresponding to the highest priority will be used as the single call-out quantity of events corresponding to the highest priority;

[0050] Obtain all other priorities whose actual number of events corresponding to other priorities is not less than the target call-out amount corresponding to the highest priority, and use the target call-out amount corresponding to the highest priority as the single call-out amount of the event corresponding to the highest priority among all other priorities;

[0051] Based on the single call-out ratio of events corresponding to other priorities and the single call-out amount of the event corresponding to the highest priority among other priorities, the single call-out amount of events corresponding to other priorities is dynamically obtained.

[0052] Optionally, when the type is large block data transmission, determine whether writing data to the upstream connection is blocked. If so, add the write event of the upstream connection to the Epoll model, and in response to the triggering of a writable event, add the write event in the Epoll model to a preset scheduling queue.

[0053] In a second aspect, the embodiment of the present disclosure further provides a system for scheduling events of a reverse proxy system, including:

[0054] A target event acquisition module is used to acquire the type of target event triggered within a preset period, and call a target database and a target function based on the type, wherein the target database includes preset priority information and processing ratio information;

[0055] A joining module is used to add the target event to the preset scheduling queue according to the target function and preset priority information;

[0056] The scheduling module is used to call out target events in the preset scheduling queue in batches based on preset processing strategies and processing ratio information.

[0057] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:

[0058] The computer device comprises:

[0059] at least one processor; and,

[0060] a memory communicatively connected to the at least one processor; wherein,

[0061] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above-mentioned methods for reverse proxy system event scheduling.

[0062] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned methods for reverse proxy system event scheduling.

[0063] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.

[0064] The method for event scheduling of a reverse proxy system disclosed in the present application is not to execute events directly, but to put them into a queue, and to call them out from the preset scheduling queue in batches according to preset processing strategies and processing ratio information. Specifically, by obtaining the type of target events triggered within a preset period, the latest event information can be obtained in real time to ensure that the system can handle new events in a timely manner, which helps to improve the response speed of the system. By classifying target events, subsequent processing and scheduling are facilitated, and the accuracy of event management is improved. Through classified scheduling, important events can be processed faster, the overall efficiency of the system can be improved, and the response time and processing efficiency can be improved, especially in high-concurrency scenarios, events can be effectively managed, and system stability can be improved. Batch processing can effectively control the system load and avoid performance bottlenecks caused by processing too many events at one time. Flexible processing strategies can be adjusted according to real-time system status, which improves the adaptability and elasticity of processing.

[0065] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0067] Figure 1 A flowchart of a method for scheduling events in a reverse proxy system provided in an embodiment of the present disclosure.

[0068] Figure 2 The figure is a flow chart of a first embodiment of calling out a target event from a preset scheduling queue.

[0069] Figure 3 The figure is a flow chart of a second embodiment of calling out a target event from a preset scheduling queue.

[0070] Figure 4 The flowchart of the third embodiment of calling out a target event from a preset scheduling queue is shown in FIG.

[0071] Figure 5 The flowchart of the fourth embodiment of calling out a target event from a preset scheduling queue is shown in FIG.

[0072] Figure 6The fifth embodiment is a flowchart of calling out a target event from a preset scheduling queue.

[0073] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0074] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0075] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0076] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0077] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0078] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0079] Reference Figure 1The present application discloses a method for event scheduling of a reverse proxy system, which specifically includes the following steps:

[0080] S100, obtaining the type of target event triggered within a preset period, and calling a target database and a target function based on the type, wherein the target database includes preset priority information and processing ratio information.

[0081] When the type is a new connection, the target database includes a priority for accepting connections that is greater than the priority for reading and writing data;

[0082] When the type is bulk data transmission, the preset priority information includes that the priority of reading and writing data is greater than the priority of accepting the connection.

[0083] When the target event belongs to the Epoll event, the target function is the ngx_epoll_process_events function;

[0084] When the target event belongs to the accept connection event or event queue, the target function is the ngx_event_process_posted function;

[0085] When the target event is a time event, the target function is the ngx_event_expire_timers function.

[0086] S200, adding the target event to a preset scheduling queue according to the target function and preset priority information.

[0087] Among them, the preset scheduling queue can adopt a circular queue constructed by an array, each node in the array includes a priority value, the number of events, and a bidirectional linked list, and the linked list can link each event.

[0088] Specifically, the time events to be triggered, the connection acceptance events, and the events in the event queue can be added to the scheduling queue according to the priority, and then the events are processed in batches according to the proportion of the priority processing events. For example, priority 1 processes 10 events, priority 2 processes 9 events, and until priority 10 processes 1 event. The parameter value can be set according to system requirements. For example, the management system serving the reverse proxy system can set the parameters as needed when configuring the reverse proxy policy.

[0089] Furthermore, for Epoll event processing, the system calls the ngx_epoll_process_events function to process the callback function of the time event to execute the event function, and changes the call callback function to be added to the scheduling queue according to the priority; for the accepted connection event queue processing, the system calls the ngx_event_process_posted function to process the accepted connection event queue, and in the function, changes the call callback function of the event to be added to the scheduling queue according to the priority; for time event processing, the system calls the ngx_event_expire_timers function to process the callback function of the time event to execute the event function, and changes the call callback function to be added to the scheduling queue according to the priority; for event queue processing, the system calls the ngx_event_process_posted function to process the event queue, and the event queue and the accepted connection event queue use a common function.

[0090] S300, calling out target events in a preset scheduling queue in batches based on a preset processing strategy and processing ratio information.

[0091] The method for event scheduling of a reverse proxy system disclosed in the present application is not to execute events directly, but to put them into a queue, and to call them out from the preset scheduling queue in batches according to preset processing strategies and processing ratio information. Specifically, by obtaining the type of target events triggered within a preset period, the latest event information can be obtained in real time to ensure that the system can handle new events in a timely manner, which helps to improve the response speed of the system. By classifying target events, subsequent processing and scheduling are facilitated, and the accuracy of event management is improved. Through classified scheduling, important events can be processed faster, the overall efficiency of the system can be improved, and the response time and processing efficiency can be improved, especially in high-concurrency scenarios, events can be effectively managed, and system stability can be improved. Batch processing can effectively control the system load and avoid performance bottlenecks caused by processing too many events at one time. Flexible processing strategies can be adjusted according to real-time system status, which improves the adaptability and elasticity of processing.

[0092] The method disclosed in the scheme can respond to user requests in real time and improve the service quality and user experience of the overall system by effectively scheduling and processing events. The use of priority queues and batch processing can effectively reduce the waste of resources and make more reasonable use of resources such as CPU and memory. Through appropriate scheduling strategies and processing ratios, it can ensure that the system still maintains good performance under high concurrency and high load conditions, reducing the risk of system crashes or failures. The scheduling mechanism is easy to expand and can adjust the preset cycle, priority setting and processing strategy at any time as needed to adapt to different scenarios and demand changes. Detailed monitoring and logging can be performed for the processing and scheduling of each event, which is helpful for subsequent system tuning and problem diagnosis, and improves the maintainability of the system. In short, the method of event scheduling in the reverse proxy system has a significant effect on improving system processing efficiency, resource utilization and overall system stability through reasonable event management and scheduling strategies.

[0093] Example 1

[0094] Reference Figure 2 In Example 1, the specific scheduling method of "calling out target events in the preset scheduling queue in batches based on the preset processing strategy and processing ratio information" includes the following:

[0095] A100, obtains the single call-out quantity of the target event of the corresponding priority according to the processing ratio information, and obtains the call-out order of all events from high to low priority according to the preset priority information.

[0096] When there are two types of priority in the preset scheduling queue, for example: the number of single call-outs of target events of corresponding priority is obtained according to the processing ratio information, for example, the obtained single call-out numbers (that is, the number of preset priority processing) are 10 and 5 respectively; the call-out order of all events from high to low priority is obtained according to the preset priority information, for example, the call-out order of all events includes: first priority, second priority, among which the target events corresponding to the first priority are 14, and the target events corresponding to the second priority are 16.

[0097] A200, determining whether the number of target events corresponding to each priority level is less than the single call-out quantity, if not, calling out the target events in the preset scheduling queue in batches according to the single call-out quantity and the call-out sequence of all events.

[0098] In this embodiment, the number of target events corresponding to the first priority is greater than the corresponding single call-out number, and the number of target events corresponding to the second priority is greater than the corresponding single call-out number. Then, according to the single call-out numbers of 10 and 5, 10 events in the first priority are called out each time, and 5 events in the second priority are called out at the same time.

[0099] A300, if the number of target events corresponding to each priority level is less than the single call-out quantity, obtain the actual number of target events corresponding to each priority level, and call out the target events in the preset scheduling queue in batches based on the actual number and the call-out order of all events.

[0100] Specifically, after one round is called out from the preset scheduling queue, there are 4 target events corresponding to the first priority level remaining (i.e. the actual number), and there are 11 target events corresponding to the second priority level remaining. Because the number of target events corresponding to the first priority level is less than the corresponding single call-out number, and the number of target events corresponding to the second priority level is greater than the corresponding single call-out number, the second round calls out 4 events of the first priority level (i.e. the actual number), and calls out 5 events of the second priority level (i.e. the single call-out number) at the same time.

[0101] After the second round of call-out is completed, there are 0 target events corresponding to the first priority level remaining (i.e. the actual number), and 6 target events corresponding to the second priority level remaining. Because the number of target events corresponding to the first priority level is less than the corresponding single call-out number, and the number of target events corresponding to the second priority level is greater than the corresponding single call-out number, the third round calls out 0 events in the first priority level (i.e. the actual number), and calls out 5 events in the second priority level (i.e. the single call-out number) at the same time.

[0102] After the third round of call-out is completed, there are 0 target events corresponding to the first priority level (i.e. the actual number) remaining, and 1 target event corresponding to the second priority level. Because the number of target events corresponding to the first priority level is less than the corresponding single call-out number, and the number of target events corresponding to the second priority level is less than the corresponding single call-out number, the third round calls out 0 events in the first priority level (i.e. the actual number), and calls out 1 event in the second priority level (i.e. the actual number) at the same time.

[0103] In Example 1, when the preset scheduling queue includes more than two priority types, scheduling is also performed according to the above scheme. For ease of understanding, the following detailed description is given with the preset scheduling queue including three priority types.

[0104] For example, the number of single call-outs of target events of corresponding priority is obtained according to the processing ratio information. For example, the obtained number of single call-outs (i.e., the number of preset priority processing) are 10, 5, and 2, respectively; the call-out order of all events from high to low priority is obtained according to the preset priority information. For example, the call-out order of all events includes: first priority, second priority, and third priority. Among them, the number of target events corresponding to the first priority is 14, the number of target events corresponding to the second priority is 16, and the number of target events corresponding to the third priority is 9.

[0105] The first round of scheduling plans includes: calling out 10 target events corresponding to the first priority (i.e. the number of single calls out), calling out 5 target events corresponding to the second priority (i.e. the number of single calls out), and calling out 2 target events corresponding to the third priority (i.e. the number of single calls out).

[0106] The second round of scheduling plans includes: calling out 4 target events corresponding to the first priority (i.e. the actual number), calling out 5 target events corresponding to the second priority (i.e. the number called out at a time), and calling out 2 target events corresponding to the third priority (i.e. the number called out at a time).

[0107] The third round of scheduling plan includes: calling out 0 target events corresponding to the first priority (i.e. the actual number), calling out 5 target events corresponding to the second priority (i.e. the number called out at a time), and calling out 2 target events corresponding to the third priority (i.e. the number called out at a time).

[0108] The fourth round of scheduling plans includes: calling out 0 target events corresponding to the first priority (i.e. the actual number), calling out 1 target event corresponding to the second priority (i.e. the actual number), and calling out 2 target events corresponding to the third priority (i.e. the single call-out number).

[0109] The fifth round of scheduling includes: calling out 0 target events corresponding to the first priority (ie, the actual number), calling out 1 target event corresponding to the second priority (ie, the actual number), and calling out 2 target events corresponding to the third priority (ie, the actual number).

[0110] In this embodiment, the scheduling method disclosed by A100-A300 belongs to processing events according to the number of priority events, and can dynamically adjust the call-out strategy according to the number of events of different priorities and the preset processing ratio, which not only ensures the flexibility of processing but also improves efficiency. Through clear priority order and quantity allocation, it ensures that high-priority events can be processed first, while low-priority events are not ignored; by comparing the number of events and the number of single call-outs, it avoids calling out too many or too few events at one time, thereby ensuring the efficiency and fairness of processing. Through a reasonable batch call-out strategy, it avoids waste and excessive occupation of resources, and realizes optimal utilization of resources. At the same time, it can flexibly handle the situation of insufficient number of events in the queue, ensuring that the overall processing flow will not be affected by the shortage of the number of events of a certain priority level. This solution can easily adapt to event processing scenarios of different scales and complexities, and has good scalability.

[0111] In specific scenarios, when configuring the reverse proxy policy through the management system, you can adjust the parameters of the number of events corresponding to the priority according to the characteristics of the application scenario and the optimal test results. If you take the above scenarios into consideration, you can adjust the parameters according to the optimal data of the scenario. For example, set the priority of the connection event to 1, set the priority of the read and write event to 5, and adjust the parameters again through the management system according to the test results. The specific values ​​​​also need to be adjusted according to the hardware and other resources of the reverse proxy system and the test sample situation.

[0112] Example 2

[0113] Reference Figure 3 In Example 2, the specific scheduling method of "calling out target events in the preset scheduling queue in batches based on the preset processing strategy and processing ratio information" includes the following:

[0114] B100, obtaining the single call-out quantity of the target event of the corresponding priority according to the processing ratio information, and obtaining the call-out order of all events from high to low priority according to the preset priority information.

[0115] B200, determine whether the number of target events corresponding to each priority level is less than the number of single call-outs. If not, obtain the number of priority types of all different priorities in the preset scheduling queue, and determine whether the number of priority types is greater than 2. If not, call out the target events in the preset scheduling queue in batches according to the number of single call-outs and the order of call-outs of all events.

[0116] In this example, the number of priority types is 3. For the case where the number of priority types is not greater than 2, refer to the scheduling solution of Example 1, so it will not be repeated here.

[0117] B300, if the number of priority types is greater than 2, obtain the to-be-called events corresponding to the first two priority types according to the call-out order of all events and the number of single call-outs, record the two priority types as a polling combination, and call out the target events in the preset scheduling queue in batches based on the polling combination.

[0118] B400, when all events corresponding to higher priorities in the polling combination are called out, the events to be called out corresponding to the next priority are obtained according to the order in which all events are called out, and the next priority and the lower priority in the polling combination are recorded as the updated polling combination, and the target events in the preset scheduling queue are batch called out based on the updated polling combination.

[0119] Specifically, when all high-priority events are called out, the events to be called out corresponding to the next priority are obtained according to the calling out order, the medium priority and the original low priority are recorded as the updated polling combination, and the target events in the preset scheduling queue are batch called out based on the updated polling combination.

[0120] B500, if the number of target events corresponding to each priority level is less than the single call-out quantity, obtain the actual number of target events corresponding to each priority level.

[0121] B600, obtain the number of priority types of all different priorities in the preset scheduling queue, and determine whether the number of priority types is greater than 2. If not, batch call out the target events in the preset scheduling queue based on the actual number and the order in which all events are called out.

[0122] B700, if the number of priority types is greater than 2, obtain the to-be-called events corresponding to the first two priority types according to the call-out order of all events and the number of single call-outs, record the two priority types as a polling combination, and call out the target events in the preset scheduling queue in batches based on the polling combination and the corresponding actual quantity;

[0123] When all events corresponding to higher priorities in the polling combination are called out, the events to be called out corresponding to the next priority are obtained according to the order in which all events are called out, and the next priority and the lower priority in the polling combination are recorded as the updated polling combination, and the target events in the preset scheduling queue are called out in batches based on the updated polling combination and the corresponding actual quantity.

[0124] For example, the number of single call-outs of target events of corresponding priority is obtained according to the processing ratio information. For example, the obtained number of single call-outs (i.e., the number of preset priority processing) are 10, 5, and 2, respectively; the call-out order of all events from high to low priority is obtained according to the preset priority information. For example, the call-out order of all events includes: first priority, second priority, and third priority. Among them, the number of target events corresponding to the first priority is 14, the number of target events corresponding to the second priority is 16, and the number of target events corresponding to the third priority is 9.

[0125] In this embodiment, the events to be called corresponding to the first two priority categories obtained include the first priority and the second priority, and the current polling combination is: first priority + second priority, where the first priority corresponds to 14 target events and the second priority corresponds to 16 target events.

[0126] The specific scheduling plan includes the following:

[0127] The first round of scheduling plan includes: calling out 10 target events corresponding to the first priority (i.e. the number of single calls out), calling out 5 target events corresponding to the second priority (i.e. the number of single calls out). After the first round of scheduling, there are 4 target events corresponding to the first priority remaining, and 11 target events corresponding to the second priority remaining.

[0128] The second round of scheduling includes: calling out 4 target events corresponding to the first priority (ie, the actual number), and calling out 5 target events corresponding to the second priority (ie, the single call-out number).

[0129] Specifically, after the second round of scheduling is completed, the number of target events corresponding to the first priority level remaining is 0, and the number of target events corresponding to the second priority level remaining is 6. Because the event corresponding to the highest priority level in the polling combination is 0 at this time, the next scheduling will trigger the pending event corresponding to the next priority level, that is, the pending event corresponding to the third priority level. The updated polling combination is: second priority level + third priority level, where the number of target events corresponding to the second priority level is 6, and the number of target events corresponding to the third priority level is 9.

[0130] The third round of scheduling includes: calling out 5 target events corresponding to the second priority (ie, the number called out at a time), and calling out 2 target events corresponding to the third priority (ie, the number called out at a time).

[0131] The fourth round of scheduling plan includes: calling out 1 target event corresponding to the second priority (i.e. the actual number), calling out 2 target events corresponding to the third priority (i.e. the single call-out number). After the fourth round of scheduling, the remaining target events corresponding to the second priority are 0, and the remaining target events corresponding to the third priority are 5. Since the preset scheduling queue has no events of the next priority at this time, the updated polling combination is: second priority + third priority, among which the target events corresponding to the second priority are 0, and the target events corresponding to the third priority are 5.

[0132] The fifth round of scheduling includes: calling out 0 target events corresponding to the second priority (ie, the actual number), and calling out 2 target events corresponding to the third priority (ie, the single call-out number).

[0133] The sixth round of scheduling includes: calling out 0 target events corresponding to the second priority (ie, the actual number), and calling out 2 target events corresponding to the third priority (ie, the single call-out number).

[0134] The seventh round of scheduling includes: calling out 0 target events corresponding to the second priority (ie, the actual number), calling out 1 target event corresponding to the third priority (ie, the actual number), and thus completing the scheduling of all events.

[0135] In this embodiment, the scheduling method disclosed by B100-B700 belongs to processing events according to the number of priority events, which is the parallel scheme of Example 1. Through clear proportional allocation, it is ensured that events of different priorities can get reasonable processing opportunities, and the preset call-out order ensures that high-priority events can be processed faster; by comparing the number of events and the number of single call-outs, it avoids calling out too many or too few events at one time, thereby ensuring the efficiency and fairness of processing; by judging the number of priority types, it is determined whether further complex scheduling strategies are needed; through polling combination, it is ensured that the first two priority types of events can be processed alternately, which improves the processing efficiency. fairness and efficiency; by dynamically updating the polling combination, it ensures that events of different priorities can be processed continuously, avoiding processing interruptions due to exhaustion of events of a certain priority. At the same time, it can flexibly handle the situation of insufficient number of events in the queue, ensuring that the overall processing flow will not be affected by the shortage of events of a certain priority; by judging the number of priority types, it determines whether further complex scheduling strategies are needed; through the polling combination, it ensures that events of the first two priority levels can be processed alternately, which improves the fairness and efficiency of the processing, and calls out based on the actual number, avoiding processing interruptions due to insufficient number of events of a certain priority.

[0136] The solution can dynamically adjust the call-out strategy according to the number of events of different priorities and the preset processing ratio, which not only ensures the flexibility of processing but also improves efficiency; through clear priority order and quantity allocation, it ensures that high-priority events can be processed first, while low-priority events are not ignored; through a reasonable batch call-out strategy, it avoids waste and excessive occupation of resources and achieves optimal utilization of resources; the solution can easily adapt to event processing scenarios of different scales and complexities and has good scalability; through polling combination, it ensures that events of different priorities can be processed alternately, improving the fairness of processing and overall efficiency.

[0137] Example 3

[0138] Reference Figure 4 In Example 3, the specific scheduling method of "calling out target events in the preset scheduling queue in batches based on the preset processing strategy and processing ratio information" includes the following:

[0139] C100, according to the processing ratio information, obtains the single call-out ratio and the single processing total amount of all events corresponding to different priorities.

[0140] For example, the single call-out ratio of all events corresponding to different priorities obtained according to the processing ratio information includes: a1:a2=2:1, and the single processing total amount E=15.

[0141] C200, obtains the call-out order of all events from high to low priority according to the preset priority information, and obtains the number of events corresponding to each priority level corresponding to the call-out order of all events.

[0142] In this embodiment, the order of calling out all events includes: events corresponding to the first priority, and events corresponding to the second priority, wherein the total number of events corresponding to the first priority N1 is 14, and the total number of events corresponding to the second priority N2 is 26.

[0143] C300 determines the target call-out volume for the event with the highest priority based on the total single processing volume and the single call-out ratio.

[0144] The target output is P1. Where E is the total single processing amount, N1 is the total number of events of the first priority, and N2 is the total number of events of the second priority.

[0145] In this embodiment,

[0146] C400, determines whether the target call-out quantity is not less than half of the number of events corresponding to the highest priority and whether the target call-out quantity is greater than the target threshold. If so, the single call-out quantity of the event corresponding to the highest priority is determined to be the target threshold. If not, the target call-out quantity is determined to be the single call-out quantity of the event corresponding to the highest priority.

[0147] The target threshold is W,

[0148] n1 is the single call-out quantity of events corresponding to the highest priority (ie, the first priority), and n2 is the single call-out quantity of events corresponding to the second priority.

[0149] In this embodiment, Because P1 does not satisfy the requirement of being not less than half of the number of events corresponding to the highest priority and being greater than the target threshold, the target call-out quantity P1 is determined to be the single call-out quantity n1 of the events corresponding to the highest priority.

[0150] Furthermore, if the target call-out amount is less than half of the number of events corresponding to the highest priority and the target call-out amount is not greater than the target threshold, determine whether the target call-out amount is an integer multiple of the target threshold. If not, the integer multiple of the target threshold with the smallest difference from the target call-out amount can be determined as the single call-out quantity of the event corresponding to the highest priority.

[0151] For example, in the case of two types of priorities, when N1 is 48, N2 is 20, E is 30, and the single call-out ratio includes: a1:a2=2:1:

[0152] Target Threshold Because P1 is less than half of the number of events corresponding to the highest priority (i.e. 24) and the target call-out amount is not greater than the target threshold, and P1 is not an integer multiple of the target threshold, it can be determined that the integer multiple of the target threshold with the smallest difference from the target call-out amount is 20, and 20 is used as the single call-out amount of the event corresponding to the highest priority.

[0153] For example, in the case of three types of priorities, when N1 is 14, N2 is 26, N3 is 20, and E is 16, and the single call-out ratio includes: a1:a2:a3=5:2:1:

[0154] Target Threshold Because P1 is less than half of the number of events corresponding to the highest priority (i.e. 7) and the target call-out amount is not greater than the target threshold, and P1 is not an integer multiple of the target threshold, it can be determined that the integer multiple of the target threshold with the smallest difference from the target call-out amount is 10, and 10 is used as the single call-out amount of the event corresponding to the highest priority.

[0155] C500, determines whether the number of events is less than the number of single call-outs. If not, calls out the target events in the preset scheduling queue in batches according to the order of all event call-outs and the number of single call-outs.

[0156] If so, the target events in the preset scheduling queue are batched out according to the order of all event calls and the number of events (ie, the actual number).

[0157] Specifically, the first round of scheduling includes: calling out 10 target events corresponding to the first priority (i.e. the number called out at a single time), and calling out 5 target events corresponding to the second priority (i.e. the number called out at a single time). After the first round of scheduling, there are 4 target events remaining corresponding to the first priority and 21 target events remaining corresponding to the second priority.

[0158] The second round of scheduling plan includes: calling out 4 target events corresponding to the first priority (i.e. the number of events), calling out 5 target events corresponding to the second priority (i.e. the number of single calls out). After the second round of scheduling, the remaining target events corresponding to the first priority are 0, and the remaining target events corresponding to the second priority are 16.

[0159] The third round of scheduling includes: calling out 0 target events corresponding to the first priority (i.e., the number of events), calling out 5 target events corresponding to the second priority (i.e., the number of events called out at a time), and after the third round of scheduling, the remaining target events corresponding to the first priority are 0, and the remaining target events corresponding to the second priority are

[0160] There are 11 corresponding target events remaining.

[0161] The fourth round of scheduling plan includes: calling out 0 target events corresponding to the first priority (i.e. the number of events), calling out 5 target events corresponding to the second priority (i.e. the number of single calls out), and after the fourth round of scheduling, the remaining target events corresponding to the first priority are 0, and the remaining target events corresponding to the second priority are 6.

[0162] The fifth round of scheduling plan includes: calling out 0 target events corresponding to the first priority (i.e. the number of events), calling out 5 target events corresponding to the second priority (i.e. the number of single calls out), and after the fifth round of scheduling, the remaining target events corresponding to the first priority are 0, and the remaining target events corresponding to the second priority are 1.

[0163] The sixth round of scheduling includes: calling out the target event corresponding to the first priority as 0 (ie, the number of events), calling out the target event corresponding to the second priority as 1 (ie, the number of events), and thus completing the scheduling of all events.

[0164] In this embodiment, the scheduling method disclosed by C100-C500 belongs to processing events according to the proportion of priority events. Through clear proportional allocation, it is ensured that events of different priorities can get reasonable processing opportunities. The total amount of single processing is set to ensure that the total amount of each call-out is fixed, which is convenient for management and control. Through a clear call-out order, it is ensured that high-priority events can be processed faster, and the actual number of events is obtained to provide data support for subsequent call-out decisions; through the calculation formula of the target call-out amount, it is ensured that the highest priority event can be processed first. At the same time, taking into account the number of events of other priorities, by setting a target threshold, the number of each call-out is controlled to avoid calling out too many events at one time, thereby balancing resource allocation. If the target call-out amount is less than the target threshold and not more than half of the number of events with the highest priority, the target call-out amount is directly used as the single call-out amount to ensure reasonable call-out; by comparing the number of events and the single call-out amount, it is avoided to call out too many or too few events at one time, thereby ensuring the efficiency and fairness of processing, and the actual number of events is called out to avoid processing interruptions caused by insufficient number of events of a certain priority.

[0165] The overall solution can dynamically adjust the call-out strategy according to the number of events of different priorities and the preset processing ratio, which not only ensures the flexibility of processing but also improves efficiency; through clear priority order and quantity allocation, it ensures that high-priority events can be processed first, while low-priority events are not ignored; through a reasonable batch call-out strategy, it avoids waste and excessive occupation of resources and achieves optimal utilization of resources; the solution can easily adapt to event processing scenarios of different scales and complexities and has good scalability; by setting the target threshold, the number of calls each time is controlled to avoid calling out too many events at one time, thereby balancing resource allocation and processing efficiency.

[0166] Example 4

[0167] Reference Figure 5 In Example 4, the specific scheduling method of "calling out target events in the preset scheduling queue in batches based on the preset processing strategy and processing ratio information" includes the following:

[0168] D100, based on the processing ratio information, obtains the single call-out ratio and the single processing total of all events corresponding to different priorities, and determines the target call-out volume of events corresponding to different priorities based on the single processing total and the single call-out ratio; among them, the target event with the highest priority has the highest proportion.

[0169] D200, obtains the call-out order of all events from high to low priority according to the preset priority information, and obtains the actual number corresponding to each priority level corresponding to the call-out order of all events.

[0170] D300, if the actual quantities corresponding to all class priorities are less than the target call-out quantity of the event corresponding to the highest priority, the actual quantities corresponding to different priorities are used as the single call-out quantity of the corresponding priority.

[0171] D400: If the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order and target call-out quantity of all events.

[0172] D500, if the actual number of events corresponding to the highest priority is less than the target call-out quantity corresponding to the highest priority, obtain all other priorities whose actual numbers of events corresponding to other priorities are not less than the target call-out quantity corresponding to the highest priority, and use the target call-out quantity corresponding to the highest priority as the single call-out quantity of the event with the highest priority among all other priorities, and use the actual number of events corresponding to the highest priority as the single call-out quantity of the event corresponding to the highest priority.

[0173] D600, if the actual quantity of the event corresponding to the highest priority is not less than the corresponding target call-out quantity, the target call-out quantity of the event corresponding to the highest priority is used as the single call-out quantity of the event corresponding to the highest priority; determine whether the actual quantity of events corresponding to other priorities is less than the target call-out quantity of the corresponding priorities. If so, the actual quantity of events corresponding to other priorities is used as the single call-out quantity of the corresponding priority. If not, the target call-out quantity of events corresponding to other priorities is used as the single call-out quantity of the corresponding priority.

[0174] For example, when the preset scheduling queue contains two types of priorities, the first priority corresponds to 14 events (i.e. the actual number), and the second priority corresponds to 26 events (i.e. the actual number). The single call-out ratio corresponding to the two types of priorities is 2:1, and the total single processing volume is 15, that is, the target call-out volumes corresponding to the two types of priorities are 10 and 5 respectively.

[0175] The first round of scheduling plans includes: because the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order and target call-out quantity of all events, that is, 10 target events corresponding to the first priority are called out (that is, the target call-out quantity corresponding to the first priority), and 5 target events corresponding to the second priority are called out (that is, the target call-out quantity corresponding to the second priority); after the first round of call-out, there are 4 events remaining in the first priority and 21 events remaining in the second priority.

[0176] The second round of scheduling plan includes: because the actual number of remaining events in the first priority level is less than the target call-out quantity corresponding to the highest priority level, obtain all other priorities whose actual numbers of events corresponding to other priorities are not less than the target call-out quantity corresponding to the highest priority level, use the target call-out quantity corresponding to the highest priority level as the single call-out quantity of the event corresponding to the highest priority level among all other priorities, and use the actual number of events corresponding to the highest priority level as the single call-out quantity of the event corresponding to the highest priority level, that is, call out 4 target events corresponding to the first priority level (that is, the actual number corresponding to the first priority level), and call out 10 target events corresponding to the second priority level (that is, the target call-out quantity corresponding to the first priority level); after the second round of call-out, the remaining events in the first priority level are 0, and the remaining events in the second priority level are 11.

[0177] The third round of scheduling plan includes: calling out 0 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), and calling out 10 target events corresponding to the second priority (i.e. the target call-out quantity corresponding to the first priority); after the third round of call-out, the remaining events in the first priority are 0, and the remaining event in the second priority is 1.

[0178] The fourth round of scheduling includes: calling out 0 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), calling out 1 target event corresponding to the second priority (i.e. the actual number corresponding to the second priority), and thus completing the scheduling of all events.

[0179] For example, when the preset scheduling queue contains three priority levels, the first priority level corresponds to 14 events (i.e. the actual number), the second priority level corresponds to 26 events (i.e. the actual number), and the third priority level corresponds to 20 events (i.e. the actual number). The single call-out ratio corresponding to the three priority levels is 5:2:1, and the total single processing volume is 16, that is, the target call-out volumes corresponding to the two priority levels are 10, 4, and 2, respectively.

[0180] The first round of scheduling plans include: because the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order and target call-out quantity of all events, that is, 10 target events corresponding to the first priority are called out (that is, the target call-out quantity corresponding to the first priority), 4 target events corresponding to the second priority are called out (that is, the target call-out quantity corresponding to the second priority), and 2 target events corresponding to the third priority are called out (that is, the target call-out quantity corresponding to the third priority); after the first round of call-out, there are 4 events remaining in the first priority, 22 events remaining in the second priority, and 18 events remaining in the third priority.

[0181] The second round of scheduling plan includes: because the actual number of remaining events in the first priority level is less than the target call-out amount corresponding to the highest priority level, all other priorities whose actual numbers of events corresponding to other priorities are not less than the target call-out amount corresponding to the highest priority level are obtained, and the target call-out amount corresponding to the highest priority level is used as the single call-out amount of the event corresponding to the highest priority level among all other priorities, and the actual number of events corresponding to the highest priority level is used as the single call-out amount of the event corresponding to the highest priority level, that is, 4 target events corresponding to the first priority level are called out (that is, the actual number corresponding to the first priority level), 10 target events corresponding to the second priority level are called out (that is, the target call-out amount corresponding to the first priority level), and 2 target events corresponding to the third priority level are called out (that is, the target call-out amount corresponding to the third priority level); after the second round of call-out, there are 0 remaining events in the first priority level, 12 remaining events in the second priority level, and 16 remaining events in the third priority level.

[0182] The third round of scheduling plan includes: calling out 0 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), calling out 10 target events corresponding to the second priority (i.e. the target call-out quantity corresponding to the first priority), calling out 2 target events corresponding to the third priority (i.e. the target call-out quantity corresponding to the third priority); after the third round of call-out, the remaining events in the first priority are 0, the remaining events in the second priority are 2, and the remaining events in the third priority are 14.

[0183] The fourth round of scheduling includes: calling out 0 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), calling out 2 target events corresponding to the second priority (i.e. the actual number corresponding to the second priority), calling out 2 target events corresponding to the third priority (i.e. the actual number corresponding to the second priority), and it cannot be cycled until the scheduling of all events is completed.

[0184] Alternatively, when only the lowest priority events are left in the preset scheduling queue, determine whether the actual number of the lowest priority events is not less than the target call-out quantity corresponding to the first priority. If so, call out the event according to the target call-out quantity corresponding to the first priority (i.e., the highest priority). That is, starting from the fifth round, 10 target events corresponding to the third priority are called out (i.e., the target call-out quantity corresponding to the first priority); if not, schedule according to the actual number of the lowest priority events.

[0185] In this embodiment, the scheduling method disclosed by D100-D600 ensures that events of different priorities can get reasonable processing opportunities through clear proportional allocation; sets the total amount of single processing to ensure that the total amount of each call-out is fixed, which is convenient for management and control, and the highest priority target event accounts for the highest proportion, ensuring that high-priority events can be processed first; through a clear call-out order, it ensures that high-priority events can be processed faster; obtains the actual number of events to provide data support for subsequent call-out decisions, and flexibly handles the situation where the actual number is less than the target call-out amount, ensuring that the overall processing flow will not be affected by the shortage of the number of events of a certain priority, and avoiding the problem of excessive target call-out amount. The problem of insufficient events caused by this can be solved by clearly defining the target call-out volume to ensure that events of different priorities can get reasonable processing opportunities. By calling out events in batches, we can avoid waste and excessive occupation of resources, optimize resource utilization, and flexibly handle the situation where the number of events with the highest priority is insufficient to ensure that the overall processing flow is not affected by the shortage of events of a certain priority level. By adjusting the single call-out volume of events with other priorities, we can ensure the rationality of the overall call-out ratio. By defining the target call-out volume, we can ensure that events of different priorities can get reasonable processing opportunities. By judging the relationship between the actual number and the target call-out volume, we can flexibly adjust the single call-out volume to ensure the rationality of the overall call-out ratio.

[0186] The overall solution can dynamically adjust the call-out strategy according to the number of events of different priorities and the preset processing ratio, which not only ensures the flexibility of processing but also improves efficiency. Through clear priority order and quantity allocation, it ensures that high-priority events can be processed first, while low-priority events are not neglected. Through reasonable batch call-out strategies, it avoids waste and excessive occupation of resources and achieves optimal utilization of resources. The solution can easily adapt to event processing scenarios of different scales and complexities and has good scalability. By dynamically adjusting the single call-out volume of different priorities, it ensures the rationality of the overall call-out ratio and avoids the overall processing flow being affected by the shortage of events of a certain priority.

[0187] Example 5

[0188] Reference Figure 6 In Example 5, the specific scheduling method of "calling out target events in the preset scheduling queue in batches based on the preset processing strategy and processing ratio information" includes the following:

[0189] E100, based on the processing ratio information, obtains the single call-out ratio and the single processing total of all events corresponding to different priorities, and determines the target call-out volume of events corresponding to different priority levels based on the single processing total and the single call-out ratio; among them, the target event with the highest priority has the highest proportion.

[0190] E200, obtains the call-out order of all events from high to low priority according to the preset priority information, and obtains the actual number corresponding to each priority level corresponding to the call-out order of all events.

[0191] E300, if the actual quantities corresponding to all class priorities are less than the target call-out quantity of the event corresponding to the highest priority, the actual quantities corresponding to different priorities are used as the single call-out quantity of the corresponding priority.

[0192] E400, if the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order and target call-out quantity of all events;

[0193] E500: If the actual number of events corresponding to the highest priority is less than the target call-out quantity corresponding to the highest priority, the actual number of events corresponding to the highest priority is used as the single call-out quantity of the events corresponding to the highest priority;

[0194] E600, obtain all other priorities whose actual number of events corresponding to other priorities is not less than the target call-out amount corresponding to the highest priority, and use the target call-out amount corresponding to the highest priority as the single call-out amount of the event corresponding to the highest priority among all other priorities;

[0195] E700, based on the single call-out ratio of events corresponding to other priorities and the single call-out amount of the event corresponding to the highest priority among other priorities, dynamically obtain the single call-out amount of events corresponding to other priorities;

[0196] If the single call-out amount is not less than the actual quantity of the corresponding priority, the dynamically obtained single call-out amount shall be used as the final call-out amount of the corresponding priority; if the single call-out amount is less than the actual quantity of the corresponding priority, the actual quantity shall be used as the final call-out amount of the corresponding priority.

[0197] For example, when the preset scheduling queue contains three priority levels, the first priority level corresponds to 14 events (i.e. the actual number), the second priority level corresponds to 26 events (i.e. the actual number), and the third priority level corresponds to 20 events (i.e. the actual number). The single call-out ratio corresponding to the three priority levels is 5:2:1, and the total single processing volume is 16, that is, the target call-out volumes corresponding to the two priority levels are 10, 4, and 2, respectively.

[0198] The first round of scheduling plans includes: calling out 10 target events corresponding to the first priority (i.e. the target call-out quantity corresponding to the first priority), calling out 4 target events corresponding to the second priority (i.e. the target call-out quantity corresponding to the second priority), calling out 2 target events corresponding to the third priority (i.e. the target call-out quantity corresponding to the third priority); after the first round of call-out, there are 4 events remaining in the first priority, 22 events remaining in the second priority, and 18 events remaining in the third priority.

[0199] The second round of scheduling plans includes: calling out 4 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), calling out 10 target events corresponding to the second priority (i.e. the target call-out quantity corresponding to the first priority), and calling out 5 target events corresponding to the third priority.

[0200] Among them, the method for obtaining the number of target events corresponding to the third priority includes: (that is, based on the single call-out ratio of events corresponding to other priorities (the ratio of the second priority to the third priority is 2:1), the single call-out quantity of the highest priority corresponding event among other priorities (that is, the scheduling quantity of the target event corresponding to the second priority is 10), dynamically obtaining the single call-out quantity of events corresponding to other priorities and the target call-out quantity corresponding to the third priority, that is, 5.

[0201] The third round of scheduling plan includes: calling out 0 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), calling out 10 target events corresponding to the second priority (i.e. the target call-out quantity corresponding to the first priority), and calling out 5 target events corresponding to the third priority.

[0202] The fourth round of scheduling includes: calling out 0 target events corresponding to the first priority (i.e. the actual number corresponding to the first priority), calling out 2 target events corresponding to the second priority (i.e. the actual number corresponding to the second priority), calling out 5 target events corresponding to the third priority, and then completing the scheduling of all events in a loop, or directly calling out 9 target events corresponding to the third priority (i.e. the actual number corresponding to the third priority).

[0203] In this embodiment, the scheduling method disclosed by E100-E700 can significantly improve the efficiency of event processing and resource utilization through priority management and dynamic adjustment mechanism, ensure that high-priority events are handled first, and promote the improvement of the overall response speed of the system. The scheduling scheme with dynamic adjustment capability can adapt to different event processing needs and respond to emergencies reasonably. Through scientific scheduling strategies, it can reduce resource waste and achieve effective allocation and utilization of resources. It abstracts the complexity of the scheduling process into management of different priorities, simplifies the operation process, and facilitates maintenance and optimization. The systematicity, flexibility and efficiency of this scheduling scheme in processing events can effectively cope with complex event processing scenarios.

[0204] Furthermore, the present application also includes: when the type is large block data transmission, determining whether writing data to the upstream connection is blocked (i.e. determining whether the client's buffer is full); if so, adding the write event of the upstream connection to the Epoll model (i.e., event-driven model); in response to the triggering of a writable event, adding the write event in the Epoll model to the preset scheduling queue.

[0205] Specifically, 1) Read and write event processing during data forwarding: 2) Read event triggering: When data arrives at the downstream connection, the read event is triggered and the callback function is executed. After reading the data in the function, you can choose to write the data to the upstream connection immediately, or wait for the write event of the upstream connection to be triggered before writing the data. By adding the read and write events directly to the scheduling queue and calling the callback function of the event through the scheduling queue, the number of IO events can be reduced and CPU resources can be saved.

[0206] When writing data to the upstream connection is blocked, the write event of the upstream connection can be added to the Epoll model, and after the writable event is triggered, it can be added to the scheduling queue to optimize the transmission of large blocks of data on long connections and effectively reduce the occurrence of blocking of write events.

[0207] In this application, the data transmission process is optimized in detail, especially when large-block data is transmitted, and the read and write events are managed by using the Epoll model and the scheduling queue, which can effectively improve the efficiency of data transmission and the utilization of system resources. Specifically, by adding the read and write events directly to the scheduling queue and calling the callback function of the event through the scheduling queue, frequent IO operations are reduced, which can greatly reduce the burden of the CPU in processing these frequent IO operations; by reducing unnecessary IO operations, CPU resources can be saved, so that the CPU can process other tasks more efficiently, thereby improving the overall performance of the system; when writing data to the upstream connection is blocked, the write event is added to the Epoll model to wait for the event to complete. Writable events are processed after they are triggered. This mechanism can effectively avoid blocking of write events due to full buffers, ensuring smooth data transmission. In a long connection environment, the transmission of large blocks of data often takes up more resources. Through this optimization method, it can better adapt to the needs of long connections and improve the data transmission efficiency in long connection environments. Through the combination of event-driven models (Epoll) and scheduling queues, the system can respond to read and write events more quickly, reducing waiting time, thereby improving the overall response speed of the system. This design pattern based on event-driven and scheduling queues enables the system to have better scalability and flexibility when facing different data transmission needs, and can more efficiently cope with data transmission challenges in different scenarios.

[0208] In summary, this optimized data transmission method can not only significantly improve the efficiency of data transmission, but also effectively save system resources, enhance system stability and response speed, and is particularly suitable for scenarios that require efficient processing of large-scale data transmission.

[0209] In the prior art, Nginx's working process usually uses an event loop to handle various events. This method performs well when processing simple requests. However, when processing complex or a large number of concurrent requests, the mechanism of serial event processing may lead to uneven resource allocation. Specifically, the processing of a certain event will occupy a large amount of resources, resulting in the delay of the processing of other events. In this case, the overall performance of the system will be affected; although the edge trigger mode of Epoll performs well when processing a large number of connections, the event processing mechanism may not be able to efficiently manage this data when processing large blocks of data. This is mainly because large-block data transmission involves more time and resource consumption, and the existing event processing mechanism may not be able to effectively cope with such high-load situations; in a multi-process or multi-threaded environment, the problem of uneven resource allocation may stem from the system's scheduling strategy. For example, some high-priority requests may not be processed in time due to insufficient resource allocation, resulting in a decrease in the system's response speed. In addition, when processing a large number of concurrent requests, the system's resource management may not be able to respond to the dynamic changes in resource requirements in a timely manner, resulting in uneven resource allocation.

[0210] The method for event scheduling of the reverse proxy system disclosed in the present application can respond to user requests in real time by effectively scheduling and processing events, improve the service quality and user experience of the overall system, and use priority queues and batch processing to effectively reduce the waste of resources, so that resources such as CPU and memory can be used more reasonably; through appropriate scheduling strategies and processing ratios, it can ensure that the system still maintains good performance under high concurrency and high load conditions, reducing the risk of system crashes or failures; the scheduling mechanism is easy to expand, and the preset cycle, priority setting and processing strategy can be adjusted at any time as needed to adapt to different scenarios and demand changes. Detailed monitoring and logging can be performed for the processing and scheduling of each event, which is helpful for subsequent system tuning and problem diagnosis, and improves the maintainability of the system. In short, the method for event scheduling of the reverse proxy system has a significant effect on improving system processing efficiency, resource utilization and overall system stability through reasonable event management and scheduling strategies.

[0211] In a second aspect, the present application discloses a system for scheduling events in a reverse proxy system, including:

[0212] A target event acquisition module is used to acquire the type of target event triggered within a preset period, and call a target database and a target function based on the type, wherein the target database includes preset priority information and processing ratio information;

[0213] A joining module is used to add the target event to the preset scheduling queue according to the target function and preset priority information;

[0214] The scheduling module is used to call out target events in the preset scheduling queue in batches based on preset processing strategies and processing ratio information.

[0215] It should be noted that all the schemes in the method for event scheduling of the reverse proxy system disclosed in the first aspect of the present application are applicable to the system for event scheduling of the reverse proxy system disclosed in the second aspect of the present application, so they will not be repeated here.

[0216] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.

[0217] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device performs all or part of the steps of the method for reverse proxy system event scheduling of each embodiment of the present disclosure.

[0218] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.

[0219] like Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 7 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0220] like Figure 7 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0221] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 7 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0222] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the method for event scheduling of a reverse proxy system of an embodiment of the present disclosure are executed.

[0223] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0224] The computer-readable storage medium according to the embodiment of the present disclosure stores non-transitory computer-readable instructions, which, when executed by a processor, execute all or part of the steps of the method for event scheduling of a reverse proxy system in the above-mentioned embodiments of the present disclosure.

[0225] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).

[0226] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0227] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0228] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0229] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0230] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0231] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0232] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0233] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A method for scheduling events in a reverse proxy system, characterized in that: include: Acquire the type of the target event triggered within a preset period, and call the target database and the target function based on the type, wherein the target database includes preset priority information and processing ratio information; Adding the target event to a preset scheduling queue according to the target function and the preset priority information; Based on the preset processing strategy and the processing ratio information, the target events in the preset scheduling queue are called out in batches.

2. The method for reverse proxy system event scheduling according to claim 1, characterized in that: When the type is a new connection, the target database includes a priority for accepting a connection that is greater than a priority for reading and writing data; When the type is bulk data transmission, the preset priority information includes that the priority of reading and writing data is greater than the priority of accepting connection.

3. The method for reverse proxy system event scheduling according to claim 1, characterized in that: When the target event belongs to an Epoll event, the target function is the ngx_epoll_process_events function; When the target event belongs to an accept connection event or an event queue, the target function is the ngx_event_process_posted function; When the target event is a time event, the target function is the ngx_event_expire_timers function.

4. The method for reverse proxy system event scheduling according to claim 1, characterized in that: The calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes: Acquire the single call-out quantity of the target event of the corresponding priority according to the processing ratio information, and acquire the call-out order of all events from high to low priority according to the preset priority information; Determine whether the number of target events corresponding to each priority level is less than the single call-out number, and if not, call out the target events in the preset scheduling queue in batches according to the single call-out number and the call-out order of all events; If the number of target events corresponding to each priority level is less than the single call-out number, obtain the actual number of target events corresponding to each priority level, and call out the target events in the preset scheduling queue in batches based on the actual number and the call-out order of all events.

5. The method for reverse proxy system event scheduling according to claim 1, characterized in that: The calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes: Acquire the single call-out quantity of target events of corresponding priority according to the processing ratio information, and acquire the call-out order of all events from high to low priority according to the preset priority information; Determine whether the number of target events corresponding to each priority class is less than the single call-out number; if not, obtain the number of priority types of all different priorities in the preset scheduling queue, and determine whether the number of priority types is greater than 2; if not, call out the target events in the preset scheduling queue in batches according to the single call-out number and the call-out order of all events; If the number of priority types is greater than 2, the events to be called out corresponding to the first two priority types with the highest priority are obtained according to the order of calling out all events and the number of single calls out, the two priority types are recorded as a polling combination, and the target events in the preset scheduling queue are batch-called based on the polling combination; When all events corresponding to higher priorities in the polling combination are called out, the events to be called out corresponding to the next priority are obtained according to the order in which all events are called out, and the next priority and the lower priority in the polling combination are recorded as the updated polling combination, and the target events in the preset scheduling queue are batch-called based on the updated polling combination; If the number of target events corresponding to each priority level is less than the single call-out number, obtaining the actual number of target events corresponding to each priority level; Obtain the number of priority types of all different priorities in the preset scheduling queue, and determine whether the number of priority types is greater than 2. If not, call out the target events in the preset scheduling queue in batches based on the actual number and the order in which all events are called out; If the number of priority types is greater than 2, the events to be called out corresponding to the first two priority types with the highest priority are obtained according to the order of calling out all events and the number of single calls out, the two priority types are recorded as a polling combination, and based on the polling combination and the corresponding actual quantity, the target events in the preset scheduling queue are called out in batches; When all events corresponding to higher priorities in the polling combination are called out, the events to be called out corresponding to the next priority are obtained according to the order in which all events are called out, and the next priority and the lower priority in the polling combination are recorded as the updated polling combination, and the target events in the preset scheduling queue are called out in batches based on the updated polling combination and the corresponding actual quantity.

6. The method for reverse proxy system event scheduling according to claim 1, characterized in that: The calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes: According to the processing ratio information, the single call-out ratio and the single processing total amount of all events corresponding to different priorities are obtained; Acquire the calling order of all events with the highest priority from the lowest priority according to the preset priority information, and acquire the number of events corresponding to each priority level corresponding to the calling order of all events; Determine the target outbound volume for the highest priority event based on the total single processing volume and single outbound ratio; The target output is P1. Among them, E is the total amount of single processing, N1 is the total amount of events of the first priority, and N2 is the total amount of events of the second priority. The first priority is higher than the second priority. Determine whether the target call-out amount is not less than half of the number of events corresponding to the highest priority and is greater than the target threshold. If so, determine the single call-out amount of the event corresponding to the highest priority as the target threshold; the target threshold is W, If not, the target call-out amount is determined to be the single call-out amount of the event corresponding to the highest priority; Determine whether the event quantity is less than the single call-out quantity, and if not, call out the target events in the preset scheduling queue in batches according to the call-out order of all events and the single call-out quantity; If so, the target events in the preset scheduling queue are batch-called according to the calling order of all events and the event quantity.

7. The method for event scheduling of a reverse proxy system according to claim 1, characterized in that: The calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes: According to the processing ratio information, the single call-out ratio and the single processing total amount of all events corresponding to different priorities are obtained, and according to the single processing total amount and the single call-out ratio, the target call-out amount of events corresponding to different priorities is determined; wherein, the target event with the highest priority has the highest proportion; Acquire the order of all events with the highest priority from the lowest priority according to the preset priority information, and acquire the actual number corresponding to each priority level corresponding to the order of all events; If the actual quantities corresponding to all class priorities are less than the target call-out quantity of the event corresponding to the highest priority, the actual quantities corresponding to different priorities shall be used as the single call-out quantity of the corresponding priority; If the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order of all events and the target call-out quantity; If the actual number of events corresponding to the highest priority is less than the target call-out quantity corresponding to the highest priority, obtain all other priorities whose actual numbers of events corresponding to other priorities are not less than the target call-out quantity corresponding to the highest priority, and use the target call-out quantity corresponding to the highest priority as the single call-out quantity of the event corresponding to the highest priority among all other priorities, and use the actual number of events corresponding to the highest priority as the single call-out quantity of the event corresponding to the highest priority.

8. The method for event scheduling of a reverse proxy system according to claim 1, characterized in that: The calling out the target events in the preset scheduling queue in batches based on the preset processing strategy and the processing ratio information includes: According to the processing ratio information, the single call-out ratio and the single processing total amount of all events corresponding to different priorities are obtained, and according to the single processing total amount and the single call-out ratio, the target call-out amount of events corresponding to different priorities is determined; wherein, the target event of the highest priority has the highest proportion; Acquire the order of all events with the highest priority from the lowest priority according to the preset priority information, and acquire the actual number corresponding to each priority level corresponding to the order of all events; If the actual quantities corresponding to all class priorities are less than the target call-out quantity of the event corresponding to the highest priority, the actual quantities corresponding to different priorities shall be used as the single call-out quantity of the corresponding priority; If the actual quantity corresponding to all class priorities is not less than the target call-out quantity of the corresponding priority, the target events in the preset scheduling queue are called out in batches according to the call-out order of all events and the target call-out quantity; If the actual number of events corresponding to the highest priority is less than the target call-out quantity corresponding to the highest priority, the actual number of events corresponding to the highest priority will be used as the single call-out quantity of the events corresponding to the highest priority; Obtain all other priorities whose actual number of events corresponding to other priorities is not less than the target call-out amount corresponding to the highest priority, and use the target call-out amount corresponding to the highest priority as the single call-out amount of the event corresponding to the highest priority among all other priorities; Based on the single call-out ratio of events corresponding to other priorities and the single call-out amount of the event corresponding to the highest priority among other priorities, the single call-out amount of events corresponding to other priorities is dynamically obtained.

9. The method for reverse proxy system event scheduling according to claim 2, characterized in that: When the type is large block data transmission, determine whether writing data to the upstream connection is blocked. If so, add the write event of the upstream connection to the Epoll model. In response to the triggering of a writable event, add the write event in the Epoll model to the preset scheduling queue.

10. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for reverse proxy system event scheduling described in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for reverse proxy system event scheduling described in any one of claims 1-9.

12. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Packet dispatching method and forward service dispatcher

    CN101790239A

  • Task processing method and device and computer system

    CN111104210A

  • Queue scheduling method and system, equipment and medium

    CN113590030A

  • Data processing method and device

    CN117492943A

  • Device for managing event and computer readable recording medium recording program

    JP2000137621A