Task processing method and device based on load information, equipment and storage medium

By obtaining the load information of computer equipment, dynamically adjusting the upper limit of tasks supported by the work pool, the resource waste and tension caused by system load fluctuations is solved, and efficient resource utilization and stability of task processing is achieved.

CN120371473APending Publication Date: 2025-07-25GUANGZHOU KUGOU COMP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510459799.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When the system load is too high, resources are tight, resulting in transition consumption; when the system load is low, resources are wasted, affecting task processing efficiency.

Method used

By obtaining the load information of computer equipment, dynamically adjusting the upper limit of the number of tasks supported by the work pool, combining multiple load information to determine the number of adjustments, and optimizing task scheduling.

Benefits of technology

Effectively utilize resources, avoid excessive resource consumption, ensure task processing efficiency, avoid task backlog or idle processing capabilities, and the system always maintains a good state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371473A_ABST
    Figure CN120371473A_ABST
Patent Text Reader

Abstract

The invention discloses a task processing method and device based on load information, equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: acquiring current load information of computer equipment; based on the current load information, determining an adjustment quantity of a first quantity upper limit, the first quantity upper limit being a quantity upper limit of tasks supported and processed by the current work pool; according to the adjustment number, a second number upper limit is determined, and the second number upper limit is an upper limit of the number of tasks supported and processed by the adjusted work pool; and processing the to-be-processed tasks scheduled to the work pool based on the second number upper limit. Therefore, the task processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and particularly relates to a task processing method, device, equipment and storage medium based on load information. Background Art

[0002] With the development of Internet technology, the data brought by the Internet has exploded, and a large amount of data needs to be processed efficiently.

[0003] A work pool for managing task processing can effectively manage and allocate tasks, and schedule and process numerous tasks.

[0004] When the system load is too high, resources are tense and there will be excessive consumption; when the system load is low, resources will be wasted. Therefore, load fluctuations have a negative impact on task processing efficiency. Summary of the Invention

[0005] Embodiments of this application provide a task processing method, device, equipment and storage medium based on load information. The technical solutions provided by this application include the following aspects.

[0006] According to one aspect of the embodiments of this application, a task processing method based on load information is provided. The method includes:

[0007] Obtain the current load information of the computer device;

[0008] Based on the current load information, determine an adjustment quantity for a first quantity limit, where the first quantity limit is the upper limit of the number of tasks that the current work pool supports for processing;

[0009] According to the adjustment quantity, determine a second quantity limit, where the second quantity limit is the upper limit of the number of tasks that the adjusted work pool supports for processing;

[0010] Based on the second quantity limit, process the to-be-processed tasks scheduled to the work pool.

[0011] According to one aspect of the embodiments of this application, a task processing device based on load information is provided. The device includes:

[0012] An obtaining module, configured to obtain the current load information of the computer device;

[0013] A determining module, configured to determine an adjustment quantity for a first quantity limit based on the current load information, where the first quantity limit is the upper limit of the number of tasks that the current work pool supports for processing;

[0014] The determining module is further configured to determine a second quantity limit according to the adjustment quantity, where the second quantity limit is the upper limit of the number of tasks that the adjusted work pool supports for processing;

[0015] A processing module, configured to process the to-be-processed tasks scheduled to the work pool based on the second upper limit quantity.

[0016] In a possible implementation manner, the information type of the current load information is at least two types. The determining module is configured to determine at least two sub-adjustment quantities, where the at least two sub-adjustment quantities correspond one-to-one to the current at least two types of load information; and determine an adjustment quantity of the first upper limit quantity based on the at least two sub-adjustment quantities.

[0017] In a possible implementation manner, the determining module is configured to, for any one of the current at least two types of load information, determine a sub-adjustment quantity corresponding to the any one of the load information based on the any one of the load information, a threshold corresponding to the any one of the load information, and a threshold adjustment quantity corresponding to the threshold; and repeatedly execute the above steps until the at least two sub-adjustment quantities are obtained.

[0018] In a possible implementation manner, the threshold includes a first threshold, where the first threshold is used to determine that an adjustment manner corresponding to any one of the load information is to increase the first upper limit quantity, and the threshold adjustment quantity includes a first quantity. The determining module is configured to, for any one of the current at least two types of load information, determine that an adjustment manner corresponding to the any one of the load information is to increase the first upper limit quantity based on the any one of the load information and the first threshold; and determine that the sub-adjustment quantity corresponding to the any one of the load information is to increase the first upper limit quantity by the first quantity, where the first quantity corresponds to the first threshold.

[0019] In a possible implementation manner, the threshold includes a second threshold, where the second threshold is used to determine that an adjustment manner corresponding to any one of the load information is to decrease the first upper limit quantity, and the threshold adjustment quantity includes a second quantity. The determining module is configured to, for any one of the current at least two types of load information, determine that an adjustment manner corresponding to the any one of the load information is to decrease the first upper limit quantity based on the any one of the load information and the second threshold; and determine that the sub-adjustment quantity corresponding to the any one of the load information is to decrease the first upper limit quantity by the second quantity, where the second quantity corresponds to the second threshold.

[0020] In a possible implementation, the threshold includes a third threshold, and the at least two pieces of load information include first load information; the determining module is configured to, when the first load information is greater than the third threshold, determine target load information from the at least two pieces of load information, where the adjustment method corresponding to the target load information is to increase the load information with the first upper limit; and determine the adjustment quantity of the first upper limit based on the sub-adjustment quantities corresponding to the other load information except the target load information in the at least two pieces of load information.

[0021] In a possible implementation, the determining module is configured to determine an expected upper limit according to the adjustment quantity and the first upper limit, where the expected upper limit is the quantity to which the first upper limit is expected to be adjusted; and perform smoothing processing on the expected upper limit to determine the second upper limit, where the smoothing processing is used to smooth the adjustment operation for the first upper limit.

[0022] In a possible implementation, the determining module is configured to determine a third quantity based on a smoothing coefficient and the first upper limit, where the third quantity is used to represent the proportion of the first upper limit in the second upper limit; determine a fourth quantity according to the expected upper limit and the smoothing coefficient, where the fourth quantity is used to represent the proportion of the expected upper limit in the second upper limit; and determine the second upper limit based on the sum of the third quantity and the fourth quantity.

[0023] In a possible implementation, there are at least two tasks to be processed, and the processing module is configured to schedule the at least two tasks to be processed in a priority order based on the second upper limit; and process the at least two tasks to be processed scheduled to the work pool.

[0024] In a possible implementation, the processing module is configured to process the at least two tasks to be processed scheduled to the work pool in the priority order.

[0025] In a possible implementation, the processing module is configured to determine the priority order in the following manner: determine the priority order of the at least two tasks to be processed based on the processing times respectively corresponding to the at least two tasks to be processed.

[0026] According to one aspect of the embodiments of the present application, a computer device is provided, where the computer device includes a processor and a memory, and a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned task processing method based on load information.

[0027] According to one aspect of the embodiments of the present application, there is provided a computer-readable storage medium or a computer program product. The computer program product is stored in the computer-readable storage medium. The computer program product includes at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the above-mentioned task processing method based on load information.

[0028] The technical solution provided by the embodiments of the present application can bring the following beneficial effects:

[0029] By obtaining the current load information to adjust the upper limit of the number of tasks supported for processing in the work pool (i.e., the first upper limit), the first upper limit is reasonably adjusted along with the system load fluctuation, making full use of resources, avoiding excessive resource consumption, improving resource utilization rate, ensuring that the upper limit of the number of tasks supported for processing in the work pool is at a relatively appropriate level, enabling the tasks to be processed orderly and efficiently, avoiding the backlog of tasks to be processed or the idleness of processing capabilities, and keeping the system in a better task processing state all the time, thereby improving the task processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a schematic diagram of a computer system provided by an embodiment of the present application;

[0031] Figure 2 is a flowchart of a task processing method based on load information provided by an embodiment of the present application;

[0032] Figure 3 is an overall flowchart of a task processing method based on load information provided by an embodiment of the present application;

[0033] Figure 4 is a block diagram of a task processing device based on load information provided by an embodiment of the present application;

[0034] Figure 5 is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] To make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0036] It should be noted that the terms "first", "second", etc. in this application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0037] First, the nouns involved in this application are explained.

[0038] Work pool: It is a resource pool for parallel processing of tasks, and manages multiple worker threads through scheduling to process tasks.

[0039] Load: The amount of tasks currently being processed by the system, which is used to describe the usage of system resources. When the number of tasks in the work pool increases, the load of the system will also increase accordingly.

[0040] Central Processing Unit (CPU) utilization rate: The proportion of time that the CPU executes tasks within a unit of time. When the number of tasks in the work pool increases, the CPU needs more time to process these tasks, so the CPU utilization rate will increase.

[0041] Memory utilization rate: The proportion of the occupied space in the memory. When the number of tasks in the work pool increases, more data and program codes need to be stored in the memory, so the memory utilization rate will increase.

[0042] Disk Input / Output (I / O): Disk input and output operations. When the tasks in the work pool require a large number of disk I / O operations, the utilization rate of the disk will increase, which may lead to a decline in disk performance.

[0043] Network bandwidth: The transmission capacity of the network. When the tasks in the work pool require a large amount of network communication, the utilization rate of the network bandwidth will increase, which may lead to network congestion.

[0044] To further illustrate the technical solutions provided in the embodiments of the present application, the following will provide a detailed description in conjunction with the accompanying drawings and specific implementation manners. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present application. When the method is actually processed or executed by the control device, it may be executed in the order shown in the embodiments or drawings or executed in parallel.

[0045] Other features and advantages of the present application will be described in the following specification, and, in part, will become apparent from the specification or will be understood by implementing the present application. The objectives and other advantages of the present application can be achieved and obtained through the structures specifically pointed out in the written specification, claims, and drawings.

[0046] Figure 1 The structural schematic diagram of a computer system provided by an embodiment of the present application is shown. The computer system includes: a computer device 101 and a server 102.

[0047] In a possible implementation manner, the computer device 101 is any electronic product that can perform human-computer interaction with an interaction object through one or more methods such as a keyboard, a touchpad, a touch screen, a remote control, voice interaction, or a handwriting device. For example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a handheld portable game device, a PPC (Pocket PC), a tablet computer, a notebook computer, a desktop computer, a smart car machine, a smart TV, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto.

[0048] The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The embodiments of the present application do not limit this. The server 102 is directly or indirectly communicatively connected to the computer device 101 through a wired communication method or a wireless communication method, and the present application does not limit this here. The server 102 has a data receiving function, a data processing function, and a data sending function. Of course, the server 102 may also have other functions, and the embodiments of the present application do not limit this.

[0049] Server 102 is used to provide background services for the client installed on computer device 101. In a possible implementation, server 102 undertakes the main computing work, and computer device 101 undertakes the secondary computing work. Or, server 102 undertakes the secondary computing work, and computer device 101 undertakes the main computing work. Or, a distributed computing architecture is adopted between computer device 101 and server 102 for collaborative computing.

[0050] Computer device 101 can generally refer to one of multiple computer devices. In this embodiment, only computer device 101 is used as an example for illustration. Those skilled in the art can know that the number of the above computer devices 101 can be more or less. For example, the above computer device 101 can be only one, or the above computer device 101 can be dozens or hundreds, or more in number. The embodiments of the present application do not limit the number and device type of computer device 101.

[0051] The task processing method based on load information provided by the embodiments of the present application can be executed by computer device 101, or can be executed by server 102, or can also be executed by the interaction between computer device 101 and server 102. The embodiments of the present application do not limit this. In some embodiments, computer device 101 can send uplink synchronization data to server 102. The uplink synchronization data includes the current load information of computer device 101. Server 102 processes the current load information sent by computer device 101 by using the task processing method based on load information provided by the embodiments of the present application to obtain the finally processed completed task, and sends downlink synchronization data to computer device 101. The downlink synchronization data includes the processed completed task.

[0052] Exemplarily, such as Figure 1As shown, the server 102 calls the system monitoring library 103 to obtain the current load information of the computer device 101. The load information includes the CPU usage rate 104, the memory occupancy rate 105, the input / output of the disk 106, and the network bandwidth usage rate 107. Based on the current load information, the server 102 determines the adjustment quantity 110 of the upper limit of the number of tasks that the current work pool 108 can support for processing (the first upper limit 109); according to the adjustment quantity 110 and the first upper limit 109, it determines the expected upper limit 111, where the expected upper limit 111 is the quantity to which the first upper limit 109 is expected to be adjusted; it performs a smoothing process on the expected upper limit 111 to determine the second upper limit 112; based on the second upper limit 112, it schedules at least two pending tasks (including pending task 1 and pending task 2) from the task scheduling queue 113 in the order of priority. Each time a pending task (such as pending task 2) is scheduled, it occupies one task quantity that the work pool 108 can support for processing, that is, when a pending task is scheduled, the remaining quantity of tasks that the work pool 108 can support for processing is the current quantity of tasks that can be supported minus 1. After the scheduled pending task is processed, one task quantity that the work pool 108 can support for processing is released, that is, after the scheduled pending task is processed, the remaining quantity of tasks that the work pool 108 can support for processing is the current quantity of tasks that can be supported plus 1; after any pending task is processed, it real-time affects the load information monitored in the system monitoring library 103.

[0053] Those skilled in the art should understand that the above computer device 101 and server 102 are only for illustrative purposes. Other existing or future possible computer devices or servers, if applicable to this application, should also be included in the protection scope of this application and are hereby incorporated by reference.

[0054] Based on the above Figure 1 For the computer system shown above, an embodiment of the present application provides a task processing method based on load information. This method can be executed by the computer device 101, or by the server 102, or can be implemented through the interaction between the computer device 101 and the server 102. The embodiments of the present application do not limit this. The embodiments of the present application take the example that this method is executed by the computer device for illustration. This computer device can be a computer device or a server. As Figure 2 shown, the task processing method based on load information provided by the embodiments of the present application may include at least one of the following steps 201 to step 204.

[0055] In step 201, obtain the current load information of the computer device.

[0056] The current load information of the computer device reflects the resource usage and busyness of the computer device. The load information includes, but is not limited to: CPU usage rate, memory occupancy rate, disk I / O, or network bandwidth usage rate.

[0057] The ways to obtain the current load information of the computer device include: obtaining it through a system monitoring library. Exemplarily, taking the system monitoring library gopsutil as an example, gopsutil integrates the monitoring functions of these different aspects, enabling developers to obtain load information without writing complex underlying code for each load information separately.

[0058] Optionally, gopsutil obtains the key load information of the CPU through its related functions or methods. For example, it can obtain the CPU usage rate by querying the relevant data provided by the operating system kernel and calculating the proportion of the time the CPU is used to execute tasks within a certain period; in terms of memory occupancy rate, gopsutil can obtain information such as the total capacity, used capacity, and available capacity of the memory, and by calculating the proportion of the used capacity to the total capacity, the memory occupancy rate can be obtained; for disk load, gopsutil can obtain information such as the read / write speed of the disk, the number of disk I / O operations, and the disk usage rate, which helps to determine whether the disk is busy and whether there is sufficient disk I / O capacity to handle upcoming tasks.

[0059] Exemplarily, by calling a system monitoring library (such as gopsutil) to collect the following information: the current CPU usage rate is 85%; the memory occupancy rate is 78%; the disk I / O is 50 megabytes per second; the network bandwidth is 100 megabytes per second.

[0060] In step 202, based on the current load information, determine the adjustment quantity of the first quantity limit, where the first quantity limit is the upper limit of the number of tasks that the current working pool supports processing.

[0061] The first quantity limit refers to the maximum value of the number of tasks that the current working pool supports processing. It is a value set in advance or determined based on the initial configuration. For example, in a simple file processing working pool, the first quantity limit is initially set to 100 tasks, which means the working pool can process at most 100 file processing tasks simultaneously.

[0062] Optionally, the setting methods of the first quantity limit include: based on an empirical resource allocation strategy; or, setting the first quantity limit based on hardware resources. For example, if the CPU performance of the computer device is weak and the number of cores is small, then the first quantity limit will be set lower.

[0063] Optionally, when the computer device is started up, the first upper limit of the quantity is initialized to N, where N is set according to the number of cores of the computer device. For example, when the computer device has 4 cores, the initial pool size is set to N = 8 (twice the number of cores). Since each core can process a certain number of tasks simultaneously, by setting it to a multiple of the number of cores, the task processing and the utilization of system resources are balanced to a certain extent.

[0064] The adjustment quantity is a value for adjusting the first upper limit of the quantity based on the current load information of the computer device. It reflects the number of tasks that the working pool can additionally process or needs to reduce according to the actual operating conditions of the computer device. For example, if the first upper limit of the quantity is 100, and after analyzing the load information, it is determined that the processing capacity for 20 more tasks is required, then the adjustment quantity is 20; if the processing capacity for 10 tasks needs to be reduced, the adjustment quantity is -10.

[0065] The adjustment quantity has strong dynamics. It is not a fixed value but changes with the continuous change of the load information. For example, there are significant differences in the load at different times of the day. During the morning office hours, there may be more tasks related to office software, while the number of tasks decreases during the lunch break. The adjustment quantity will be adjusted in real time or regularly according to this dynamic change of the load to ensure the task processing efficiency of the working pool and the stability of the system.

[0066] Optionally, determining the adjustment quantity of the first upper limit of the quantity based on the current load information can be understood as that when the load of these resources is in different states, the adjustment quantity will make corresponding responses. For example, when the CPU utilization rate is low, there is more remaining space in the memory, and the disk I / O and network are also relatively idle, the adjustment quantity may be a positive number, indicating that the number of tasks that the working pool can process can be increased. In addition, the various indicators in the load information are interrelated, and this correlation also affects the determination of the adjustment quantity. For example, a high CPU utilization rate may be due to insufficient memory, resulting in a large amount of data exchange and waiting. At this time, when determining the adjustment quantity, not only the situation of the CPU needs to be considered, but also the improvement measures for the memory need to be comprehensively considered, and the task quantities related to the memory and the CPU need to be adjusted simultaneously.

[0067] It should be noted that the direction of determining the adjustment quantity based on the load information is the key. If the load information indicates that the computer device is at risk of overload or already overloaded, such as the CPU utilization rate and the memory are both close to full load, then the direction of the adjustment quantity is to decrease. If the load information shows that there is more remaining system resources, such as the CPU utilization rate is lower than 30% and the memory utilization rate is lower than 50%, etc., the direction of the adjustment quantity is to increase.

[0068] In addition, the magnitude of the adjustment quantity is equally important. Determining the magnitude requires a more in-depth analysis of the specific values in the load information. For example, if the CPU usage rate is 80%, perhaps only a small magnitude of reduction in the adjustment quantity is needed, such as -5; if the CPU usage rate reaches over 95%, a large magnitude of reduction may be required, such as -20 or -30. The same applies to increasing the adjustment quantity, where the appropriate magnitude is determined based on the amount of remaining resources.

[0069] In step 203, according to the adjustment quantity, determine the second quantity upper limit, where the second quantity upper limit is the upper limit of the number of tasks that the adjusted work pool supports processing.

[0070] The second quantity upper limit is the new upper limit of the number of tasks that the work pool supports processing after adjusting the work pool based on the load information. It is the result of adjusting the initial first quantity upper limit and reflects the dynamic upper limit value of the number of tasks that the work pool can accommodate and process according to the current load situation. For example, in a work pool with an initially set first quantity upper limit of 50 tasks, if the adjustment quantity determined based on the load information is 10, then the second quantity upper limit is 60 tasks, which means the work pool can now process at most 60 tasks simultaneously. The essence of the second quantity upper limit is an adaptive adjustment result. It aims to overcome the drawbacks of the traditional fixed-task-number work pool management scheme and enable the work pool to better adapt to the fluctuations in system load.

[0071] The second quantity upper limit directly affects the system's task processing efficiency and system stability. When the second quantity upper limit is set reasonably, the system can effectively process more tasks during peak loads and avoid task backlogs.

[0072] Optionally, determining the second upper limit according to the adjustment quantity can be understood as follows: when the adjustment quantity is a positive number, the second upper limit is equal to the first upper limit plus the adjustment quantity, which means that according to the load information, there are sufficient resources to handle more tasks. For example, assume that the first upper limit is 100 tasks. After analyzing the load information, it is found that the CPU usage rate is relatively low, there is a large amount of remaining memory space, and the disk I / O and network bandwidth are also relatively idle. The determined adjustment quantity is 20. Then the second upper limit is 100 + 20 = 120 tasks; if the adjustment quantity is a negative number, the second upper limit is equal to the first upper limit plus the adjustment quantity. This indicates that the load is too high and the number of tasks that the work pool can handle needs to be reduced. For example, the first upper limit is 80 tasks. When it is detected that the CPU usage rate of the system is close to 100%, the memory occupancy rate is too high, and the disk I / O and network are both busy, the determined adjustment quantity is -10. Then the second upper limit is 80 + (-10) = 70 tasks; when the adjustment quantity is zero, the second upper limit is equal to the first upper limit, which means that according to the current load information, the load is in a balanced state and there is no need to adjust the upper limit of the number of tasks in the work pool.

[0073] It should be noted that determining the second upper limit requires comprehensively considering the load conditions of multiple resources. For example, the CPU usage rate may be relatively low, but the memory occupancy rate is relatively high. At this time, the adjustment quantity cannot be determined only based on the CPU usage rate. If the number of tasks is increased only considering the CPU usage rate, it may lead to further tension in memory resources.

[0074] Determining the second upper limit according to the adjustment quantity is a dynamic process that comprehensively considers the system load status and the utilization of multiple resources, which is of great significance for improving task processing efficiency and the stability of computer devices.

[0075] In step 204, based on the second upper limit, the pending tasks scheduled to the work pool are processed.

[0076] Pending tasks refer to the set of tasks waiting to be executed in a computer device. These tasks may come from different sources, such as user requests, internal system jobs, or tasks transmitted from external devices. For example, in a web server, web access requests and file download requests sent by users are all pending tasks; in an enterprise's production management system, tasks such as order processing and inventory counting are also pending tasks when waiting to be executed.

[0077] The tasks to be processed have the characteristic of diversity. They vary greatly in terms of resource requirements, priorities, and execution time requirements. Some tasks may be CPU-intensive and require a large amount of CPU computing resources, such as scientific computing tasks; some are I / O-intensive and mainly rely on disk or network read and write operations, such as file transfer tasks.

[0078] Optionally, based on the second quantity limit, the processing and scheduling of the tasks to be processed in the work pool include: when a task to be processed requests to enter the work pool, determine whether the number of tasks in the current work pool has reached the second quantity limit; if not, allow the task to be processed to enter the work pool; if the second quantity limit has been reached, decide whether to allow the task to be processed to enter according to the preset factors of the task; inside the work pool, perform resource allocation according to the resource requirements of the tasks to be processed and the second quantity limit. For each task to be processed entering the work pool, allocate corresponding resources according to whether it is CPU-intensive, I / O-intensive, or other types; during the process of processing the tasks to be processed, perform load balancing according to the second quantity limit. If a certain processing unit (such as a thread or a process) in the work pool is overloaded while other units are lightly loaded, transfer some tasks to be processed from the overloaded unit to the lightly loaded unit, provided that the total number of tasks in the work pool does not exceed the second quantity limit.

[0079] Task admission control can prevent the work pool from being overloaded. Without admission control, when a large number of tasks to be processed flood in, it may cause the number of tasks in the work pool to exceed the second quantity limit, resulting in excessive consumption of load resources and affecting task processing efficiency and system stability.

[0080] This application adjusts the upper limit of the number of tasks that can be supported for processing in the work pool (i.e., the first quantity limit) by obtaining the current load information, reasonably adjusts the first quantity limit as the system load fluctuates, makes full use of resources, avoids excessive resource consumption, improves resource utilization rate, ensures that the upper limit of the number of tasks that can be supported for processing in the work pool is at a more appropriate level, enables the tasks to be processed orderly and efficiently, avoids the backlog of tasks to be processed or the idleness of processing capabilities, keeps the system in a better task processing state all the time, and improves task processing efficiency.

[0081] Determine the adjustment quantity.

[0082] In some embodiments, the information type of the current load information is at least two. Based on the current load information, determining the adjustment quantity of the first quantity limit includes: determining at least two sub-adjustment quantities, where the at least two sub-adjustment quantities correspond one-to-one to the at least two current load information; based on the at least two sub-adjustment quantities, determining the adjustment quantity of the first quantity limit.

[0083] By considering at least two sub-adjustment quantities, a more comprehensive evaluation of the load can be performed. Different load resources (such as CPU, memory, network bandwidth, etc.) all play important roles in the operation of computer devices. A single load evaluation will ignore the status of some key resources, thus more accurately determining the adjustment quantity for the first upper limit. In addition, in a complex computer device environment, multiple resources interact with each other, and the load situation is complex and changeable. Determining the adjustment quantity based on at least two sub-adjustment quantities can better adapt to this complex environment.

[0084] Any one of the at least two sub-adjustment quantities is an intermediate quantity in the process of adjusting the upper limit of the number of tasks in the work pool based on load information. It is determined according to different load information respectively, aiming to reflect the influence of the system load status on the upper limit of the number of tasks in the work pool from multiple aspects. For example, in a computer device, load information of different information types such as CPU usage rate and memory occupancy rate will be considered. An adjustment quantity for the upper limit of the number of tasks in the work pool determined according to the CPU usage rate is one kind of sub-adjustment quantity, and the adjustment quantity determined according to the memory occupancy rate is another kind of sub-adjustment quantity.

[0085] The one-to-one correspondence between at least two sub-adjustment quantities and the current at least two load information can be understood as that the one-to-one correspondence means that each load information has its corresponding sub-adjustment quantity, and there is a direct causal relationship between them. For example, assume that CPU usage rate and disk I / O load are considered as two load information. When the CPU usage rate is high, according to a pre-set rule or algorithm, a sub-adjustment quantity corresponding to the CPU usage rate will be obtained, and this sub-adjustment quantity reflects the influence of the CPU usage rate on the upper limit of the number of tasks in the work pool; similarly, when the disk I / O load is high, there will also be a sub-adjustment quantity specifically determined for the disk I / O load.

[0086] The essence of this correspondence is to separately quantify the load factors of different information types and link them to the adjustment of the upper limit of the number of tasks in the work pool. By separately considering different load information and their corresponding sub-adjustment quantities, the overall load situation of the computer device can be evaluated more accurately, avoiding inaccurate adjustments caused by only considering a single load factor.

[0087] In some embodiments, determining at least two sub-adjustment quantities includes: for any one of the current at least two load information, based on any one of the load information, the threshold corresponding to any one of the load information, and the threshold adjustment quantity corresponding to the threshold, determining the sub-adjustment quantity corresponding to any one of the load information; repeating the above steps until at least two sub-adjustment quantities are obtained.

[0088] The threshold value corresponding to any kind of load information is a preset standard value, which is used to measure whether the load degree of the load information of this information type has reached the critical state where the upper limit of the number of tasks in the work pool needs to be adjusted. For example, for CPU usage rate, a threshold value of CPU usage rate may be set at 70%. This threshold value indicates that when the CPU usage rate reaches 70%, the CPU load situation of the system has approached the state that may affect the task processing efficiency and system stability, and it is necessary to further consider whether to adjust the upper limit of the number of tasks in the work pool.

[0089] The threshold adjustment quantity corresponding to the threshold value is a preliminary adjustment quantity for the upper limit of the number of tasks in the work pool when the load information reaches its corresponding threshold value.

[0090] The setting methods of the threshold adjustment quantity corresponding to the threshold value include: being set based on experience, system performance testing or preset rules. For example, for CPU usage rate, when the CPU usage rate reaches 70% (threshold value), the corresponding threshold adjustment quantity may be -3, which means that when the CPU usage rate reaches this threshold value, it is initially planned to reduce the upper limit of the number of tasks in the work pool by 3 tasks to relieve the CPU load pressure.

[0091] Optionally, the threshold value includes a first threshold value, and the first threshold value is used to determine that the adjustment method corresponding to any kind of load information is to increase the first upper limit quantity, and the threshold adjustment quantity includes the first quantity; for any one of the at least two kinds of load information currently, based on any kind of load information, the threshold value corresponding to any kind of load information, and the threshold adjustment quantity corresponding to the threshold value, determining the sub-adjustment quantity corresponding to any kind of load information includes: for any one of the at least two kinds of load information currently, based on any kind of load information and the first threshold value, determining that the adjustment method corresponding to any kind of load information is to increase the first upper limit quantity; determining that the sub-adjustment quantity corresponding to any kind of load information is to increase the first upper limit quantity by the first quantity, and the first quantity corresponds to the first threshold value.

[0092] The first threshold value is the critical value for determining that the adjustment method corresponding to any kind of load information is to increase the first upper limit quantity.

[0093] Optionally, the setting method of the first threshold value includes: being preset based on at least one of the performance characteristics of the computer device, task processing requirements, and hardware resources.

[0094] For different load information, the value of the first threshold may vary. The essence of this threshold is a judgment criterion. When the load information meets the preset relationship with the first threshold, an adjustment method of increasing the first quantity upper limit will be triggered. For example, for CPU usage rate, the first threshold may be set at 50%. This means that when the CPU usage rate is below 50%, the system believes that there is still a large amount of spare CPU resources and sufficient ability to handle more tasks. At this time, it may consider increasing the upper limit of the number of tasks in the work pool, that is, adopting the adjustment method of increasing the first quantity upper limit.

[0095] Embodiment of the first threshold in payload information of different information types 。

[0096] CPU usage rate: Assume that the computer device mainly processes web requests and simple data processing tasks. When the CPU usage rate is below 50% (i.e., reaches the first threshold), it indicates that the CPU resources are not fully utilized. For example, during normal working hours, due to the small business volume, the CPU is idle most of the time, and the CPU usage rate may be around 20% at this time, meeting the condition of the first threshold of being lower than 50%.

[0097] Memory occupancy rate: For the memory occupancy rate, the first threshold may be set at 60%. If there are fewer applications running in the computer device and the memory occupancy rate is 30% (lower than the first threshold), this indicates that there is still enough memory space for running more tasks, and it can be considered to increase the upper limit of the number of tasks in the work pool to improve resource utilization.

[0098] Disk I / O: In terms of disk I / O, the first threshold can be set at 30% of the disk I / O usage rate. If the disk I / O usage rate is 25% (lower than the first threshold), for example, during a period with a low frequency of data reading and writing, this means that the disk I / O has enough bandwidth to handle more disk operations related to tasks, and the upper limit of the number of tasks in the work pool can be increased to make full use of the disk I / O resources.

[0099] Network bandwidth: For the network bandwidth, the first threshold may be set at 20% of the network bandwidth usage rate. When the network bandwidth usage rate is 15% (lower than the first threshold), such as during a network traffic low period, there is a large amount of idle network bandwidth. At this time, the upper limit of the number of tasks in the work pool can be increased to allow more pending tasks that may involve network transmission to enter the work pool.

[0100] The first quantity is a predefined value corresponding to a first threshold, which represents the specific increment to the upper limit of the first quantity when the condition for increasing the upper limit of the first quantity is met. For example, for CPU usage rate, if the upper limit of the first quantity is 100 tasks and the first quantity is 2, when it is determined that the adjustment method corresponding to the CPU usage rate is to increase the upper limit of the first quantity (because the CPU usage rate is lower than the first threshold), then the sub-adjustment quantity corresponding to the CPU usage rate is to increase 100 by 2, that is, 102 tasks. This means that based on the CPU usage rate situation, the upper limit of the number of tasks in the work pool is adjusted to 102 tasks.

[0101] For payload information of different information types, the first quantity upper limit increases by the first quantity 。

[0102] CPU usage rate: Assume that the first threshold corresponding to the CPU usage rate is 50%, the first quantity is 2, and the current upper limit of the first quantity is 80 tasks. If the CPU usage rate is 20% (lower than the first threshold), and it is determined that the adjustment method is to increase the upper limit of the first quantity. Then the sub-adjustment quantity corresponding to the CPU usage rate is 80 + 2 = 82 tasks.

[0103] Memory occupancy rate: If the first threshold of the memory occupancy rate is 60%, the first quantity is 8, and the upper limit of the first quantity is 120 tasks, when the memory occupancy rate is 30% (lower than the first threshold), the sub-adjustment quantity corresponding to the memory occupancy rate is 120 + 8 = 128 tasks.

[0104] Disk I / O: For disk I / O, assume the first threshold is 30%, the first quantity is 3, and the upper limit of the first quantity is 90 tasks. When the disk I / O usage rate is 20% (lower than the first threshold), the sub-adjustment quantity corresponding to the disk I / O is 90 + 3 = 93 tasks.

[0105] Network bandwidth: Assume that the first threshold of the network bandwidth is 20%, the first quantity is 6, and the upper limit of the first quantity is 150 tasks. When the network bandwidth usage rate is 10% (lower than the first threshold), the sub-adjustment quantity corresponding to the network bandwidth is 150 + 6 = 156 tasks.

[0106] Optionally, the threshold includes a second threshold, which is used to determine that the adjustment method corresponding to any kind of load information is to reduce the first upper limit of the quantity. The threshold adjustment quantity includes a second quantity. For any kind of load information among at least two kinds of current load information, based on any kind of load information, the threshold corresponding to any kind of load information, and the threshold adjustment quantity corresponding to the threshold, to determine the sub-adjustment quantity corresponding to any kind of load information, includes: for any kind of load information among at least two kinds of current load information, based on any kind of load information and the second threshold, to determine that the adjustment method corresponding to any kind of load information is to reduce the first upper limit of the quantity; to determine that the sub-adjustment quantity corresponding to any kind of load information is to reduce the first upper limit of the quantity by the second quantity, and the second quantity corresponds to the second threshold.

[0107] The second threshold is used to determine that the adjustment method corresponding to any kind of load information is to reduce the first upper limit of the quantity. The existence of the second threshold is to achieve the effective management of resources and the high efficiency of task processing. When the load information exceeds the second threshold, it indicates that the resource utilization in this aspect has approached or reached the saturation state. By setting the second threshold and adjusting the upper limit of the number of tasks in the work pool based on it, problems such as performance degradation, task processing delay, and even system crash caused by overloading of the system can be prevented.

[0108] Optionally, the setting method of the second threshold includes: setting based on at least one of hardware characteristics, the nature of tasks, and overall performance requirements. Different load information (such as CPU usage rate, memory occupancy rate, disk I / O, and network bandwidth, etc.) may have different settings of the second threshold.

[0109] Embodiment of the second threshold in payload information of different information types 。

[0110] CPU usage rate: Assume that the second threshold of the CPU usage rate is set to 80%. When large-scale data operations are in progress, the CPU usage rate reaches 90%. Since 90% > 80%, it is determined that the adjustment method corresponding to the CPU usage rate is to reduce the first upper limit of the quantity. This means that the number of tasks in the work pool needs to be reduced to relieve the burden on the CPU, ensure that the tasks being run can be processed efficiently, and avoid the extension of task response time or errors caused by the over-busyness of the CPU.

[0111] Memory occupancy rate: In a computer device running multiple large applications, the second threshold of the memory occupancy rate is 75%. If the current memory occupancy rate reaches 90%, since 90% > 75%, it is determined that the adjustment method corresponding to the memory occupancy rate is to reduce the first upper limit of the quantity. This is done to prevent memory exhaustion because when the memory is almost full, new tasks to be processed may not be able to run properly.

[0112] Disk I / O: For disk I / O, let its second threshold be 60%. In the case of frequent data reading and writing, when the disk I / O utilization rate reaches 70%, since 70% > 60%, it is determined that the adjustment method corresponding to disk I / O is to reduce the first quantity limit. This helps to prevent disk I / O from becoming a bottleneck because too high a disk I / O utilization rate may lead to a slowdown in data reading and writing speeds, affecting the processing speed of the tasks to be processed in the entire work pool.

[0113] Network bandwidth: Assume that the second threshold of network bandwidth is 80%. When a large number of users watch high-definition videos simultaneously, the network bandwidth utilization rate reaches 90%. Because 90% > 80%, it is determined that the adjustment method corresponding to network bandwidth is to reduce the first quantity limit. This can prevent network congestion, ensure the video playback quality of the connected users, and avoid a decline in the viewing experience of all users due to too many tasks occupying the network bandwidth.

[0114] The second quantity is a predefined value corresponding to the second threshold, which represents the specific reduction amount of the first quantity limit under the condition of meeting the requirement of reducing the first quantity limit.

[0115] For payload information of different information types, the first quantity upper limit decreases by the second quantity 。

[0116] CPU utilization rate: Assume that the second threshold corresponding to the CPU utilization rate is 80%, the second quantity is 5, and the first quantity limit is 80 tasks. If the CPU utilization rate is 90% (exceeding the second threshold), it is determined that the adjustment method is to reduce the first quantity limit. Then the sub-adjustment quantity corresponding to the CPU utilization rate is 80 - 5 = 75 tasks.

[0117] Memory occupancy rate: If the second threshold of the memory occupancy rate is 75%, the second quantity is 8, and the first quantity limit is 120 tasks, when the memory occupancy rate is 90% (exceeding the second threshold), the sub-adjustment quantity corresponding to the memory occupancy rate is 120 - 8 = 112 tasks.

[0118] Disk I / O: For disk I / O, let the second threshold be 60%, the second quantity be 3, and the first quantity limit be 90 tasks. When the disk I / O utilization rate is 70% (exceeding the second threshold), the sub-adjustment quantity corresponding to disk I / O is 90 - 3 = 87 tasks.

[0119] Network bandwidth: Assume that the second threshold of the network bandwidth utilization rate is 80%, the second quantity is 6, and the first quantity limit is 150 tasks. When the network bandwidth utilization rate is 90% (exceeding the second threshold), the sub-adjustment quantity corresponding to the network bandwidth is 150 - 6 = 144 tasks.

[0120] Optionally, the threshold includes a third threshold, and the at least two types of load information include first load information; determining the adjustment quantity of the first quantity upper limit based on the at least two sub-adjustment quantities includes: when the first load information is greater than the third threshold, determining target load information among the at least two types of load information, where the adjustment method corresponding to the target load information is to increase the load information of the first quantity upper limit; determining the adjustment quantity of the first quantity upper limit based on the sub-adjustment quantities corresponding to the other load information except the target load information among the at least two types of load information.

[0121] The third threshold is a critical value set for the load information. When the value of the load information exceeds this third threshold, a series of operation processes will be triggered, including subsequent operations such as determining the target load information. The setting method of the third threshold includes: setting the third threshold based on the system's tolerance for different load conditions and the overall performance optimization requirements.

[0122] The target load information is, when the first load information is greater than the third threshold, a load information determined among the at least two types of load information, and the corresponding adjustment method is to increase the load information of the first quantity upper limit. It is a type of load information selected when the first load information exceeds the third threshold. This type of load information is considered to be capable of accepting more adjustments to the task quantity upper limit in the current state to optimize the overall task processing efficiency of the system.

[0123] When the first load information is greater than the third threshold, the target load information is determined to be the load information that can increase the first quantity upper limit. However, when determining the actual adjustment quantity of the first quantity upper limit, it is based on the sub-adjustment quantities corresponding to the other load information except the target load information. This is because in a computer device, different load information is interrelated and mutually influential. Although the target load information has the potential to increase the task quantity upper limit, the situation of other load information cannot be ignored.

[0124] Exemplarily, the first load information is the CPU usage rate, and the third threshold is 95%. Among at least two types of load information, the CPU usage rate is 97%, exceeding the third threshold of 95%. This means that the CPU usage rate has reached a state that requires attention and handling; at this time, the memory occupancy rate is lower than 60%, and the upper limit of the first quantity needs to be increased. At this time, the network bandwidth usage rate is higher than 60%, and the upper limit of the first quantity needs to be decreased; however, since the CPU usage rate of 97% exceeds the third threshold of 95%, considering the above at least two types of load information, based on the sub-adjustment quantities corresponding to the CPU usage rate and the network bandwidth other than the memory occupancy rate, the adjustment quantity of the upper limit of the first quantity is determined. Among them, the CPU usage rate of 97% is a very high load state, and the upper limit of the task quantity needs to be reasonably adjusted according to the corresponding sub-adjustment quantity. If the high load state of the CPU is ignored and the upper limit of the task quantity is increased significantly just based on the low memory occupancy rate, it may overload the CPU, resulting in a decline in the overall performance of the computer device, an extension of the task processing time, or even a failure in task processing.

[0125] In addition, for the case where the CPU usage rate is 97% (exceeding the third threshold) and the network bandwidth usage rate is higher than 60%, the sub-adjustment quantities will be calculated according to their respective load information, corresponding thresholds, and threshold adjustment quantities. For example, according to a preset rule, when the CPU usage rate reaches 97%, the corresponding sub-adjustment quantity is to reduce 5 tasks (because the CPU load is too high), and when the network bandwidth usage rate is higher than 60%, the corresponding sub-adjustment quantity is to reduce 3 tasks (due to tight network bandwidth).

[0126] Optionally, repeating the above steps until at least two sub-adjustment quantities are obtained can be understood as: for any one of the at least two types of load information, its corresponding sub-adjustment quantity needs to be determined. The same operation process needs to be carried out sequentially for different types of load information until each type of load information has a corresponding sub-adjustment quantity, realizing the process of comprehensively evaluating the load status, and comprehensively determining the adjustment of the upper limit of the work pool task quantity by considering different load factors respectively.

[0127] Exemplarily, there are four types of load information in the system that need to be considered: CPU usage rate, memory occupancy rate, disk I / O, and network bandwidth. First, relevant steps are executed for the CPU usage rate to determine the sub-adjustment quantity, then the same operation is performed on the memory occupancy rate, followed by disk I / O and network bandwidth, until each of these four types of load information has its own corresponding sub-adjustment quantity, thus completing this process. The purpose of this process is to ensure that all load factors that may affect the system performance are fully considered when adjusting the upper limit of the work pool task quantity.

[0128] It should be noted that during the process of repeatedly executing the steps, although each type of load information is processed separately, there are interactions and influences among them. For example, a too high CPU usage rate may lead to an increase in disk I / O because if the CPU processes tasks too slowly, the waiting time for disk data reading and writing may become longer. Therefore, when determining the sub-adjustment quantity corresponding to disk I / O, although it is determined independently according to conditions such as disk I / O load information and the first threshold, it is also necessary to consider the potential impact of the previous CPU usage rate on disk I / O. Similarly, a high memory occupancy rate may affect the utilization efficiency of network bandwidth because insufficient memory may lead to insufficient data caching, thereby affecting the transmission efficiency of network data. This interactivity requires a global perspective when determining the sub-adjustment quantity corresponding to each type of load information and cannot view each type of load information in isolation.

[0129] In some embodiments, the method further includes: when the disk I / O or network bandwidth exceeds a set threshold, freezing the size adjustment of the upper limit of the number of tasks supported by the working pool for processing.

[0130] Optionally, when the CPU usage rate exceeds 95%, the memory occupancy rate exceeds 90%, or the disk I / O or network bandwidth exceeds a predetermined threshold, trigger overload protection, suspend the allocation of pending tasks, and delay the processing of low-priority pending tasks.

[0131] In some embodiments, determining the adjustment quantity of the first upper limit based on the current load information includes: determining the size of the sliding window; within each sliding window, determining the average change rate of the load information; and determining the adjustment quantity based on the average change rate.

[0132] Determining the size of the sliding window can be understood as setting the past 10 minutes or 15 minutes as a window, as well as the sliding step of the window, such as updating the load information within the window every 1 minute or 2 minutes.

[0133] Within each window, for example, for the CPU usage rate, calculate the average change rate of the CPU usage rate within the window. Obtain the first difference by subtracting the starting CPU usage rate of the window from the current CPU usage rate, and use the quotient of the first difference and the window duration as the average change rate of the CPU.

[0134] If the average load change rate is positive and exceeds a certain probability threshold, it indicates that the load is on an upward trend. At this time, the adjustment quantity should be reduced or set to a negative number to avoid overload. If the average load change rate is negative and lower than a certain threshold, it indicates that the load is on a downward trend, and the adjustment quantity can be appropriately increased. If the average load change rate fluctuates within a certain range, it indicates that the load is relatively stable, and the adjustment quantity can be determined comprehensively according to factors such as the current load situation and system resource utilization rate.

[0135] In some embodiments, determining an adjustment quantity for a first quantity upper limit based on current load information includes: using the current load information as an input parameter of a pre-trained adjustment model; and determining the adjustment quantity for the first quantity upper limit based on the adjustment model.

[0136] Exemplarily, the current load information is input into the adjustment model, and the adjustment model outputs an adjustment quantity of -5 (indicating a reduction of the task quantity upper limit for 5 tasks).

[0137] Optionally, the adjustment model is trained in the following manner: historical data is collected from a computer device, where the historical data includes at least two types of historical load information and historical adjustment data corresponding to the at least two types of historical load information respectively for the task quantity upper limit supported by a work pool; with the target that the load resource utilization rate is within a specified interval, first historical data is screened out from the historical data, where the first historical data includes first historical load information with the load resource utilization rate within the specified interval and the first historical adjustment quantity corresponding to the first historical load information; the first historical data is labeled; the labeled first historical data is divided into a training set, a validation set, and a test set; and a predetermined artificial intelligence model is trained based on the training set to obtain the adjustment model.

[0138] Exemplarily, the specified interval includes, but is not limited to: 75%-95%. That is, the first historical load information with the load resource utilization rate greater than 75% and less than 95% and the first historical adjustment data corresponding to the first historical load information are used to train the adjustment model.

[0139] Optionally, the method further includes: performing normalization processing on the historical data. For example, converting the CPU usage rate to a value between 0 and 1 to facilitate subsequent calculations and analyses.

[0140] Exemplarily, the historical adjustment data corresponding to the historical load information for the task quantity upper limit supported by the work pool includes: adjustment amplitudes, adjustment quantities, and the corresponding load information at that time under different load conditions (such as high load, low load, fluctuating load, etc.).

[0141] Optionally, the method further includes: cleaning the first historical data to remove inaccurate or erroneous data points. For example, abnormal adjustment data recorded during system failures needs to be excluded to ensure the quality of the data.

[0142] Exemplarily, labeling the first historical data includes: using the first historical load information (CPU usage rate, memory occupancy rate, etc.) corresponding to the first historical data as input features and using the corresponding adjustment amplitude and adjustment quantity as output labels.

[0143] It should be noted that the predetermined artificial intelligence model can be a neural network model. For the neural network model, the weights of the model are continuously adjusted through the backpropagation algorithm to minimize the error between the predicted output (adjustment quantity) and the true label. For example, the mean square error is used as the loss function. During the training process, the hyperparameters of the model are adjusted according to the performance of the validation set. For example, for a neural network, hyperparameters such as the learning rate and the number of nodes in the hidden layer are adjusted to prevent overfitting or underfitting. When the error of the adjusted model on the validation set reaches the minimum and is stable, the training is stopped.

[0144] Determine the second quantity upper limit.

[0145] In some embodiments, determining the second quantity upper limit according to the adjustment quantity includes: determining an expected upper limit according to the adjustment quantity and the first quantity upper limit, where the expected upper limit is the quantity to which it is expected to adjust the first quantity upper limit; performing a smoothing process on the expected upper limit to determine the second quantity upper limit, and the smoothing process is used to smooth the adjustment operation for the first quantity upper limit.

[0146] Determining the second quantity upper limit through the smoothing process can make the adjustment process of the task quantity smoother, ensure the continuity of task processing, reduce the risk of task interruption, and thus improve the stability of the computer device; the smoothing process ensures the coherence of task processing and helps to improve task processing efficiency.

[0147] The expected upper limit is calculated based on the first quantity upper limit of the number of tasks that the current work pool supports for processing and the determined adjustment quantity, and represents the quantity to which it is expected to adjust the first quantity upper limit. This value is an intermediate result obtained through a calculation logic based on the current load information of the system. It reflects the upper limit of the task quantity that should be adjusted initially according to the load situation, and is an expected adjustment target after considering various factors such as system load, resource utilization, and task processing efficiency.

[0148] Optionally, determining the expected upper limit according to the adjustment quantity and the first quantity upper limit can be understood as follows: assuming the first quantity upper limit is N and the adjustment quantity is a, the expected upper limit is N + a (when the adjustment method of the adjustment quantity is an increase), or the expected upper limit is N - a (when the adjustment method of the adjustment quantity is a decrease).

[0149] It should be noted that it is assumed that there are two types of load information, namely CPU usage rate and memory occupancy rate, in a computer system. If the adjustment quantity is determined only based on the CPU usage rate, there will be a problem of one-sidedness. When the CPU usage rate is high, according to a separate rule, it may be concluded that the adjustment quantity for significantly reducing the upper limit of the number of tasks is required. However, if the memory occupancy rate is very low at this time, there are still a large amount of memory resources available for processing more tasks. Therefore, it is necessary to comprehensively consider the CPU usage rate and the memory occupancy rate. For example, if the CPU usage rate corresponds to a reduction of 2 in the upper limit of the number of tasks, and the memory occupancy rate requires an increase of 3 in the upper limit of the number of tasks, then considering the CPU usage rate and the memory occupancy rate comprehensively, the final adjustment quantity is an increase of 1 in the upper limit of the number of tasks.

[0150] Smoothing processing can be understood as that when the expected upper limit is determined according to the load situation, due to the complexity of the system and the volatility of the load, directly adjusting the first upper limit to the expected upper limit may cause instability of the computer device or discontinuity of task processing. Smoothing processing makes the adjustment process from the first upper limit to the expected upper limit smoother and more gradual, so as to determine the second upper limit.

[0151] Optionally, smoothing the expected upper limit to determine the second upper limit includes: determining a third quantity based on the smoothing coefficient and the first upper limit, where the third quantity is used to represent the proportion of the first upper limit in the second upper limit; determining a fourth quantity according to the expected upper limit and the smoothing coefficient, where the fourth quantity is used to represent the proportion of the expected upper limit in the second upper limit; determining the second upper limit based on the sum of the third quantity and the fourth quantity.

[0152] The smoothing coefficient is a value between 0 and 1, which is used to control the rate of adjustment from the first upper limit to the expected upper limit. This coefficient essentially reflects the relative importance attached to the first upper limit and the expected upper limit when determining the second upper limit. When the smoothing coefficient is close to 1, it indicates that in the adjustment process, more attention is paid to maintaining the original value of the first upper limit, that is, more attention is paid to the initial state of the number of tasks supported by the current work pool; when the smoothing coefficient is close to 0, it is more inclined to directly reach the expected upper limit, and more attention is paid to the expected adjustment result calculated based on the load information.

[0153] The third quantity represents the proportion of the first upper limit in the second upper limit. According to the formula, the third quantity = smoothing coefficient × first upper limit, which is obtained by multiplying the smoothing coefficient by the first upper limit. This quantity reflects the part contributed by the first upper limit when determining the final adjusted upper limit of the number of tasks (the second upper limit). Essentially, it reflects the magnitude of the influence of the upper limit of the number of tasks supported by the original work pool in the smoothing process.

[0154] The fourth quantity represents the proportion of the expected upper limit in the second quantity upper limit. According to the formula, the fourth quantity = (1 - smoothing coefficient) × expected upper limit, which is obtained by multiplying the expected upper limit by (1 minus the smoothing coefficient α). This quantity reflects the contribution of the expected upper limit when determining the final adjusted task quantity upper limit (the second quantity upper limit). It embodies the magnitude of the influence of the expected adjustment result calculated based on the load information during the smoothing process.

[0155] Exemplarily, the second quantity upper limit = α × the first quantity upper limit + (1 - α) × expected upper limit, where α is the smoothing coefficient. It obtains the adjusted task quantity upper limit (the second quantity upper limit) by performing a weighted sum of the first quantity upper limit and the expected upper limit according to the ratios of the smoothing coefficient α and 1 - α.

[0156] It should be noted that in the case where the sum of the third quantity and the fourth quantity is not an integer, the integer part of the sum is determined as the second quantity upper limit.

[0157] For example, if the first quantity upper limit is 10, the expected upper limit is 7, and α is 0.8, then the second quantity upper limit is: 0.8 × 10 + (1 - 0.8) × 7 = 9.4, and the second quantity upper limit is 9.

[0158] It should be noted that the smoothing process can also be achieved through a weighted average algorithm. When the weighted average algorithm smooths the adjustment amplitude, it assigns different weights to different data. Suppose there is a series of data points related to the adjustment quantity, such as the preliminary adjustment quantities calculated according to the load at different times. For these data points, weights are assigned according to their importance or relevance to the current situation. For example, data at a more recent time may have a greater impact on the current adjustment quantity, so it is assigned a higher weight. Through weighted average, the information of multiple adjustment quantity-related data is integrated, avoiding relying solely on the adjustment quantity calculated at a certain moment or by a certain simple calculation. This can make the change of the adjustment quantity smoother and prevent the task quantity upper limit (the second quantity upper limit) of the work pool from experiencing unreasonable large fluctuations due to an extreme preliminary adjustment quantity. The finally weighted average-adjusted quantity will be relatively reasonable, thus achieving smooth adjustment.

[0159] Process the tasks to be processed.

[0160] In some embodiments, there are at least two tasks to be processed. Based on the second quantity upper limit, processing the tasks to be processed scheduled to the work pool includes: scheduling at least two tasks to be processed in the order of priority based on the second quantity upper limit; processing at least two tasks to be processed scheduled to the work pool.

[0161] Scheduling according to the priority order ensures that the tasks to be processed with higher priority can be processed in a timely manner. A reasonable priority scheduling can reduce the waiting time of the tasks to be processed. The tasks to be processed with higher priority are processed first, and the tasks to be processed with lower priority are processed in turn on the premise of not affecting the tasks to be processed with higher priority. This can reduce the average waiting time of each task to be processed and improve the overall efficiency of task processing.

[0162] The priority order refers to the order of processing tasks determined when processing multiple tasks to be processed in the work pool.

[0163] In some embodiments, processing and scheduling at least two tasks to be processed in the work pool includes: processing and scheduling at least two tasks to be processed in the work pool according to the priority order.

[0164] Processing tasks according to the priority order can ensure that important tasks to be processed can obtain system resources preferentially. When the load changes, processing tasks according to the priority order helps to better adapt to load fluctuations. During the peak load period, the tasks to be processed with higher priority can be processed first to ensure the normal operation of core services.

[0165] When a task to be processed is scheduled to the work pool, the task to be processed is first placed in the task queue according to the pre-determined priority order. The tasks to be processed with higher priority are arranged at the front of the queue, and the tasks to be processed with lower priority are arranged at the back. For example, in a task scheduling system, if there are tasks to be processed A (high priority), task to be processed B (medium priority) and task to be processed C (low priority), then task to be processed A will be at the front of the task queue, task to be processed B will be next, and task to be processed C will be at the end.

[0166] The work pool takes out the tasks to be processed from the head of the queue in the order of the task queue for processing. When a task to be processed is completed, the work pool will continue to take out the next task to be processed from the head of the queue for execution. If there are situations such as insufficient load resources during the task execution process, resulting in the task to be processed being temporarily unable to continue processing, the work pool can suspend the task to be processed and first process the next task in the queue, and then resume the execution of the suspended task to be processed when the load resources are sufficient.

[0167] In some embodiments, the priority order is determined in the following manner: based on the processing times respectively corresponding to at least two tasks to be processed, determine the priority order of at least two tasks to be processed.

[0168] Optionally, the method for determining the processing time corresponding to at least two tasks to be processed includes: determining the processing time corresponding to at least two tasks to be processed based on at least one of the task type of the task to be processed, the resource situation of the computer device, and the dependency relationship between the tasks to be processed.

[0169] Exemplarily, determining the processing time corresponding to at least two tasks to be processed based on the task type of the task to be processed can be understood as that for some common task types, the computer device may have predefined the range of processing time. For example, simple query tasks are defined as having a relatively short processing time, usually between a few milliseconds and dozens of milliseconds. While complex query tasks, such as those involving multi-table joint queries, data aggregation, and nested subqueries, may require processing times of several seconds or even minutes, which are obtained based on historical experience data and the analysis of the complexity of the tasks to be processed.

[0170] In addition, for some custom or newly emerging tasks to be processed, it is necessary to estimate the processing time based on the complexity of the tasks to be processed. The task complexity can be evaluated from multiple aspects, such as algorithm complexity, data volume size, and the number of operations.

[0171] Exemplarily, determining the processing time corresponding to at least two tasks to be processed based on the resource situation of the computer device can be understood as that the system resource status of the computer device will significantly affect the processing time of the tasks to be processed. For example, when the CPU utilization rate is very high, the tasks to be processed may need to queue up to wait for CPU resources, thus increasing the processing time. If a task to be processed requires a large amount of memory and the current system memory is insufficient, it may cause data to be swapped to disk virtual memory, which will greatly extend the processing time of the task.

[0172] Exemplarily, determining the processing time corresponding to at least two tasks to be processed based on the dependency relationship between the tasks to be processed can be understood as that if a task to be processed depends on the completion of other tasks to be processed, then the processing time of the preceding tasks to be processed will affect the processing time of the current task to be processed.

[0173] In addition, in the case of parallel tasks to be processed, although multiple tasks to be processed can be carried out simultaneously, there are resource competition or interaction relationships between them, which will also affect the processing time.

[0174] Optionally, determining the priority order of at least two tasks to be processed based on the processing time corresponding to at least two tasks to be processed includes: determining the priority order of at least two tasks to be processed based on the length of the processing time; or, determining the priority order of at least two tasks to be processed based on the processing time being long and the importance being greater than a threshold; or, determining the priority order of at least two tasks to be processed based on the processing time and the availability of load resources.

[0175] Exemplarily, if the processing time of a task to be processed is short, it usually means that it can be completed quickly and occupies the load resources for a short time. In the case of limited load resources, such tasks to be processed can be given priority to improve the overall throughput of the system. For example, tasks to be processed with a processing time less than 100 ms are scheduled first and defined as high-priority tasks; tasks to be processed with a processing time between 100 ms and 500 ms are defined as medium-priority tasks; tasks to be processed with a processing time greater than 500 ms are defined as low-priority tasks.

[0176] Determining the priority order according to the principle of shorter processing time first can reduce the waiting time of tasks to be processed. Because tasks to be processed with short processing times are executed first and do not occupy the task queue for a long time, enabling other tasks to be processed to enter the execution state more quickly.

[0177] Exemplarily, some tasks to be processed have a long processing time but are of very high importance. Such tasks to be processed should have a higher priority and be executed prior to other non-critical tasks with short processing times.

[0178] Exemplarily, the priority order is determined based on the processing time of the task to be processed and the availability of the current load resources. If a task to be processed has a long processing time, but there is exactly enough load resources available to meet its requirements at present and it will not have too much impact on other tasks during the task execution process, then this task to be processed can be executed first. For example, in a situation where disk I / O resources are sufficient, a data analysis task with high disk I / O requirements but a long processing time can be executed prior to other tasks to be processed restricted by disk I / O.

[0179] See Figure 3 For the overall flowchart of the task processing method based on load information provided in this application, taking the information type of the load information as at least two types, the thresholds including a first threshold and a second threshold, the threshold adjustment quantities including a first quantity and a second quantity, and the tasks to be processed including at least two as an example, the first threshold is used to determine that the adjustment method corresponding to any type of load information is to increase the upper limit of the first quantity, and the second threshold is used to determine that the adjustment method corresponding to any type of load information is to decrease the upper limit of the first quantity.

[0180] Step 1, obtain the current load information of the computer device.

[0181] Step 2, for any one of the at least two types of current load information, determine whether any one of the load information is less than the first threshold. If so, execute Step 3; if not, execute Step 5.

[0182] Step 3, determine that the adjustment method corresponding to any kind of load information is to increase the first quantity limit.

[0183] Step 4, determine that the sub-adjustment quantity corresponding to any kind of load information is to increase the first quantity limit by a first quantity, and the first quantity corresponds to a first threshold.

[0184] Step 5, for any one of at least two kinds of current load information, determine whether any kind of load information is greater than a second threshold. If so, execute Step 6; if not, execute Step 8.

[0185] Step 6, determine that the adjustment method corresponding to any kind of load information is to decrease the first quantity limit.

[0186] Step 7, determine that the sub-adjustment quantity corresponding to any kind of load information is to decrease the first quantity limit by a second quantity, and the second quantity corresponds to a second threshold.

[0187] It should be noted that the execution order of Step 2 or Step 5 is not limited in this application.

[0188] Step 8, repeatedly execute the above Steps 2 - Step 7 until at least two sub-adjustment quantities are obtained.

[0189] Among them, at least two sub-adjustment quantities correspond one-to-one to at least two kinds of current load information.

[0190] Step 9, based on at least two sub-adjustment quantities, determine the adjustment quantity of the first quantity limit.

[0191] Step 10, according to the adjustment quantity and the first quantity limit, determine the expected limit.

[0192] Among them, the expected limit is the quantity to which the first quantity limit is expected to be adjusted.

[0193] Step 11, based on the smoothing coefficient and the first quantity limit, determine a third quantity, and the third quantity is used to represent the proportion of the first quantity limit in the second quantity limit.

[0194] Step 12, according to the expected limit and the smoothing coefficient, determine a fourth quantity, and the fourth quantity is used to represent the proportion of the expected limit in the second quantity limit.

[0195] Step 13, based on the sum of the third quantity and the fourth quantity, determine the second quantity limit.

[0196] Step 14, based on the second quantity limit, schedule at least two pending tasks in the order of priority.

[0197] Step 15, process at least two pending tasks scheduled to the work pool in the order of priority.

[0198] The following is an embodiment of the apparatus of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the method embodiment of the present application.

[0199] Please refer to Figure 4 , which shows a block diagram of a task processing apparatus based on load information provided in an embodiment of the present application. The apparatus includes:

[0200] An acquisition module 401, configured to acquire the current load information of a computer device;

[0201] A determination module 402, configured to determine an adjustment quantity of a first quantity upper limit based on the current load information, where the first quantity upper limit is the upper limit of the number of tasks that the current work pool supports for processing;

[0202] The determination module 402 is further configured to determine a second quantity upper limit according to the adjustment quantity, where the second quantity upper limit is the upper limit of the number of tasks that the adjusted work pool supports for processing;

[0203] A processing module 403, configured to process the to-be-processed tasks scheduled to the work pool based on the second quantity upper limit.

[0204] In a possible implementation manner, the information type of the current load information is at least two types. The determination module 402 is configured to determine at least two sub-adjustment quantities, and the at least two sub-adjustment quantities correspond one-to-one to the current at least two types of load information; based on the at least two sub-adjustment quantities, determine the adjustment quantity of the first quantity upper limit.

[0205] In a possible implementation manner, the determination module 402 is configured to, for any one of the current at least two types of load information, determine a sub-adjustment quantity corresponding to any one of the load information based on any one of the load information, a threshold corresponding to any one of the load information, and a threshold adjustment quantity corresponding to the threshold; repeat the above steps until at least two sub-adjustment quantities are obtained.

[0206] In a possible implementation manner, the threshold includes a first threshold, and the first threshold is used to determine that the adjustment manner corresponding to any one of the load information is to increase the first quantity upper limit. The threshold adjustment quantity includes a first quantity. The determination module 402 is configured to, for any one of the current at least two types of load information, determine that the adjustment manner corresponding to any one of the load information is to increase the first quantity upper limit based on any one of the load information and the first threshold; determine that the sub-adjustment quantity corresponding to any one of the load information is to increase the first quantity upper limit by the first quantity, and the first quantity corresponds to the first threshold.

[0207] In a possible implementation, the threshold includes a second threshold, and the second threshold is used to determine that the adjustment method corresponding to any kind of load information is to reduce the first upper limit. The threshold adjustment quantity includes a second quantity. The determination module 402 is configured to, for any one of at least two current load information, based on any one of the load information and the second threshold, determine that the adjustment method corresponding to any one of the load information is to reduce the first upper limit; determine that the sub-adjustment quantity corresponding to any one of the load information is to reduce the first upper limit by the second quantity, and the second quantity corresponds to the second threshold.

[0208] In a possible implementation, the threshold includes a third threshold, and at least two kinds of load information include a first load information. The determination module 402 is configured to, when the first load information is greater than the third threshold, determine, among at least two kinds of load information, a target load information, and the adjustment method corresponding to the target load information is to increase the load information of the first upper limit; determine the adjustment quantity of the first upper limit based on the sub-adjustment quantities corresponding to other load information except the target load information among at least two kinds of load information.

[0209] In a possible implementation, the determination module 402 is configured to determine an expected upper limit according to the adjustment quantity and the first upper limit, and the expected upper limit is the quantity to which the first upper limit is expected to be adjusted; perform a smoothing process on the expected upper limit to determine a second upper limit, and the smoothing process is used to smooth the adjustment operation for the first upper limit.

[0210] In a possible implementation, the determination module 402 is configured to determine a third quantity based on a smoothing coefficient and the first upper limit, and the third quantity is used to represent the proportion of the first upper limit in the second upper limit; determine a fourth quantity according to the expected upper limit and the smoothing coefficient, and the fourth quantity is used to represent the proportion of the expected upper limit in the second upper limit; determine the second upper limit based on the sum of the third quantity and the fourth quantity.

[0211] In a possible implementation, there are at least two tasks to be processed. The processing module 403 is configured to schedule at least two tasks to be processed based on the second upper limit in the order of priority; process at least two tasks to be processed scheduled to the work pool.

[0212] In a possible implementation, the processing module 403 is configured to process at least two tasks to be processed scheduled to the work pool in the order of priority.

[0213] In a possible implementation, the processing module 403 is configured to determine the order of priority in the following manner: determine the order of priority of at least two tasks to be processed based on the processing times respectively corresponding to at least two tasks to be processed.

[0214] It should be noted that, when the device provided in the above embodiments realizes its functions, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiments and the method embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.

[0215] An embodiment of the present application also provides a computer device, which includes: a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to implement the task processing method based on load information provided in the above method embodiments.

[0216] Exemplarily, Figure 5 is a structural block diagram of a computer device 1000 provided in an exemplary embodiment of the present application. The computer device 1000 may be Figure 1 the computer device shown, and is used to implement the task processing method based on load information provided in the above embodiments.

[0217] The computer device 1000 includes a central processing unit (CPU) 1001, a system memory 1004 including a random access memory (RAM) 1002 and a read-only memory (ROM) 1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The computer device 1000 also includes a basic input / output system (I / O system) 1006 for facilitating the transmission of information between various components within the computer device, and a mass storage device 1007 for storing an operating system 1013, application programs 1014, and other program modules 1015.

[0218] The basic input / output system 1006 includes a display 1008 for displaying information and input devices 1009 such as a mouse, keyboard, etc. for user input of information. Both the display 1008 and the input devices 1009 are connected to the central processing unit 1001 through an input / output controller 1010 connected to the system bus 1005. The basic input / output system 1006 may further include an input / output controller 1010 for receiving and processing inputs from a plurality of other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1010 also provides outputs to a display screen, printer, or other types of output devices.

[0219] The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable storage medium provide non-volatile storage for the computer device 1000. That is, the mass storage device 1007 may include computer-readable storage media (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0220] Without loss of generality, the computer-readable storage medium may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable storage instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, erasable programmable read-only registers (EPROMs), electrically-erasable programmable read-only memories (EEPROMs), flash memory, or other solid-state storage devices, CD-ROMs, digital versatile discs (DVDs), or other optical storage, magnetic tape cartridges, tapes, disk storage, or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage media is not limited to the above several types. The above system memory 1004 and mass storage device 1007 may be collectively referred to as memory.

[0221] The memory stores one or more programs, which are configured to be executed by one or more central processing units 1001. The one or more programs include instructions for implementing the method embodiments described above. The central processing unit 1001 executes the one or more programs to implement the task processing method based on load information provided by each of the above method embodiments.

[0222] According to various embodiments of the present application, the computer device 1000 may also run by connecting to a remote computer device on the network through a network such as the Internet. That is, the computer device 1000 may be connected to the network 1012 through the network interface unit 1011 connected to the system bus 1005. Or rather, the network interface unit 1011 may also be used to connect to other types of networks or remote computer device systems (not shown).

[0223] The memory further includes one or more programs, which are stored in the memory. The one or more programs include steps for performing the task processing method based on load information provided by the embodiments of the present application and executed by the computer device.

[0224] In an embodiment of the present application, there is also provided a computer-readable storage medium, in which at least one instruction, at least one segment of program, code set or instruction set is stored. When the at least one instruction, at least one segment of program, code set or instruction set is loaded and executed by a processor of a computer device, the task processing method based on load information provided by each of the above method embodiments is implemented.

[0225] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the task processing method based on load information provided by each of the above method embodiments.

[0226] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The above-mentioned computer-readable storage medium can be a read-only memory, a disk or an optical disc, etc.

[0227] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A task processing method based on load information, characterized in that The method includes: Obtaining the current load information of a computer device; Based on the current load information, determining an adjustment quantity for a first quantity upper limit, where the first quantity upper limit is the upper limit of the number of tasks that the current working pool supports for processing; Determining a second quantity upper limit according to the adjustment quantity, where the second quantity upper limit is the upper limit of the number of tasks that the adjusted working pool supports for processing; Based on the second quantity upper limit, processing the pending tasks scheduled to the working pool.

2. The method according to claim 1, characterized in that, The information type of the current load information is at least two types. The determining an adjustment quantity for a first quantity upper limit based on the current load information includes: Determining at least two sub-adjustment quantities, where the at least two sub-adjustment quantities correspond one-to-one to the at least two types of current load information; Based on the at least two sub-adjustment quantities, determining the adjustment quantity for the first quantity upper limit.

3. The method according to claim 2, wherein The determining at least two sub-adjustment quantities includes: For any one of the at least two types of current load information, based on the any one of the load information, the threshold corresponding to the any one of the load information, and the threshold adjustment quantity corresponding to the threshold, determining the sub-adjustment quantity corresponding to the any one of the load information; Repeatedly executing the above steps until the at least two sub-adjustment quantities are obtained.

4. The method according to claim 3, characterized in that The threshold includes a first threshold, where the first threshold is used to determine that the adjustment method corresponding to any one of the load information is to increase the first quantity upper limit, and the threshold adjustment quantity includes a first quantity; The for any one of the at least two types of current load information, based on the any one of the load information, the threshold corresponding to the any one of the load information, and the threshold adjustment quantity corresponding to the threshold, determining the sub-adjustment quantity corresponding to the any one of the load information includes: For any one of the at least two types of current load information, based on the any one of the load information and the first threshold, determining that the adjustment method corresponding to the any one of the load information is to increase the first quantity upper limit; Determining the sub-adjustment quantity corresponding to the any one of the load information as increasing the first quantity upper limit by the first quantity, where the first quantity corresponds to the first threshold.

5. The method according to claim 3, wherein The threshold includes a second threshold, where the second threshold is used to determine that the adjustment method corresponding to any one of the load information is to decrease the first quantity upper limit, and the threshold adjustment quantity includes a second quantity; The for any one of the at least two types of current load information, based on the any one of the load information, the threshold corresponding to the any one of the load information, and the threshold adjustment quantity corresponding to the threshold, determining the sub-adjustment quantity corresponding to the any one of the load information includes: For any one of the at least two types of current load information, based on the any one of the load information and the second threshold, determining that the adjustment method corresponding to the any one of the load information is to decrease the first quantity upper limit; Determining the sub-adjustment quantity corresponding to the any one of the load information as decreasing the first quantity upper limit by the second quantity, where the second quantity corresponds to the second threshold.

6. The method according to claim 3, characterized in that The threshold includes a third threshold, and the at least two pieces of load information include first load information; Determining the adjustment quantity of the first quantity upper limit based on the at least two sub-adjustment quantities includes: When the first load information is greater than the third threshold, determining target load information among the at least two pieces of load information, where the adjustment method corresponding to the target load information is to increase the load information of the first quantity upper limit; Determining the adjustment quantity of the first quantity upper limit based on the sub-adjustment quantities corresponding to the other load information except the target load information among the at least two pieces of load information.

7. The method according to any one of claims 1 to 6, characterized in that Determining the second quantity upper limit according to the adjustment quantity includes: Determining an expected upper limit according to the adjustment quantity and the first quantity upper limit, where the expected upper limit is the quantity to which the first quantity upper limit is expected to be adjusted; Performing a smoothing process on the expected upper limit to determine the second quantity upper limit, where the smoothing process is used to smooth the adjustment operation for the first quantity upper limit.

8. The method according to claim 7, wherein Performing the smoothing process on the expected upper limit to determine the second quantity upper limit includes: Determining a third quantity based on a smoothing coefficient and the first quantity upper limit, where the third quantity is used to represent the proportion of the first quantity upper limit in the second quantity upper limit; Determining a fourth quantity according to the expected upper limit and the smoothing coefficient, where the fourth quantity is used to represent the proportion of the expected upper limit in the second quantity upper limit; Determining the second quantity upper limit based on the sum of the third quantity and the fourth quantity.

9. The method according to any one of claims 1 to 8, characterized in that There are at least two tasks to be processed. Processing the tasks to be processed scheduled to the work pool based on the second quantity upper limit includes: Scheduling the at least two tasks to be processed in the order of priority based on the second quantity upper limit; Processing the at least two tasks to be processed scheduled to the work pool.

10. The method according to claim 9, wherein Processing the at least two tasks to be processed scheduled to the work pool includes: Processing the at least two tasks to be processed scheduled to the work pool in the order of the priority.

11. The method according to claim 9 or 10, characterized in that, The order of priority is determined by the following method: Determining the order of priority of the at least two tasks to be processed based on the processing times respectively corresponding to the at least two tasks to be processed.

12. A computer device, characterized in that, The computer device includes a processor and a memory. A computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the task processing method based on load information according to any one of claims 1 to 11.

13. A computer-readable storage medium or a computer program product, characterized in that, The computer program product is stored in the computer-readable storage medium. The computer program product includes at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the task processing method based on load information according to any one of claims 1 to 11.