A parallel strategy adjustment system and method based on time series prediction

Through the parallel strategy adjustment system based on time series prediction, dynamically adjusting the GPU parallel strategy, the problems of insufficient utilization of computing resources and reduced response speed caused by the inability to detect the number of front-end service requests in the prior art are solved, and more efficient computing resource utilization and response speed are achieved.

CN118981368BActive Publication Date: 2025-03-07青岛国实科技集团有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411471544.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-03-07
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

The prior art cannot detect the number of front-end service requests, resulting in the inability to effectively adjust the parallel strategy, resulting in insufficient utilization of computing resources or reduced response speed.

Method used

A parallel strategy adjustment system based on time series prediction is adopted, and the front-end service request is obtained through the data acquisition module. The time series prediction module establishes a prediction model, predicts the number of service requests, and selects a suitable GPU parallel strategy based on the prediction results.

Benefits of technology

By dynamically adjusting the GPU parallel strategy by predicting the number of service requests, it can accelerate processing speed when the front-end service requests are small, ensure the response speed of each request when the number of requests is large, and maximize the computing resource utilization rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981368B_ABST
    Figure CN118981368B_ABST
Patent Text Reader

Abstract

The invention relates to a parallel strategy adjustment system and method based on time series prediction, belonging to the field of data processing technology, comprising obtaining a front-end business request, adding the front-end business request to a task queue; configuring a time granularity, establishing a time series prediction model, running the time series prediction model according to the time granularity, and predicting the number of business requests in the next time window; selecting a GPU parallel strategy according to the predicted number of business requests; generating a working thread based on the selected GPU parallel strategy, taking out the front-end business request from the task queue, executing the parallel computing task of the front-end business request, predicting the number of business requests through the time series prediction model and selecting a suitable GPU parallel strategy, so that computing resources can be flexibly configured according to changes in the amount of front-end business requests, avoiding waste of resources, accelerating the processing speed when the amount of front-end business requests is small, and ensuring the response speed of each request when the amount of front-end business requests is large.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a parallel strategy adjustment system and method based on time series prediction. Background Art

[0002] With the rapid development of artificial intelligence technology, GPU has been widely used due to its powerful parallel computing capabilities. Compared with traditional CPUs, GPU has thousands of cores and can process large amounts of data at the same time, greatly accelerating the training process of machine learning and deep neural networks. Therefore, GPU has become one of the key technologies to promote the development of artificial intelligence. Whether in self-driving cars, speech recognition, image analysis or complex scientific calculations, GPU provides the necessary computing power.

[0003] However, in actual business scenarios, when the GPU processes the amount of computing front-end business requests, the amount of front-end business requests often fluctuates. Since it is impossible to detect the number of front-end business requests, it is impossible to make a good adjustment to the parallel strategy, resulting in insufficient utilization of computing resources or a decrease in response speed. For example, in the distributed training task scheduling method, system and device for intelligent computing in CN115248728A, each subtask is assigned to the GPU of a matching computing node for training according to the resource consumption information of each subtask and the GPU operation status of multiple computing nodes, and a communication topology between each subtask is constructed. In the process of training the corresponding subtask of the GPU of each computing node, the computing resource operation status of the GPU of each computing node is monitored, and the scheduling of subtasks is controlled according to the computing resource operation status of the GPU of all computing nodes. The GPU is often first run and then the GPU resource operation status is detected, and then the task scheduling is adjusted, which is easy to cause a certain response time delay, and if too many parallel tasks have been run before the GPU resource status is monitored, it may cause a waste of GPU resources. Summary of the invention

[0004] In view of the shortcomings existing in the related technologies, the purpose of the present invention is to provide a parallel strategy adjustment system and method based on time series prediction, so as to solve the technical problem that the prior art cannot detect the number of front-end business requests and thus cannot make a good adjustment to the parallel strategy, resulting in insufficient utilization of computing resources or decreased response speed.

[0005] The present invention provides a parallel strategy adjustment system based on time series prediction, comprising:

[0006] Data collection module: obtains front-end business requests, writes the front-end business requests into the database, and adds the front-end business requests to the task queue;

[0007] Time series prediction module: configure the time granularity, train the data of the front-end business request through the time series prediction algorithm to establish a time series prediction model, run the time series prediction model according to the time granularity, and predict the number of business requests in the next time window at the current time point;

[0008] A parallel strategy adjustment module: selecting a GPU parallel strategy according to the number of business requests predicted by the time series prediction model;

[0009] GPU parallel execution module: activates the working thread based on the selected GPU parallel strategy, takes out the front-end business request from the task queue, and executes the parallel computing task of the front-end business request;

[0010] The GPU parallel strategy includes:

[0011] The first GPU parallel strategy is used to use a single GPU to process a single front-end service request, and multiple GPUs to process multiple front-end service requests in parallel;

[0012] The second GPU parallel strategy is used to use multiple GPUs to process a single front-end business request in parallel, and multiple front-end business requests are processed sequentially according to the order of the task queue.

[0013] The embodiment of the present invention predicts the number of business requests through a time series prediction model and selects a suitable GPU parallel strategy, so that computing resources can be flexibly configured according to changes in the amount of front-end business requests, thereby avoiding resource waste.

[0014] In some embodiments of the present invention, in the parallel strategy adjustment module, the total processing time of the front-end service request is calculated based on the number of service requests, and the relationship between the total processing time and the threshold value is determined to select the GPU parallel strategy:

[0015] If the total processing time is greater than the threshold, selecting the second GPU parallel strategy;

[0016] Otherwise, select the first GPU parallel strategy;

[0017] Automatically adjusting the GPU parallel strategy to the first GPU parallel strategy or the second GPU parallel strategy based on the size of the number of business requests;

[0018] The total processing time is calculated based on the following calculation model:

[0019]

[0020] Wherein, T is the total processing time; m is the number of business requests predicted by the time series prediction model; n is the average time, which means the average time of GPU computing front-end business requests when the GPU parallel strategy defaults to the first GPU parallel strategy; K is the number of GPUs; α is the parallel efficiency factor, which means the degree of acceleration achieved by the second GPU parallel strategy relative to the first GPU parallel strategy parallel computing GPU.

[0021] The calculation formula of the threshold value S is:

[0022]

[0023] Among them, β is the preset ratio; Q is the time granularity.

[0024] The embodiment of the present invention calculates the total processing time obtained after predicting the number of front-end business requests, and determines the size of the total processing time and a threshold to select a suitable GPU parallel strategy. It can accelerate the processing speed when the number of front-end business requests is small, and ensure the response speed of each request when the number of front-end business requests is large.

[0025] Some embodiments of the present invention further provide a parallel strategy adjustment method based on time series prediction, comprising the following steps:

[0026] Data collection step: obtaining front-end business requests, writing the front-end business requests into a database, and adding the front-end business requests to a task queue;

[0027] Time series prediction step: configuring the time granularity, training the data of the front-end business request through the time series prediction algorithm to establish a time series prediction model, running the time series prediction model according to the time granularity, and predicting the number of business requests in the next time window at the current time point;

[0028] Parallel strategy adjustment step: selecting a GPU parallel strategy according to the number of business requests predicted by the time series prediction model;

[0029] GPU parallel execution step: generating a working thread based on the selected GPU parallel strategy, taking out the front-end business request from the task queue, and executing the parallel computing task of the front-end business request;

[0030] The GPU parallel strategy includes:

[0031] The first GPU parallel strategy is used to use a single GPU to process a single front-end service request, and multiple GPUs to process multiple front-end service requests in parallel;

[0032] The second GPU parallel strategy is used to use multiple GPUs to process a single front-end business request in parallel, and multiple front-end business requests are processed sequentially according to the order of the task queue.

[0033] In some embodiments of the present invention, in the parallel strategy adjustment module, the total processing time of the front-end service request is calculated based on the number of service requests, and the relationship between the total processing time and the threshold value is determined to select the GPU parallel strategy:

[0034] If the total processing time is greater than the threshold, selecting the second GPU parallel strategy;

[0035] Otherwise, the first GPU parallel strategy is selected.

[0036] In some embodiments of the present invention, the GPU parallel strategy is automatically adjusted to the first GPU parallel strategy or the second GPU parallel strategy based on the size of the number of business requests.

[0037] In some embodiments of the present invention, the total processing time is calculated based on the following calculation model:

[0038]

[0039] Wherein, T is the total processing time; m is the number of business requests predicted by the time series prediction model; n is the average time, which means the average time of GPU computing front-end business requests when the GPU parallel strategy defaults to the first GPU parallel strategy; K is the number of GPUs; α is the parallel efficiency factor, which means the degree of acceleration achieved by the second GPU parallel strategy relative to the first GPU parallel strategy parallel computing GPU.

[0040] In some embodiments of the present invention, the calculation formula of the threshold S is:

[0041]

[0042] Among them, β is the preset ratio; Q is the time granularity.

[0043] The embodiment of the present invention predicts the trend of front-end business requests by introducing a time series prediction algorithm, and dynamically adjusts the GPU parallel strategy according to the prediction results to maximize the computing resource utilization and improve the system response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1A schematic diagram of the structure of a parallel strategy adjustment system based on time series prediction provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of the operation of a parallel strategy adjustment system based on time series prediction provided by an embodiment of the present invention;

[0047] Figure 3 A training flow chart of a time series prediction model provided by an embodiment of the present invention;

[0048] Figure 4 A prediction flow chart of a time series prediction model provided by an embodiment of the present invention;

[0049] Figure 5 A flowchart of a parallel strategy adjustment method based on time series prediction is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0053] The technical solution of the present invention is described in detail below in conjunction with specific embodiments and the accompanying drawings.

[0054] Embodiment 1

[0055] As attached Figure 1 As shown, the present invention provides a parallel strategy adjustment system based on time series prediction, comprising:

[0056] Data collection module: obtains front-end business requests, writes the front-end business requests into the database, and adds the front-end business requests to the task queue; preferably, a time series database is used for storage, and the front-end business request data includes: request quantity, request type, and request time;

[0057] Time series prediction module: configure the time granularity, train the data of front-end business requests through the time series prediction algorithm to establish a time series prediction model, run the time series prediction model according to the time granularity, and predict the number of business requests in the next time window at the current time point;

[0058] Parallel strategy adjustment module: selects GPU parallel strategy based on the number of business requests predicted by the time series prediction model;

[0059] GPU parallel execution module: generates working threads based on the selected GPU parallel strategy, takes out the front-end business request from the task queue, and executes the parallel computing tasks of the front-end business request;

[0060] Among them, GPU parallel strategies include:

[0061] The first GPU parallel strategy is used to use a single GPU to process a single front-end service request, and multiple GPUs to process multiple front-end service requests in parallel;

[0062] The second GPU parallel strategy is used to use multiple GPUs to process a single front-end business request in parallel, and multiple front-end business requests are processed sequentially according to the order of the task queue.

[0063] Based on the above parallel strategy, the operation of the system is adjusted, and the number of business requests is predicted by the time series prediction model to select the appropriate GPU parallel strategy, so that computing resources can be flexibly configured according to the changes in the number of front-end business requests to avoid resource waste.

[0064] Furthermore, in the process of selecting the GPU parallel strategy according to the number of business requests, the total processing time of the front-end business requests is calculated based on the number of business requests, and the relationship between the total processing time and the threshold value is determined to select the GPU parallel strategy:

[0065] If the total processing time is greater than the threshold, the second GPU parallel strategy is selected;

[0066] Otherwise, select the first GPU parallel strategy;

[0067] Automatically adjust the GPU parallel strategy to the first GPU parallel strategy or the second GPU parallel strategy based on the number of business requests;

[0068] The total processing time is calculated based on the following calculation model:

[0069]

[0070] Wherein, T is the total processing time; m is the number of business requests predicted by the time series prediction model; n is the average time, which means the average time of GPU computing front-end business requests when the GPU parallel strategy defaults to the first GPU parallel strategy; K is the number of GPUs; α is the parallel efficiency factor, which means the degree of acceleration of the parallel computing GPU of the second GPU parallel strategy relative to the first GPU parallel strategy. The value of α should be between 0 and 1, where 1 means perfect parallelism, that is, no additional overhead, and 0 means no parallel acceleration, that is, all GPUs work like a single GPU. Benchmark tests can be run regularly to evaluate the parallel efficiency of the current system, and the value of α can be updated according to the test results;

[0071] The calculation formula of the threshold S is:

[0072]

[0073] Among them, β is a preset ratio, in which a dynamic β value range is set and adjusted according to the real-time status of the system. When the load is high, the β value is increased to select a more efficient parallel strategy, and when the load is low, the β value is reduced to save resources; Q is the time granularity.

[0074] Combined with reference Figure 2 As shown in the figure, when the time series prediction model predicts a small number of business requests, the second GPU parallel strategy can speed up the processing speed of a single request; when it is predicted that the number of future business requests will be large, the first GPU parallel strategy can improve the response speed of each request, and will not cause low parallel efficiency due to thread switching overhead, communication overhead, etc., which can improve the efficiency of GPU use; the GPU parallel execution module generates the same number of working threads as the number of GPUs, activates the working threads appropriately according to the GPU parallel strategy, takes tasks from the task queue, and executes the corresponding GPUs in parallel to perform parallel computing tasks. For example, 8 working threads are generated based on the existing 8 GPUs. When the first GPU parallel strategy is selected, each thread is bound to 1 GPU, as shown in FIG. Figure 2 Thread 0 is bound to GPU0, thread 1 is bound to GPU1, and so on. When the second GPU parallel strategy is selected, one thread occupies 8 GPUs and the other 7 threads are not activated. This can speed up the processing when the number of front-end business requests is small, and ensure the response speed of each request when the number of front-end business requests is large.

[0075] As attached Figure 3 As shown, in the time series prediction module, the time series prediction model needs to be trained first:

[0076] (1) Obtain the front-end business request data and write it into the time series database according to the timestamp;

[0077] (2) A time series prediction model is established based on the front-end business request data at different time granularities, such as every 5 minutes, every 10 minutes, every 30 minutes, every hour, etc. First, the mean, standard deviation, and autocorrelation coefficient of the request data at each time granularity are counted to observe the trend and fluctuation of the time series data.

[0078] The data mean is the average number of front-end business requests in a day at a specific time granularity. For example, if the time granularity is 1 hour, then for a day's data, the mean is the sum of all data divided by the number of data.

[0079] The standard deviation is the average deviation between the number of front-end business requests at all time points in a day and the mean of the above data at a specific time granularity. The standard deviation helps understand the fluctuation of front-end business requests.

[0080] The autocorrelation coefficient is a statistic that measures the correlation between values ​​at different time points in a time series. It describes the degree of correlation between data values ​​of the same variable at different time points and can help identify non-random patterns in the data.

[0081] Secondly, according to the information criterion technology and cluster analysis technology, find out the range of appropriate time granularity. Finally, based on the business needs and actual situation, select a time granularity closest to the average business calculation time as the time interval of the prediction model.

[0082] The information criterion technology is used to sort the time granularities. First, the AIC and BIC formulas (AIC = 2k-2ln(L), BIC = kln(n)-2ln(L, k is the number of model parameters, n is the number of samples, and L is the maximum likelihood function value of the model) are used to calculate the AIC and BIC values ​​of the time series prediction model at each time granularity. The smaller the AIC and BIC values, the better the model fitting effect and the lower the complexity. Therefore, the time granularity range with smaller AIC and BIC values ​​is selected as the candidate time granularity.

[0083] Use clustering analysis technology to select the time granularity. Clustering analysis can divide data points into multiple groups, so that the similarity between data points in the same group is high, while the similarity between different groups is low. It is used to identify the characteristics of data at different time granularities. Use K-means algorithm to perform cluster analysis on the extracted features. Then observe the data characteristics and time granularity distribution of each group in the clustering results. If the data characteristics in a group are more concentrated in time granularity and are greatly different from other groups, then give priority to selecting the time granularity within this range.

[0084] (3) Determine the model parameters. First, according to the front-end business request, the seasonal time series prediction model SARIMA is selected. Then, according to the determined time granularity, the parameters (p, d, q) and seasonal parameters (P, D, Q) of the SARIMA model are determined through the autocorrelation function and partial autocorrelation function graphs, as well as AIC and BIC statistical calculations. Finally, the seasonal cycle s is determined, where

[0085] 1) Determine the number of differences d

[0086] Draw a time series graph: observe the trends and fluctuations of time series data.

[0087] Perform ADF test: Use ADF test to determine whether the time series is stationary. If the time series is not stationary, difference processing is required.

[0088] Difference processing: According to the results of the ADF test, the time series is differentiated by the first or higher order until the time series becomes stable. The number of differences is the parameter d.

[0089] 2) Determine the autoregressive order p

[0090] Plot partial autocorrelation function: Plot partial autocorrelation function for the differenced stationary time series.

[0091] Observe the partial autocorrelation function graph: find the truncation position in the partial autocorrelation function graph, that is, the position where the partial autocorrelation function value suddenly becomes 0 or close to 0 after a certain lag period. This truncation point is the parameter p.

[0092] 3) Determine the moving average order q

[0093] Draw the autocorrelation function graph: Draw the autocorrelation function graph for the differenced stationary time series.

[0094] Observe the autocorrelation function graph: find the truncation position in the autocorrelation function graph, that is, the position where the autocorrelation function value suddenly becomes 0 or close to 0 after a certain lag period. This truncation point is the parameter q.

[0095] Because the parameters (p, d, q) are not unique, different parameter combinations may produce similar model effects. Therefore, in order to find the optimal parameter combination, it is necessary to use the grid search method to traverse all possible combinations within the specified parameter range and select the parameter combination that minimizes AIC or BIC. For each combination, a SARIMA model is constructed and fitted using the data set, and then the AIC and BIC values ​​of the model are calculated. For example, the AIC and BIC values ​​corresponding to the (2, 1, 2) combination are both the smallest, so (2, 1, 2) is selected as the optimal parameter combination.

[0096] 4) Assuming the time granularity is T, for one day’s data, the seasonal period s=24*60 / T, which is the total duration of each day divided by the time granularity.

[0097] 5) Determine the number of seasonal differences D

[0098] Draw a time series graph: Observe the seasonality of the time series data. If seasonality exists, it is necessary to perform differentiation.

[0099] Perform ADF test: Use ADF test to determine whether the time series after difference is stationary. If the time series is not stationary, it is necessary to continue the difference processing.

[0100] Continue difference processing: Repeat the above two steps until the seasonality is eliminated and the time series is stable, then D is the number of differences.

[0101] 6) Determine the order P of the seasonal autoregressive term

[0102] Plot partial autocorrelation function: Plot the partial autocorrelation function after difference.

[0103] Observe the partial autocorrelation function graph: According to the partial autocorrelation function graph, find the last point among the lag points related to the seasonal cycle length s where the partial autocorrelation coefficient is significantly not zero. The lag order corresponding to this point is the candidate value of P.

[0104] 7) Determine the order Q of the seasonal moving average term

[0105] Draw the autocorrelation function graph: Draw the autocorrelation function graph after differentiation.

[0106] Observe the autocorrelation function graph: According to the autocorrelation function graph, find the last point among the lag points related to the seasonal cycle length s where the autocorrelation coefficient is significantly not zero. The lag order corresponding to this point is the candidate value of P.

[0107] Because the parameters (P, D, Q) are not unique, different parameter combinations may produce similar model effects. Therefore, in order to find the optimal parameter combination, it is necessary to use the grid search method to traverse all possible combinations within the specified parameter range and select the parameter combination that minimizes AIC or BIC. For each combination, a SARIMA model is constructed and fitted using the data set, and then the AIC and BIC values ​​of the model are calculated. For example, the AIC and BIC values ​​corresponding to the (2, 1, 2) combination are both the smallest, so (2, 1, 2) is selected as the optimal parameter combination.

[0108] As attached Figure 4 As shown, the trained time series prediction model is used for prediction operation, which includes three threads: time series prediction thread, worker thread pool, and data collection thread;

[0109] Time series prediction thread: First, determine whether the prediction time point has been reached. If so, execute model prediction and select GPU parallel strategy based on the prediction results. Then update the time series and model parameters.

[0110] Worker thread pool: A thread pool composed of multiple worker threads, which can be activated as needed. First, determine whether the task queue is empty. If it is not empty, select an idle GPU for calculation based on the current GPU parallel strategy. If it is the first GPU parallel strategy, select an idle GPU for calculation. If it is the second GPU parallel strategy, start all GPUs of the local machine to calculate the current request in parallel. After the calculation is completed, send the result to the front end.

[0111] Data collection thread: First, determine whether a new front-end business request has arrived. If so, add the new front-end business request to the task queue and write the front-end business request data into the time series database.

[0112] Embodiment 2

[0113] Reference Figure 5 As shown, the embodiment of the present invention further provides a parallel strategy adjustment method based on time series prediction, comprising the following steps:

[0114] Data collection step S1: obtaining a front-end business request, writing the data of the front-end business request into a database, and adding the front-end business request to a task queue;

[0115] Time series prediction step S2: configure the time granularity, train the data of the front-end business requests through the time series prediction algorithm to establish a time series prediction model, run the time series prediction model according to the time granularity, and predict the number of business requests in the next time window at the current time point;

[0116] Parallel strategy adjustment step S3: selecting a GPU parallel strategy according to the number of business requests predicted by the time series prediction model;

[0117] GPU parallel execution step S4: generating a working thread based on the selected GPU parallel strategy, taking out the front-end business request from the task queue, and executing the parallel computing task of the front-end business request;

[0118] Among them, GPU parallel strategies include:

[0119] The first GPU parallel strategy is used to use a single GPU to process a single front-end service request, and multiple GPUs to process multiple front-end service requests in parallel;

[0120] The second GPU parallel strategy is used to use multiple GPUs to process a single front-end business request in parallel, and multiple front-end business requests are processed sequentially according to the order of the task queue.

[0121] Among them, in the parallel strategy adjustment step S3, the GPU parallel strategy is automatically adjusted to the first GPU parallel strategy or the second GPU parallel strategy based on the number of business requests; the total processing time of the front-end business requests is calculated based on the number of business requests, and the relationship between the total processing time and the threshold value is determined to select the GPU parallel strategy:

[0122] If the total processing time is greater than the threshold, selecting the second GPU parallel strategy;

[0123] Otherwise, the first GPU parallel strategy is selected.

[0124] The total processing time is calculated based on the following calculation model:

[0125]

[0126] Wherein, T is the total processing time; m is the number of business requests predicted by the time series prediction model; n is the average time, which means the average time of GPU computing front-end business requests when the GPU parallel strategy defaults to the first GPU parallel strategy; K is the number of GPUs; α is the parallel efficiency factor, which means the degree of acceleration achieved by the second GPU parallel strategy relative to the first GPU parallel strategy parallel computing GPU;

[0127] The calculation formula of the threshold S is:

[0128]

[0129] Among them, β is the preset ratio; Q is the time granularity.

[0130] Based on the above method, by introducing the time series prediction algorithm, the front-end business request trend is predicted, and the GPU parallel strategy is dynamically adjusted according to the prediction results to maximize the computing resource utilization and improve the system response speed.

[0131] It should be noted that the above is a reference to a parallel strategy adjustment system and method based on time series prediction, and the present invention is not limited thereto.

[0132] The embodiments of the present invention realize the selection of a suitable GPU parallel strategy by predicting the number of business requests through a time series prediction model, which can accelerate the processing speed when the number of front-end business requests is small, and ensure the response speed of each request when the number of front-end business requests is large, thereby solving the technical problem that the prior art cannot make a good adjustment to the parallel strategy due to the inability to detect the number of front-end business requests, resulting in insufficient utilization of computing resources or a decrease in response speed.

[0133] Finally, it should be noted that: the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0134] The above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.

Claims

1. A parallel strategy adjustment system based on time series prediction, characterized in that: include: Data collection module: obtains front-end business requests, writes the front-end business requests into the database, and adds the front-end business requests to the task queue; Time series prediction module: configure the time granularity, train the data of the front-end business request through the time series prediction algorithm to establish a time series prediction model, run the time series prediction model according to the time granularity, and predict the number of business requests in the next time window at the current time point; The configuration of the time granularity includes: counting the mean, standard deviation and autocorrelation coefficient of the front-end service requests at each time granularity, observing the trend and fluctuation of the number of service requests through the mean, standard deviation and autocorrelation coefficient, selecting the range of the time granularity according to the information criterion technology and cluster analysis technology, calculating the average service calculation time, and selecting the time granularity with the smallest difference from the average service calculation time in combination with the service demand; A parallel strategy adjustment module: selecting a GPU parallel strategy according to the number of business requests predicted by the time series prediction model; GPU parallel execution module: activates the working thread based on the selected GPU parallel strategy, takes out the front-end business request from the task queue, and executes the parallel computing task of the front-end business request; The GPU parallel strategy includes: The first GPU parallel strategy is used to use a single GPU to process a single front-end service request, and multiple GPUs to process multiple front-end service requests in parallel; The second GPU parallel strategy is used to use multiple GPUs to process a single front-end business request in parallel, and multiple front-end business requests are processed sequentially according to the order of the task queue.

2. The parallel strategy adjustment system based on time series prediction according to claim 1 is characterized in that: In the parallel strategy adjustment module, the total processing time of the front-end business request is calculated based on the number of business requests, and the GPU parallel strategy is selected by judging the relationship between the total processing time and the threshold value: If the total processing time is greater than the threshold, selecting the second GPU parallel strategy; Otherwise, the first GPU parallel strategy is selected.

3. The parallel strategy adjustment system based on time series prediction according to claim 1 is characterized in that: The parallel strategy adjustment module further includes: automatically adjusting the GPU parallel strategy to the first GPU parallel strategy or the second GPU parallel strategy based on the size of the number of business requests.

4. The parallel strategy adjustment system based on time series prediction according to claim 2 is characterized in that: The total processing time is calculated based on the following calculation model: Wherein, T is the total processing time; m is the number of business requests predicted by the time series prediction model; n is the average time, which means the average time of GPU computing front-end business requests when the GPU parallel strategy defaults to the first GPU parallel strategy; K is the number of GPUs; α is the parallel efficiency factor, which means the degree of acceleration achieved by the second GPU parallel strategy relative to the first GPU parallel strategy parallel computing GPU.

5. The parallel strategy adjustment system based on time series prediction according to claim 2 or 4, characterized in that: The calculation formula of the threshold S is: Among them, β is the preset ratio; Q is the time granularity.

6. A parallel strategy adjustment method based on time series prediction, characterized in that: The steps include: Data collection step: obtaining front-end business requests, writing the front-end business requests into a database, and adding the front-end business requests to a task queue; Time series prediction step: configuring the time granularity, training the data of the front-end business request through the time series prediction algorithm to establish a time series prediction model, running the time series prediction model according to the time granularity, and predicting the number of business requests in the next time window at the current time point; The configuration of the time granularity includes: counting the mean, standard deviation and autocorrelation coefficient of the front-end service requests at each time granularity, observing the trend and fluctuation of the number of service requests through the mean, standard deviation and autocorrelation coefficient, selecting the range of the time granularity according to the information criterion technology and cluster analysis technology, calculating the average service calculation time, and selecting the time granularity with the smallest difference from the average service calculation time in combination with the service demand; Parallel strategy adjustment step: selecting a GPU parallel strategy according to the number of business requests predicted by the time series prediction model; GPU parallel execution step: activating a working thread based on the selected GPU parallel strategy, taking out the front-end business request from the task queue, and executing the parallel computing task of the front-end business request; The GPU parallel strategy includes: The first GPU parallel strategy is used to use a single GPU to process a single front-end service request, and multiple GPUs to process multiple front-end service requests in parallel; The second GPU parallel strategy is used to use multiple GPUs to process a single front-end business request in parallel, and multiple front-end business requests are processed sequentially according to the order of the task queue.

7. The parallel strategy adjustment method based on time series prediction according to claim 6 is characterized in that: In the parallel strategy adjustment step, the total processing time of the front-end business requests is calculated based on the number of business requests, and the GPU parallel strategy is selected by judging the relationship between the total processing time and the threshold value: If the total processing time is greater than the threshold, selecting the second GPU parallel strategy; Otherwise, the first GPU parallel strategy is selected.

8. The parallel strategy adjustment method based on time series prediction according to claim 6 is characterized in that: The parallel strategy adjustment step also includes: automatically adjusting the GPU parallel strategy to the first GPU parallel strategy or the second GPU parallel strategy based on the size of the number of business requests.

9. The parallel strategy adjustment method based on time series prediction according to claim 7 is characterized in that: The total processing time is calculated based on the following calculation model: Wherein, T is the total processing time; m is the number of business requests predicted by the time series prediction model; n is the average time, which means the average time of GPU computing front-end business requests when the GPU parallel strategy defaults to the first GPU parallel strategy; K is the number of GPUs; α is the parallel efficiency factor, which means the degree of acceleration achieved by the second GPU parallel strategy relative to the first GPU parallel strategy parallel computing GPU.

10. The parallel strategy adjustment method based on time series prediction according to claim 7 or 9, characterized in that: The calculation formula of the threshold S is: Among them, β is the preset ratio; Q is the time granularity.

Citation Information

Patent Citations

  • Distributed training task scheduling method, system and device for intelligent computing

    CN115248728A

  • Data processing method and device based on figure processor

    CN105389772A

  • Coordination and increased utilization of graphics processors during inference

    US20180308202A1