Thread task processing method, storage medium, electronic equipment and program product

By dynamically adjusting the thread pool parameters, the resource utilization rate of the thread pool is optimized according to the client's hard 웨어 resource data and thread tasks characteristics, the resource utilization rate of the thread pool is solved, and the resource utilization unbalanced caused by static parameter configuration is achieved, and more efficient resource management is achieved.

CN119883664AActive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510388874.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-04-25
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

Related technologies use thread pools configured with static parameters to process thread tasks, resulting in unbalanced resource utilization.

Method used

By obtaining the client's hardware resource data, identifying the target category of the pending thread task, determining the target parameter prediction model from multiple parameter prediction models based on the target category, and inputting the hardware resource data into the model, predicting the target parameters required by the thread pool when processing the pending thread task, adjusting the thread pool parameters and processing.

Benefits of technology

The system's resource utilization rate is optimized, resource overload or waste is avoided, and it has strong adaptability and flexibility, and can dynamically adjust thread pool parameters according to different hardware configurations, business scenarios and task characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883664A_ABST
    Figure CN119883664A_ABST
Patent Text Reader

Abstract

The invention discloses a thread task processing method, a storage medium, electronic equipment and a program product, and relates to the technical field of computers.The method comprises the steps that in response to a to-be-processed thread task triggered by a user, current hardware resource data of a client side are obtained, and the hardware resource data comprise hardware configuration data and resource use data of the client side; identifying a target category corresponding to the to-be-processed thread task; determining a target parameter prediction model corresponding to the to-be-processed thread task from the plurality of parameter prediction models based on the target category, inputting the hardware resource data into the target parameter prediction model, and predicting target parameters needing to be configured when a thread pool in the client processes the to-be-processed thread task through the target parameter prediction model; adjusting parameters of the thread pool into target parameters, and processing the to-be-processed thread task based on the adjusted thread pool; according to the invention, the resource utilization rate of the system can be optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a thread task processing method, a storage medium, an electronic device, and a program product. Background Art

[0002] Thread pool is a technology used to manage and reuse a group of worker threads, which can reduce the overhead caused by frequent creation and destruction of threads and improve the responsiveness of applications. By using thread pool, clients can effectively manage the execution of concurrent tasks and optimize resource utilization. It can also help clients control the maximum number of concurrent threads of the application to avoid resource exhaustion.

[0003] At present, in the process of processing thread tasks through a thread pool, the thread pool parameters used in the related technology are static. However, using such a thread pool for thread task processing will lead to uneven resource utilization during the task processing process. Summary of the invention

[0004] The present invention provides a thread task processing method, storage medium, electronic device and program product, which mainly aims to solve the problem that the related art uses a thread pool configured with static parameters to process thread tasks, which may lead to uneven resource utilization during task processing.

[0005] In a first aspect, the present application provides a method for processing a thread task, comprising: In response to a user triggering a pending thread task, obtaining the current hardware resource data of the client, the hardware resource data including the hardware configuration data and resource usage data of the client; Identify the target category corresponding to the thread task to be processed; Determine a target parameter prediction model corresponding to the pending thread task from multiple parameter prediction models based on the target category, input hardware resource data into the target parameter prediction model, and predict the target parameters that the thread pool in the client needs to configure when processing the pending thread task through the target parameter prediction model; The parameters of the thread pool are adjusted to the target parameters, and the pending thread tasks are processed based on the adjusted thread pool.

[0006] In a second aspect, the present application provides a thread task processing device, including: An acquisition module is configured to acquire the current hardware resource data of the client in response to the user triggering the pending thread task, the hardware resource data including the hardware configuration data and resource usage data of the client; An identification module, configured to identify a target category corresponding to a thread task to be processed; A prediction module is configured to determine a target parameter prediction model corresponding to the pending thread task from multiple parameter prediction models based on the target category, input the hardware resource data into the target parameter prediction model, and predict the target parameters that the thread pool in the client needs to configure before processing the pending thread task through the target parameter prediction model; The processing module is configured to adjust the parameters of the thread pool to the target parameters, and process the thread tasks to be processed based on the adjusted thread pool.

[0007] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the method of the first aspect when the computer program is executed by a processor.

[0008] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method of the first aspect when executing the computer program.

[0009] In a fifth aspect, the present application provides a computer program product having a computer program stored thereon, which implements the method of the first aspect when the computer program is executed by a processor.

[0010] The present disclosure provides a method for processing thread tasks, a storage medium, an electronic device and a program product, wherein the method comprises: in response to a user triggering a thread task to be processed, obtaining the current hardware resource data of the client, the hardware resource data comprising the hardware configuration data and resource usage data of the client; identifying a target category corresponding to the thread task to be processed; determining a target parameter prediction model corresponding to the thread task to be processed from a plurality of parameter prediction models based on the target category, and inputting the hardware resource data into the target parameter prediction model, predicting the target parameters that need to be configured for the thread pool in the client when processing the thread task to be processed through the target parameter prediction model; adjusting the parameters of the thread pool to the target parameters, and processing the thread task to be processed based on the adjusted thread pool. Compared with the related art, the present application can predict the parameters of the thread pool based on the target category corresponding to the pending thread task and the hardware resource data of the client using the target parameter prediction model, comprehensively considering the hardware configuration of the environment in which the client software is deployed and the resource utilization before the task is executed, and then recommending the optimal thread pool parameters, that is, the predicted target parameters. Using the thread pool with configured target parameters to process the pending thread tasks can optimize the resource utilization of the system and avoid resource overload or waste. In addition, the present application can predict different target parameters for different pending thread tasks, that is, the present application uses dynamically adjusted thread pool parameters to make the present application highly adaptable and flexible.

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

[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0014] Figure 1 A schematic diagram of a process flow of a thread task processing method provided by an embodiment of the present application is shown; Figure 2 A schematic flow chart of another thread task processing method provided in an embodiment of the present application is shown; Figure 3 A schematic diagram showing an example provided by an embodiment of the present application; Figure 4 A schematic diagram showing an example provided by an embodiment of the present application; Figure 5 A schematic diagram showing an example provided by an embodiment of the present application; Figure 6 A schematic diagram showing an example provided by an embodiment of the present application; Figure 7 A schematic diagram showing an example provided by an embodiment of the present application; Figure 8 A schematic diagram of the structure of a thread task processing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0016] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0017] In today's software development field, multithreaded programming has become a key technology to improve program performance and responsiveness. As an important concept in multithreaded processing, thread pool is playing an indispensable role. In traditional single-threaded programs, the code is executed in sequence. However, with the development of computer hardware and the increasing complexity of software functions, single-threaded processing often cannot meet our requirements for program performance, and multithreaded programming has emerged. In multithreaded programming, there are uncontrolled risks and high resource overhead. Each creation and destruction of threads requires a certain amount of system resources, including memory allocation, initialization and other operations. If threads are created and destroyed frequently, these overheads will become very considerable, resulting in a decrease in the overall efficiency of the program. In addition, unlimited creation of threads may lead to system resource exhaustion, because each thread requires a certain amount of memory and other system resources. Moreover, too many threads may also increase the complexity of thread scheduling, which in turn affects the performance and stability of the program. The thread pool is a mechanism designed to solve the above-mentioned multithreaded programming problems. The thread pool is a thread management technology implemented using the idea of ​​pooling technology, mainly to reuse threads, conveniently manage threads and tasks, and decouple thread creation from task execution. We can create a thread pool to reuse already created threads to reduce resource consumption caused by frequent thread creation and destruction. However, the operation mechanism of the thread pool is not well understood, and it is highly correlated with the task type. The industry does not have some mature experience to effectively set thread pool parameters.

[0018] At present, the dynamic thread pool framework (DynamicTp) has emerged to address the limitations of parameter settings and effectiveness of thread pool parameter changes. It allows applications to dynamically adjust thread pool parameters through the configuration center during runtime, which can take effect in real time without restarting the application, and can implement monitoring and alarm functions. Create a thread pool through configuration or code, monitor the thread pool status and trigger alarms, and adapt to a variety of office platforms. It can dynamically adjust thread pool parameters through the configuration center and support multiple alarm dimensions, such as configuration change notifications, activity alarms, capacity threshold alarms, etc., to meet the needs of complex business scenarios.

[0019] In order to improve the technical problem that the thread pool configured with static parameters is used to process thread tasks in related technologies, which may lead to uneven resource utilization during task processing. This embodiment provides a method for processing thread tasks, such as Figure 1 As shown, the method comprises the following steps: Step 101: In response to a user triggering a pending thread task, obtain the current hardware resource data of the client.

[0020] The hardware resource data includes the client's hardware configuration data and resource usage data.

[0021] In an embodiment of the present application, a user-triggered thread task can be initiated by a user operation (such as clicking a button, submitting a form, etc.) to start one or more background threads to perform specific tasks, such as file uploading, data processing, network requests, etc.

[0022] In some examples, hardware configuration data includes, but is not limited to: central processing unit (CPU) model, number of cores, memory size, hard disk capacity and type, graphics card information, etc. Correspondingly, resource usage data usually refers to CPU utilization, memory usage, disk I / O, network traffic, etc. Resource usage data can help understand the real-time load status of the client.

[0023] Step 102: Identify the target category corresponding to the thread task to be processed.

[0024] For this embodiment, the target category corresponding to the thread task to be processed can be identified by a clustering model. The clustering model is an unsupervised learning method for grouping objects in a data set into a number of clusters so that objects in the same cluster are as similar as possible to each other, while objects in different clusters are as different as possible.

[0025] In an embodiment of the present application, the clustering model calculates the proportion of CPU, memory and other hardware resources used by different individual tasks based on historical key data, and clusters the task types based on these proportions. The clustering model of a certain type of task is determined by the mean proportion. The clustering model can be used to determine the target category corresponding to the thread task to be processed.

[0026] Step 103: Determine a target parameter prediction model corresponding to the pending thread task from multiple parameter prediction models based on the target category, input the hardware resource data into the target parameter prediction model, and use the target parameter prediction model to predict the target parameters that the thread pool in the client needs to configure when processing the pending thread task.

[0027] In some examples, each predetermined category corresponds to a parameter prediction model. The multiple parameter prediction models in the embodiments of the present application include a parameter prediction model corresponding to each predetermined category. That is, after determining the target category corresponding to the thread task to be processed, the embodiments of the present application need to determine the target parameter prediction model corresponding to the target category. The target parameter prediction model can be used to more accurately predict the target parameters that need to be configured by the thread pool in the client when processing the thread task to be processed.

[0028] For this embodiment, the thread pool is a design pattern that creates a group of reusable threads in advance to execute tasks, thereby avoiding the overhead caused by frequent creation and destruction of threads. This pattern can significantly improve the performance of the application, especially when a large number of short-lifecycle tasks need to be processed.

[0029] Optionally, the parameters of the thread pool may include but are not limited to: number of core threads (Core Pool Size), number of core threads (Core Pool Size), thread survival time (Keep Alive Time), task queue (Work Queue), rejection policy (Rejected Execution Handler), etc.

[0030] Step 104: Adjust the parameters of the thread pool to the target parameters, and process the thread tasks to be processed based on the adjusted thread pool.

[0031] In an embodiment of the present application, the parameters of the thread pool are adjusted to target parameters, and the thread tasks to be processed are processed based on the adjusted thread pool. This allows the embodiment of the present application to comprehensively consider the hardware configuration of the software deployment environment and the resource utilization before task execution to recommend optimal thread pool parameters, thereby optimizing the resource utilization of the system and avoiding resource overload or waste. It also allows the embodiment of the present application to predict the optimal thread pool parameters according to different hardware configurations, business scenarios, and task characteristics, and dynamically adjust the thread pool parameters, which has strong adaptability and flexibility.

[0032] Compared with the related art, this embodiment can predict the parameters of the thread pool based on the target category corresponding to the pending thread task and the hardware resource data of the client using the target parameter prediction model, comprehensively considering the hardware configuration of the environment in which the client software is deployed and the resource utilization before the task is executed, and then recommending the optimal thread pool parameters, that is, the predicted target parameters. Using the thread pool with configured target parameters to process the pending thread tasks can optimize the resource utilization of the system and avoid resource overload or waste. In addition, the present application can predict different target parameters for different pending thread tasks, that is, the present application uses dynamically adjusted thread pool parameters to make the present application highly adaptable and flexible.

[0033] Further, as a refinement and extension of the above embodiment, in order to specifically illustrate the training process of multiple parameter prediction models, the following methods may be used but are not limited to: Figure 2 As shown, the method includes: Step 201: Acquire historical key data stored in a predetermined storage location.

[0034] Among them, historical key data is the key data obtained by multiple clients through the distributed system architecture in the process of processing historical thread tasks. The historical key data includes task execution data, hardware configuration data and resource usage data.

[0035] In the embodiments of the present application, Figure 3 As shown in Figure 1, distributed software systems are widely deployed in multiple customer environments. These systems generate a large amount of data related to task execution during operation, such as task duration, task attributes, resource usage at a certain sampling interval during task operation (CPU, memory, network, graphics processing unit (GPU), disk utilization), hardware configuration (CPU, GPU, memory, hard disk, network bandwidth), thread pool parameters (number of core threads, maximum number of threads, blocking queue), etc. Through the cloud-edge collaborative architecture, these data scattered in various customer environments are reported to the cloud. The software system collects key data during task operation in real time through a lightweight data acquisition module. After local preprocessing, these data are uploaded to the centralized storage system in the cloud through a secure communication protocol. The cloud uses a distributed storage architecture (such as Alibaba Cloud OSS) to store the reported data with high availability and security. At the same time, a data processing framework (such as Apache Spark) is used to clean, standardize and extract features of massive data to prepare for subsequent model training. Big data analysis technology is used to deeply mine and preprocess massive reported data, extract key features, and provide high-quality data support for model training.

[0036] It should be noted that if Figure 3 The cloud-edge collaborative driven multimodal data collection architecture shown (i.e., the distributed system architecture in the embodiment of the present application) builds a hierarchical data collection system, deploys lightweight data collection agents on the edge side based on the local preprocessing of edge nodes and the cloud collaboration mechanism, samples heterogeneous data such as task time consumption, resource utilization (CPU / GPU / memory, etc.), hardware configuration, and thread pool parameters; processes, stores, and trains models for data uploaded by multiple clients on the cloud (server side). It can support secure fusion of cross-terminal data and joint optimization of models, and improve the generalization ability of models; reduce cloud load through edge computing, and reduce bandwidth consumption for data upload.

[0037] Specifically, Figure 4 As shown, the client may include a task management module, a hardware monitoring module and a resource usage monitoring module, wherein the task management module designs a thread pool based on a dynamic thread pool framework, is responsible for concurrently executing tasks corresponding to different functions, and records the type of tasks executed each time, task volume, task start time, task creation time, task end time, task status, thread pool parameters and other information, that is, the task execution data in the embodiment of the present application can be obtained. The hardware monitoring module is responsible for obtaining and recording the hardware indicators of the deployed environment, including the number of CPU cores, memory capacity, storage device information, graphics card and network bandwidth, etc., that is, the hardware configuration data in the embodiment of the present application can be obtained; the resource usage monitoring module is responsible for regularly collecting resource usage at a certain time interval before, during and after the task is run, including CPU utilization, memory utilization, disk utilization, etc., that is, the resource usage data in the embodiment of the present application can be obtained.

[0038] As an alternative, Figure 4 As shown, the embodiment of the present application may also include a data acquisition module, which is responsible for integrating key data of the task management module, the hardware monitoring module, and the resource usage monitoring module. After local pre-processing, these data are regularly uploaded to the centralized storage system in the cloud through a secure communication protocol.

[0039] Step 202: pre-process the historical key data to obtain sample data for training multiple parameter prediction models.

[0040] Optionally, step 202 may specifically include: determining the time series data corresponding to each piece of historical key data in the historical key data; inputting the time series data into a preset detection model, determining the reconstruction error of the time series data in the preset detection model, and when it is determined that the reconstruction error is greater than a predetermined reconstruction error threshold, determining the corresponding time series data as abnormal time series data; removing the abnormal historical key data corresponding to the abnormal time series data in the historical key data, and determining the remaining historical key data as sample data.

[0041] The array in the time series data includes the time point and task indicator value corresponding to each historical key data.

[0042] In the embodiment of the present application, each piece of sample data has a unique ID, a timestamp, and then each part is a sub-object. Specifically, the time series data uses an array structure to record the time point and the corresponding indicator value.

[0043] In some examples, preprocessing the historical key data may include removing outliers (such as invalid data with CPU usage exceeding 100%) and filling missing values ​​(such as linear interpolation or filling based on data of similar tasks).

[0044] Specifically, Figure 5 As shown, the long short-term memory autoencoder (LSTM-Autoencoder) can be used to detect abnormal resource usage patterns for preprocessing historical key data. This detection is an anomaly detection method based on deep learning, which combines the advantages of long short-term memory network (LSTM) and autoencoder (Autoencoder) to identify abnormal patterns in time series data. The LSTM-Autoencoder is trained using resource usage data under normal conditions so that it learns the time series characteristics under normal mode. After the model training is completed, the new resource usage data is input into the model. If the reconstruction error of the model is significantly higher than the reconstruction error of normal data, the data point is considered to be abnormal. By detecting the time series data of resource indicators in the sample data, invalid samples are eliminated, and samples with wrong task status are eliminated, the sample data in the embodiment of the present application is obtained, and the subsequent model training using the obtained sample data can increase the accuracy of the model training.

[0045] It should be noted that if Figure 5 The abnormal resource pattern detection and sample purification mechanism based on LSTM-Autoencoder shown in the figure performs abnormality detection on the resource utilization time series data during task execution by designing a bidirectional LSTM-Autoencoder time series reconstruction model. If the reconstruction error of the model is significantly higher than the reconstruction error of normal data, the data point is considered to be abnormal. By detecting the time series data of resource indicators in the sample data, invalid samples are eliminated. This allows the embodiment of the present application to improve abnormality detection through joint modeling of spatiotemporal features (LSTM captures long time series dependencies, and Autoencoder learns potential patterns).

[0046] Step 203: extract features from the sample data to obtain feature information corresponding to the sample data.

[0047] Optionally, step 203 may specifically include: determining at least one feature extraction type corresponding to the sample data; and extracting task execution features, hardware configuration features, and resource usage features from the sample data based on the at least one feature extraction type.

[0048] In an embodiment of the present application, at least one feature extraction type may include numerical, continuous, time series, etc. Specifically, the process of feature extraction may include: directly retaining the numerical features (CPU core number, memory capacity, etc.) in the hardware configuration data and performing normalization (such as Z-Score processing); segmented encoding of network bandwidth and hard disk type (SSD / HDD); One-Hot encoding of task types; extracting statistical features (mean, standard deviation, maximum value, minimum value, quantile, upward / downward trend (linear fitting slope) and time series features (sliding window trend) of resource utilization; calculating the task time (end time-creation time), and logarithmically transforming the task time (alleviating long-tail distribution); directly retaining the numerical features of the execution number and standardizing it; standardizing or normalizing the thread pool numerical parameters (core thread number, queue length, etc.), and performing category encoding (Label Encoding) of the queue type.

[0049] Step 204: Analyze resource usage of multiple clients based on the feature information, and cluster the sample data using a preset clustering model based on the resource usage.

[0050] Optionally, step 204 may specifically include: performing analysis based on task execution characteristics, hardware configuration characteristics, and resource usage characteristics to obtain processor usage data, memory usage data, and hard disk usage data of multiple clients; normalizing the processor usage data, memory usage data, and hard disk usage data, respectively, to obtain a processor normalization weight corresponding to the processor usage data, a memory normalization weight corresponding to the memory usage data, and a hard disk normalization weight corresponding to the hard disk usage data; clustering the sample data according to predetermined categories in a preset clustering model based on the processor normalization weight, the memory normalization weight, and the hard disk normalization weight.

[0051] In the embodiment of the present application, it is necessary to calculate the usage of CPU, memory, hard disk and other hardware resources by specific types of tasks based on task execution characteristics, hardware configuration characteristics and resource usage characteristics, that is, the processor usage data, memory usage data and hard disk usage data in the embodiment of the present application; calculate the normalized weight of each hardware resource used when the task is running (weight = the resource integral area / total integral area). Then, different types of tasks are clustered according to the weight value of the hardware resources (such as the improved K-means++ algorithm), and the task types are divided into several large categories as a whole (such as "CPU intensive (category A)", "memory-hard disk balanced (class B)", "high CPU-low memory burst (class C)" or "stable GPU-network sensitive (class D)"), that is, the predetermined categories in the embodiment of the present application.

[0052] It should be noted that the multi-dimensional resource weight-driven task classification clustering algorithm calculates the normalized weights of CPU, memory, hard disk and other resources for each task type (weight = the resource integral area / total integral area) by designing a heterogeneous resource weight adaptive allocation mechanism, and builds a multi-objective weighted clustering model (such as the improved K-means++ algorithm) based on this, and divides the tasks into categories with highly cohesive hardware usage patterns (such as "CPU intensive (category A)", "memory-hard disk balanced (category B)", "high CPU-low memory burst (category C)" or "stable GPU-network sensitive (category D)"). The embodiment of the present application realizes a strong correlation between task classification and underlying hardware characteristics through multi-resource coupling weight analysis. Compared with the traditional single-indicator classification method, it can improve the similarity of task resource patterns within the category and improve classification accuracy; it supports dynamic expansion of resource dimensions (such as adding GPU indicators), and the classification model does not need to be reconstructed, only the weight calculation logic needs to be adjusted.

[0053] Optionally, when performing analysis based on task execution characteristics, hardware configuration characteristics, and resource usage characteristics to obtain processor usage data, memory usage data, and hard disk usage data of multiple clients, it may specifically include: determining, based on the task execution characteristics, hardware configuration characteristics, and resource usage characteristics, a first normal distribution curve corresponding to the use of the processor, a second normal distribution curve corresponding to the use of the memory, and a third normal distribution curve corresponding to the use of the hard disk of multiple clients in the process of executing thread tasks; obtaining the processor usage data based on the first normal distribution curve, obtaining the memory usage data based on the second normal distribution curve, and obtaining the hard disk usage data based on the third normal distribution curve.

[0054] For this embodiment, the process of respectively obtaining processor usage data, memory usage data, and hard disk usage data by analyzing task execution characteristics, hardware configuration characteristics, and resource usage characteristics may include: selecting task data corresponding to each task type involved and executing the task with a task amount of 1, and recording the numerical points of resource usage rate at a certain time interval when a single task type is executed ( ), the following formula 1 shows that the use of each resource by a single task conforms to the normal distribution, such as Figure 6 As shown, the recorded data is used to fit the normal distribution curve of the corresponding resource usage of the current task type, and the integral area within 3 standard deviations of the mean is calculated as the usage of the corresponding resource, that is, the usage corresponding to the processor usage data, memory usage data and hard disk usage data in the embodiment of the present application, and the formula 1 is specifically as follows: (Formula 1) In formula 1, Represents the average usage of resources (calculated by the following formula 2), Indicates the standard deviation of resource usage (calculated using Formula 3 below), The formula for calculating the average resource usage is as shown in Formula 2 below: (Formula 2) The calculation formula for the standard deviation of resource usage is shown in Formula 3 below: (Formula 3) The resource usage calculation formula is shown in Formula 4 below: (Formula 4) It should be noted that if Figure 6 The fine-grained resource usage quantification method based on normal distribution fitting is shown. By fitting the resource usage time series data (such as CPU, memory, hard disk, etc.) collected periodically during the execution of a single task, a normal distribution curve is constructed, and the integral area within the mean ±3σ interval (covering 99.7% probability density) is calculated as a quantitative indicator of resource consumption. This enables the embodiment of the present application to break through the traditional resource evaluation mode based on the mean or peak value, and accurately characterize the dynamic occupation characteristics of hardware resources by tasks through integral quantification; combined with 3σ interval truncation, occasional noise interference (such as instantaneous CPU glitches) can be effectively eliminated, which can reduce resource evaluation errors.

[0055] Step 205: Perform model training based on the clustering results, resource usage and preset resource usage thresholds to obtain parameter prediction models corresponding to each category in the predetermined categories to form multiple parameter prediction models.

[0056] Optionally, step 205 may specifically include: performing model training on sample data of each category according to the processor resource usage threshold, memory resource usage threshold and hard disk resource usage threshold of each category in the predetermined category, and obtaining a parameter prediction model corresponding to each category to form multiple parameter prediction models.

[0057] In some examples, the sample data is classified according to the classification results in the task classification module. The random forest algorithm can be used to determine the order of nodes and train the model in combination with the usage weights of each category of tasks for each resource in the task classification results; reinforcement learning can be used in combination with resource usage thresholds for model training. Specifically, the threshold setting reference is: A healthy system CPU utilization should be maintained between 30% and 70%. When the CPU utilization continues to exceed 70%, performance problems may begin to occur. Memory usage should generally be maintained between 50% and 80%. Memory usage within this range indicates that the system has enough space to handle the current task, while also reserving some resources to cope with sudden high load conditions. Disk utilization should be maintained within a reasonable range, usually not exceeding 80%; Lightweight Gradient Boosting Machine (LightGBM) multi-output regression algorithm can also be used to train the optimal thread parameter prediction model for the corresponding task category with short total task time and full and safe resource utilization.

[0058] Furthermore, the method of this embodiment also includes: identifying the target category through a preset clustering model, and if it is determined that the target category does not belong to the predetermined category, obtaining the predetermined parameters corresponding to the thread pool; adjusting the parameters of the thread pool to the predetermined parameters, and processing the thread tasks to be processed based on the adjusted thread pool.

[0059] In the embodiment of the present application, the predetermined parameters may be default parameters pre-configured for the thread pool, or may be parameters used by the thread pool to process a task last time. The specific values ​​of the predetermined parameters are not limited in the embodiment of the present application.

[0060] Optionally, before executing step 103, the method of this embodiment also includes: based on the hardware resource data, determining whether the client has a resource overload situation; correspondingly, step 103 specifically also includes: if it is determined that the client does not have a resource overload situation, inputting the hardware resource data into the target parameter prediction model, and predicting the target parameters through the target parameter prediction model.

[0061] Optionally, the method of this embodiment further includes: if it is determined that the client has a resource overload situation, adjusting the parameters of the thread pool to predetermined parameters, and processing the thread tasks to be processed based on the adjusted thread pool.

[0062] In some examples, judging whether a client has resource overload may specifically include, but not limited to, judging the following parameters: 1. CPU usage; Normal: CPU usage should be kept within a reasonable range. For most applications, a long period of more than 80% may indicate a problem. Overload symptoms: If the CPU usage continues to approach or reach 100%, it indicates that the system may be experiencing a high load, resulting in increased response time or even freezes. 2. Memory usage; Normal: The system's physical memory should be sufficient to support all currently running applications, and the usage of swap files (Swap) should be low. Overload symptoms: If the memory usage is too high or the swap space is frequently used, this may be a sign of insufficient memory, resulting in performance degradation. 3. Disk I / O; Normal: Disk read and write operations should be completed within an acceptable delay. Overload symptoms: Long high disk I / O wait times, frequent disk errors, or full disks may all be signs of resource shortages, etc.

[0063] Optionally, before executing step 104, the method of this embodiment also includes: performing a security check on the target parameters; accordingly, step 104 may specifically include: when it is determined that the target parameters meet the predetermined security check conditions, adjusting the configuration parameters of the predetermined thread pool framework to the target parameters through the application programming interface of the predetermined thread pool framework in the thread pool, and processing the thread tasks to be processed based on the adjusted thread pool.

[0064] In some examples, such as Figure 4 As shown, the client in the embodiment of the present application may also include a task management module. Specifically, the task management module integrates a dynamic thread pool framework (DynamicTp). By adding dependencies, the basic parameters of DynamicTp (including the basic parameters of the thread pool, such as the number of core threads, the maximum number of threads, the queue type and capacity, etc.) are configured in the configuration file. Threads are defined in the code through annotations or programmatically. When the optimal thread pool parameters are predicted (such as corePoolSize=8, maxPoolSize=20, queueCapacity=200), the parameters can be actively updated through the application programming interface (API) provided by DynamicTp. This adjustment mechanism can realize dynamic adjustment of thread pool parameters in a non-invasive manner.

[0065] It should be noted that the real-time control system of thread pool parameters based on dynamic feedback implements the following closed-loop control mechanism by integrating the DynamicTp enhanced dynamic thread pool framework, including: the dynamic perception layer monitors the thread pool status (queue accumulation rate, task rejection rate) in real time through lightweight probes; the hot update mechanism uses bytecode injection technology to achieve adjustment of thread pool parameters without service interruption; this enables the embodiment of the present application to support dynamic adaptation of parameters in high-concurrency scenarios, and improves system throughput.

[0066] Optionally, the method of this embodiment further includes: when it is determined that the target parameters do not meet the predetermined security verification conditions, adjusting the configuration parameters of the predetermined thread pool framework to predetermined parameters, and processing the thread tasks to be processed based on the adjusted thread pool.

[0067] Optionally, the method of this embodiment further includes: collecting key data of the client in the process of processing the pending thread task; and sending the key data to the server according to a predetermined sending cycle based on the distributed system architecture.

[0068] Among them, the key data includes task execution data, hardware configuration data and resource usage data, and the server is used to uniformly store the key data in a predetermined storage location.

[0069] In an embodiment of the present application, the data acquisition module of the client in the embodiment of the present application is responsible for integrating the key data of the task management module, the hardware monitoring module, and the resource usage monitoring module. After local pre-processing, these data are regularly uploaded to the centralized storage system in the cloud through a secure communication protocol.

[0070] For example, Figure 7 As shown, the client in the embodiment of the present application can adjust the thread pool parameters adaptively according to the real-time data, and can dynamically adjust the thread pool parameters, involving the steps of task triggering, task category, resource evaluation, model prediction, parameter adjustment and task execution. When a user triggers a batch task, after obtaining the corresponding task category through the classification model, the thread pool parameters of the corresponding task category are obtained through the thread pool optimal parameter prediction model according to the corresponding task category combined with the current hardware resources and the current resource utilization rate, and the thread pool parameters of the dynamic task are adjusted according to the output optimal thread pool parameters, and then the task is executed.

[0071] It should be noted that the setting of the optimal parameters of the thread pool is greatly affected by the type of task and the hardware configuration. At present, the relevant technology mainly divides the task type into CPU-intensive and IO-intensive, and gives a rough calculation formula for the number of core threads, but this method is not applicable to actual software scenarios. The classification of tasks cannot be considered as either CPU-intensive or IO-intensive, and the thread pool parameters include not only the number of core threads but also the maximum number of threads, blocking queues, survival time, etc., which have many influencing factors and complex parameter settings. The industry does not have some mature experience to effectively set the thread pool parameters. The embodiment of the present application aims to solve the above problems, and proposes a method for more practical classification of task types, how to determine the optimal thread pool parameters based on task classification, and ensure safe and efficient use of the thread pool.

[0072] In some examples, the embodiments of the present application propose a complete set of intelligent thread pool parameter dynamic control methods and systems, which mainly include six modules: task management module, hardware monitoring module, resource usage monitoring module, data acquisition module, task classification module and thread pool optimal parameter prediction module, and describe how these six modules work. The patent covers the task classification method, data collection method, data processing method, specific steps of model training, dynamic adjustment mechanism, and the architecture of the entire system. The embodiments of the present application can improve the accuracy of thread pool parameter prediction. Specifically, the original thread pool parameter prediction method uses the same thread pool parameter prediction model for various task types. However, the thread pool parameters are greatly affected by the nature of the task, which will interfere with the training of the model. The task classification module classifies tasks before training the prediction model, and calculates the usage of each resource for each task type as a weight based on the normal distribution fitting usage rate, clusters the weights to obtain task categories, and divides the collected historical task data into different training sets for model training according to the task category, which can further improve the accuracy of the thread pool optimal parameter prediction model; it can also improve resource utilization optimization. Specifically, the embodiment of the present application comprehensively considers the hardware configuration of the software deployment environment and the resource utilization before task execution to recommend the optimal thread pool parameters, and the resource utilization of the system is optimized to avoid resource overload or waste; it can also enhance adaptability. Specifically, the present application can predict the optimal thread pool parameters according to different hardware configurations, business scenarios and task characteristics, and dynamically adjust the thread pool parameters, which has strong adaptability and flexibility; it can also automatically predict the optimal thread pool parameters through a machine learning model to improve system performance; data collection is based on a cloud-edge collaborative architecture, and the key data of the task running process is collected in real time through the data collection module of the software system deployed on each client terminal in combination with the monitoring module. After local preprocessing, these data are uploaded to the centralized storage system in the cloud through a secure communication protocol. It is used for model training, which can not only tap the value of historical data, but also improve the generalization ability of the model.

[0073] Compared with the related art, this embodiment can predict the parameters of the thread pool based on the target category corresponding to the pending thread task and the hardware resource data of the client using the target parameter prediction model, comprehensively considering the hardware configuration of the environment in which the client software is deployed and the resource utilization before the task is executed, and then recommending the optimal thread pool parameters, that is, the predicted target parameters. Using the thread pool with configured target parameters to process the pending thread tasks can optimize the resource utilization of the system and avoid resource overload or waste. In addition, the present application can predict different target parameters for different pending thread tasks, that is, the present application uses dynamically adjusted thread pool parameters to make the present application highly adaptable and flexible.

[0074] The embodiment of the present application also provides a thread task processing device, such as Figure 8 As shown, the device includes: an acquisition module 31, an identification module 32, a prediction module 33, and a processing module 34.

[0075] The acquisition module 31 is configured to acquire the current hardware resource data of the client in response to the user triggering the pending thread task, where the hardware resource data includes the hardware configuration data and resource usage data of the client; An identification module 32, configured to identify a target category corresponding to a thread task to be processed; The prediction module 33 is configured to determine a target parameter prediction model corresponding to the pending thread task from multiple parameter prediction models based on the target category, input the hardware resource data into the target parameter prediction model, and predict the target parameters that the thread pool in the client needs to configure before processing the pending thread task through the target parameter prediction model; The processing module 34 is configured to adjust the parameters of the thread pool to the target parameters, and process the thread tasks to be processed based on the adjusted thread pool.

[0076] In some examples of the present embodiment, the prediction module 33 is specifically configured to obtain historical key data stored in a predetermined storage location, where the historical key data is key data obtained by multiple clients through a distributed system architecture in the process of processing historical thread tasks, and the historical key data includes task execution data, hardware configuration data, and resource usage data; preprocess the historical key data to obtain sample data for training multiple parameter prediction models; extract features from the sample data to obtain feature information corresponding to the sample data; analyze resource usage of multiple clients based on the feature information, and cluster the sample data based on the resource usage through a preset clustering model; perform model training based on the clustering results, resource usage, and preset resource usage thresholds to obtain parameter prediction models corresponding to each category in the predetermined category to form multiple parameter prediction models.

[0077] In some examples of the present embodiment, the prediction module 33 is further specifically configured to determine the time series data corresponding to each piece of historical key data in the historical key data, the array in the time series data including the time point and task indicator value corresponding to each piece of historical key data; input the time series data into a preset detection model, determine the reconstruction error of the time series data in the preset detection model, and when it is determined that the reconstruction error is greater than a predetermined reconstruction error threshold, determine the corresponding time series data as abnormal time series data; remove the abnormal historical key data corresponding to the abnormal time series data in the historical key data, and determine the remaining historical key data as sample data.

[0078] In some examples of this embodiment, the prediction module 33 is further configured to determine at least one feature extraction type corresponding to the sample data; based on the at least one feature extraction type, extract task execution features, hardware configuration features and resource usage features from the sample data.

[0079] In some examples of the present embodiment, the prediction module 33 is further specifically configured to perform analysis based on task execution characteristics, hardware configuration characteristics, and resource usage characteristics to obtain processor usage data, memory usage data, and hard disk usage data of multiple clients; normalize the processor usage data, memory usage data, and hard disk usage data, respectively, to obtain a processor normalization weight corresponding to the processor usage data, a memory normalization weight corresponding to the memory usage data, and a hard disk normalization weight corresponding to the hard disk usage data; cluster the sample data according to predetermined categories in a preset clustering model based on the processor normalization weight, the memory normalization weight, and the hard disk normalization weight.

[0080] In some examples of the present embodiment, the prediction module 33 is further specifically configured to determine, based on task execution characteristics, hardware configuration characteristics, and resource usage characteristics, a first normal distribution curve corresponding to the use of the processor, a second normal distribution curve corresponding to the use of the memory, and a third normal distribution curve corresponding to the use of the hard disk by multiple clients in the process of executing thread tasks; obtain processor usage data based on the first normal distribution curve, obtain memory usage data based on the second normal distribution curve, and obtain hard disk usage data based on the third normal distribution curve.

[0081] In some examples of this embodiment, the prediction module 33 is further specifically configured to perform model training on the sample data of each category according to the processor resource usage threshold, memory resource usage threshold and hard disk resource usage threshold of each category in the predetermined category, and obtain a parameter prediction model corresponding to each category to form multiple parameter prediction models.

[0082] In some examples of this embodiment, the identification module 32 is specifically configured to identify the target category through a preset clustering model; accordingly, the identification module 32 is also configured to obtain predetermined parameters corresponding to the thread pool if it is determined that the target category does not belong to the predetermined category; adjust the parameters of the thread pool to the predetermined parameters, and process the thread tasks to be processed based on the adjusted thread pool.

[0083] In some examples of this embodiment, the prediction module 33 is also configured to determine whether the client has a resource overload situation based on the hardware resource data; accordingly, the prediction module 33 is further configured to input the hardware resource data into the target parameter prediction model if it is determined that the client does not have a resource overload situation, and predict the target parameters through the target parameter prediction model.

[0084] In some examples of this embodiment, the processing module 34 is further configured to adjust the parameters of the thread pool to predetermined parameters if it is determined that the client has a resource overload situation, and process the thread tasks to be processed based on the adjusted thread pool.

[0085] In some examples of the present embodiment, the processing module 34 is further configured to perform a security check on the target parameters; accordingly, the processing module 34 is further configured to, when it is determined that the target parameters meet the predetermined security check conditions, adjust the configuration parameters of the predetermined thread pool framework to the target parameters through the application programming interface of the predetermined thread pool framework in the thread pool, and process the thread tasks to be processed based on the adjusted thread pool; when it is determined that the target parameters do not meet the predetermined security check conditions, adjust the configuration parameters of the predetermined thread pool framework to the predetermined parameters, and process the thread tasks to be processed based on the adjusted thread pool.

[0086] In some examples of this embodiment, the processing module 34 is also configured to collect key data of the client during the process of processing the pending thread tasks; based on the distributed system architecture, the key data is sent to the server according to a predetermined sending cycle, and the server is used to uniformly store the key data in a predetermined storage location.

[0087] It should be noted that for other corresponding descriptions of the functional units involved in the thread task processing device provided in this embodiment, reference can be made to Figure 1 The corresponding description in will not be repeated here.

[0088] Based on the above Figure 1 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 The method shown.

[0089] Based on the above Figure 1 The method shown in the embodiment also provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 The method shown.

[0090] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0091] Based on the above Figure 1 The method shown, and Figure 8In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, such as a personal computer, a server, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 The method shown.

[0092] In some embodiments, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may include a standard wired interface, a wireless interface (such as a WI-FI interface), etc. in some embodiments.

[0093] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0094] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or can be implemented by hardware. By applying the scheme of this embodiment, compared with the related art, the present embodiment can predict the parameters of the thread pool based on the target category corresponding to the pending thread task and the hardware resource data of the client using the target parameter prediction model, comprehensively considers the hardware configuration of the environment where the client software is deployed and the resource utilization before the task is executed, and then recommends the best thread pool parameters, that is, the predicted target parameters, and uses the thread pool configured with the target parameters to process the pending thread task to optimize the resource utilization of the system, avoiding the situation of resource overload or waste, in addition, the present application can predict different target parameters for different pending thread tasks, that is, the present application uses the dynamically adjusted thread pool parameters to make the present application have strong adaptability and flexibility.

[0096] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0097] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.

Claims

1. A method for processing thread tasks, characterized in that: include: In response to a user triggering a pending thread task, obtaining current hardware resource data of the client, the hardware resource data including hardware configuration data and resource usage data of the client; Identify the target category corresponding to the pending thread task; Determine a target parameter prediction model corresponding to the pending thread task from a plurality of parameter prediction models based on the target category, input the hardware resource data into the target parameter prediction model, and predict the target parameters that the thread pool in the client needs to configure when processing the pending thread task through the target parameter prediction model; The parameters of the thread pool are adjusted to the target parameters, and the to-be-processed thread tasks are processed based on the adjusted thread pool.

2. The method according to claim 1, characterized in that The training process of the multiple parameter prediction models includes: Acquire historical key data stored in a predetermined storage location, wherein the historical key data is key data obtained by a plurality of clients through a distributed system architecture in a process of processing historical thread tasks, and the historical key data includes task execution data, hardware configuration data, and resource usage data; Preprocessing the historical key data to obtain sample data for training the multiple parameter prediction models; Extracting features from the sample data to obtain feature information corresponding to the sample data; Analyzing resource usage of the multiple clients based on the feature information, and clustering the sample data using a preset clustering model based on the resource usage; Model training is performed based on the clustering results, the resource usage and the preset resource usage threshold, and the parameter prediction model corresponding to each category in the predetermined category is obtained to form the multiple parameter prediction models.

3. The method according to claim 2, characterized in that The preprocessing of the historical key data to obtain sample data for training the multiple parameter prediction models includes: Determine the time series data corresponding to each piece of the historical key data, wherein the array in the time series data includes the time point and the task indicator value corresponding to each piece of the historical key data; Inputting the time series data into a preset detection model, determining a reconstruction error of the time series data in the preset detection model, and determining the corresponding time series data as abnormal time series data when it is determined that the reconstruction error is greater than a predetermined reconstruction error threshold; The abnormal historical key data corresponding to the abnormal time series data in the historical key data are removed, and the remaining historical key data are determined as the sample data.

4. The method according to claim 2, characterized in that: The extracting features from the sample data to obtain feature information corresponding to the sample data includes: Determining at least one feature extraction type corresponding to the sample data; According to the at least one feature extraction type, task execution features, hardware configuration features and resource usage features are extracted from the sample data.

5. The method according to claim 4, characterized in that The analyzing the resource usage of the plurality of clients based on the characteristic information, and clustering the sample data using a preset clustering model based on the resource usage, includes: Analyze based on the task execution characteristics, the hardware configuration characteristics and the resource usage characteristics to obtain processor usage data, memory usage data and hard disk usage data of the multiple clients; Normalizing the processor usage data, the memory usage data, and the hard disk usage data respectively to obtain a processor normalization weight corresponding to the processor usage data, a memory normalization weight corresponding to the memory usage data, and a hard disk normalization weight corresponding to the hard disk usage data; The sample data is clustered according to the predetermined category in the preset clustering model based on the processor normalization weight, the memory normalization weight and the hard disk normalization weight.

6. The method according to claim 5, characterized in that The analysis based on the task execution characteristics, the hardware configuration characteristics and the resource usage characteristics to obtain the processor usage data, memory usage data and hard disk usage data of the multiple clients includes: Determine, based on the task execution characteristics, the hardware configuration characteristics and the resource usage characteristics, a first normal distribution curve corresponding to the processor usage, a second normal distribution curve corresponding to the memory usage and a third normal distribution curve corresponding to the hard disk usage of the multiple clients in the process of executing the thread tasks; The processor usage data is obtained according to the first normal distribution curve, the memory usage data is obtained according to the second normal distribution curve, and the hard disk usage data is obtained according to the third normal distribution curve.

7. The method according to claim 5, characterized in that The model training is performed according to the clustering result, the resource usage and the preset resource usage threshold to obtain the multiple parameter prediction models, including: Model training is performed on sample data of each category according to the processor resource usage threshold, memory resource usage threshold and hard disk resource usage threshold of each category in the predetermined category, and a parameter prediction model corresponding to each category is obtained to form the multiple parameter prediction models.

8. The method according to claim 1, characterized in that The identifying the target category corresponding to the to-be-processed thread task includes: Identifying the target category by using a preset clustering model; After identifying the target category corresponding to the to-be-processed thread task, the method further includes: If it is determined that the target category does not belong to the predetermined category, obtaining predetermined parameters corresponding to the thread pool; The parameters of the thread pool are adjusted to predetermined parameters, and the to-be-processed thread tasks are processed based on the adjusted thread pool.

9. The method according to claim 1, characterized in that: Before inputting the hardware resource data into the target parameter prediction model and predicting the target parameters that the thread pool in the client needs to configure before processing the thread task to be processed by the target parameter prediction model, the method further includes: Based on the hardware resource data, determining whether the client has a resource overload condition; The step of inputting the hardware resource data into the target parameter prediction model and predicting the target parameters that need to be configured for the thread pool in the client before processing the thread task to be processed by the target parameter prediction model includes: If it is determined that the client does not have a resource overload situation, the hardware resource data is input into the target parameter prediction model, and the target parameter is predicted by the target parameter prediction model.

10. The method according to claim 9, characterized in that The method further comprises: If it is determined that the client has a resource overload situation, the parameters of the thread pool are adjusted to predetermined parameters, and the to-be-processed thread tasks are processed based on the adjusted thread pool.

11. The method according to claim 9, characterized in that Before adjusting the parameters of the thread pool to the target parameters and processing the to-be-processed thread tasks based on the adjusted thread pool, the method further includes: Performing safety verification on the target parameters; The step of adjusting the parameters of the thread pool to the target parameters and processing the to-be-processed thread tasks based on the adjusted thread pool includes: When it is determined that the target parameter meets the predetermined safety verification condition, the configuration parameters of the predetermined thread pool framework are adjusted to the target parameter through the application programming interface of the predetermined thread pool framework in the thread pool, and the to-be-processed thread task is processed based on the adjusted thread pool; When it is determined that the target parameter does not meet the predetermined safety verification condition, the configuration parameters of the predetermined thread pool framework are adjusted to the predetermined parameters, and the to-be-processed thread tasks are processed based on the adjusted thread pool.

12. The method according to claim 1, characterized in that The method further comprises: Collecting key data of the client in the process of processing the pending thread task; Based on the distributed system architecture, the key data is sent to the server according to a predetermined sending cycle, and the server is used to uniformly store the key data in a predetermined storage location.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

14. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 12 is implemented.

15. A computer program product having a computer program stored thereon, characterized in that: When the computer program product is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Thread scheduling system, computer equipment and storage medium

    CN112445615A

  • Task dynamic adjustment method and device, and equipment

    CN112882818A

  • Thread pool scheduling method, system and device and readable storage medium

    CN115016916A

  • Method, device and equipment for dynamically creating thread pool and storage medium

    CN115269196A

  • Multi-terminal wireless communication method of application thread pool

    CN117119034A

Cited By

  • Heterogeneous GPU cluster scheduling optimization method and system based on resource affinity

    CN120256139A

  • Server data supervision method and electronic equipment

    CN120849222A