Task processing method, device and electronic equipment
By generating a processing time calculation model and filtering out the target processing time calculation model, the application server with the smallest processing time is determined for task processing, which solves the problem of low processing efficiency on stand-alone machines and achieves more efficient task processing.
Patent Information
- Application Number
- CN202111368047.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-11-18
AI Technical Summary
The application server processes tasks in sequence according to the processing order of tasks, resulting in slow processing efficiency and unable to meet the user's processing time needs.
By obtaining information about the pending tasks and application servers, a processing time calculation model is generated, the processing time impact coefficient of the task and server is determined, the target processing time calculation model is selected, the model is called to calculate the processing time, and the server with the smallest processing time is used as the target server for task processing.
Improve task processing efficiency and can meet users' processing time needs faster.
Smart Images

Figure CN114064243B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically, to a task processing method, device and electronic equipment. Background Art
[0002] In actual applications, application servers will process more tasks according to user needs. When processing tasks, they generally adopt a single-machine processing method, that is, the application server processes tasks in order. For example, the backend server of a bank receives a large number of deduction tasks sent by the high-speed electronic toll collection system (ETC) every day, and processes the deduction tasks in order.
[0003] However, this method has a low processing efficiency and cannot meet the user's processing time requirements. Summary of the invention
[0004] In view of this, the present invention provides a task processing method, device and electronic device to solve the problem that the application server processes tasks in sequence according to the task processing order, the processing efficiency is low and cannot meet the user's processing time requirements.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0006] A task processing method, comprising:
[0007] Obtaining task information of at least one task to be processed, and obtaining server information of at least one application server;
[0008] generating at least one processing time calculation model corresponding to the application server; different processing time calculation models correspond to different processing time calculation rules;
[0009] For each of the tasks to be processed, determining a processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server;
[0010] Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients respectively corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from at least one processing time calculation model corresponding to the application server;
[0011] The target processing time calculation model is called to process the processing time influence coefficients corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model;
[0012] The application server with the smallest corresponding processing time is used as the target server for processing the task to be processed, so that the target server processes the task to be processed.
[0013] Optionally, generating at least one processing time calculation model corresponding to the application server includes:
[0014] Obtaining a task sample corresponding to the application server and standard task information of the task sample, and determining a processing time influence coefficient sample corresponding to the standard task information; the standard task information includes a task information sample and a server information sample;
[0015] Constructing the standard task information and a three-dimensional scatter plot of processing time influence coefficient samples corresponding to the standard task information;
[0016] Performing a clustering operation on the three-dimensional scatter plot to obtain a plurality of clusters, and constructing a regression analysis equation of the clusters;
[0017] Using the task subsample corresponding to the cluster in the task sample, training the regression analysis equation of the cluster until a preset training stop condition is met;
[0018] Each of the regression analysis equations obtained through training is used as a processing time calculation model.
[0019] Optionally, determining a processing duration influence coefficient sample corresponding to the standard task information includes:
[0020] Constructing a set including the standard task information and the standard processing time corresponding to the standard task information;
[0021] The set is processed according to a preset decision tree processing operation to obtain a processing time influence coefficient sample corresponding to the standard task information.
[0022] Optionally, based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients respectively corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from at least one processing time calculation model corresponding to the application server, including:
[0023] Calculate the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, and the variance value of the target data; the target data is the center point of the processing time calculation model;
[0024] Among at least one processing time calculation model corresponding to the application server, a processing time calculation model whose corresponding variance value is less than a preset threshold is used as a target processing time calculation model.
[0025] Optionally, calling the target processing time calculation model to process the processing duration influence coefficients corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed, and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, includes:
[0026] Using the regression analysis equation in the target processing time calculation model, the task information of the task to be processed, the server information of the application server, and the processing duration influence coefficients corresponding to the task information of the task to be processed and the server information of the application server are processed to obtain the processing time corresponding to the target processing time calculation model.
[0027] A task processing device, comprising:
[0028] An information acquisition module, used to acquire task information of at least one task to be processed, and to acquire server information of at least one application server;
[0029] A model generation module, used to generate at least one processing time calculation model corresponding to the application server; different processing time calculation models correspond to different processing time calculation rules;
[0030] A coefficient determination module, used for determining, for each of the tasks to be processed, a processing duration influence coefficient corresponding to the task information of the task to be processed and the server information of the application server;
[0031] a model screening module, configured to screen out a target processing time calculation model from at least one processing time calculation model corresponding to the application server based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients corresponding to the task information of the task to be processed and the server information of the application server;
[0032] A time determination module, used for calling the target processing time calculation model to process the processing time influence coefficients corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model;
[0033] The task allocation module is used to select the application server with the smallest corresponding processing time as the target server for processing the task to be processed, so that the target server processes the task to be processed.
[0034] Optionally, the model generation module includes:
[0035] A data acquisition submodule, used to acquire task samples corresponding to the application server and standard task information of the task samples, and determine processing time influence coefficient samples corresponding to the standard task information; the standard task information includes task information samples and server information samples;
[0036] A graph construction submodule, used to construct the standard task information and a three-dimensional scatter plot of the processing time influence coefficient samples corresponding to the standard task information;
[0037] A clustering submodule, used for performing a clustering operation on the three-dimensional scatter plot to obtain a plurality of clusters, and constructing a regression analysis equation of the clusters;
[0038] A training submodule, used to train the regression analysis equation of the cluster using the task subsample corresponding to the cluster in the task sample until a preset training stop condition is met;
[0039] The model determination submodule is used to use each of the regression analysis equations obtained through training as a processing time calculation model.
[0040] Optionally, when the data acquisition submodule is used to determine the processing duration influence coefficient sample corresponding to the standard task information, it is specifically used to:
[0041] A set including the standard task information and the standard processing time corresponding to the standard task information is constructed, and the set is processed according to a preset decision tree processing operation to obtain a sample of the processing time influence coefficient corresponding to the standard task information.
[0042] Optionally, the model screening module is specifically used for:
[0043] Calculate the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, and the variance value of the target data; the target data is the center point of the processing time calculation model;
[0044] Among at least one processing time calculation model corresponding to the application server, a processing time calculation model whose corresponding variance value is less than a preset threshold is used as a target processing time calculation model.
[0045] An electronic device comprising: a memory and a processor;
[0046] Wherein, the memory is used to store programs;
[0047] The processor calls the program and is used to execute the above-mentioned task processing method.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention provides a task processing method, device and electronic device. In the present invention, task information of at least one task to be processed is obtained, and server information of at least one application server is obtained, and at least one processing time calculation model corresponding to the application server is generated. For each task to be processed, the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server is determined. Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from the at least one processing time calculation model corresponding to the application server, and the target processing time calculation model is called to process the processing time influence coefficient corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, and the application server with the smallest corresponding processing time is used as the target server for processing the task to be processed, so that the target server processes the task to be processed. That is, in the present invention, at least one application server is used to process the task to be processed, which can improve the task processing efficiency compared with the single-machine processing method. Furthermore, when allocating tasks, allocating the tasks to the application servers with the smallest corresponding processing time can further improve the processing efficiency of the tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0051] Figure 1 A method flow chart of a task processing method provided by an embodiment of the present invention;
[0052] Figure 2 A method flow chart of another task processing method provided by an embodiment of the present invention;
[0053] Figure 3 A structural diagram of a task processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] In actual applications, application servers will process more tasks according to user needs. When processing tasks, they generally adopt a single-machine processing method, that is, the application server processes tasks in order according to the processing order of tasks. For example, the backend server of a bank receives a large number of deduction tasks sent by the high-speed non-stop electronic toll collection system (ETC) every day, and processes the deduction tasks in order. However, this method has a low processing efficiency and cannot meet the processing time requirements of users.
[0056] In order to solve the problem of slow processing efficiency, the inventors have found through research that if multiple machines can be used for processing, the processing efficiency can be improved.
[0057] Therefore, the embodiment of the present invention provides a task processing method, device and electronic device. In the present invention, the task information of at least one task to be processed is obtained, and the server information of at least one application server is obtained, and at least one processing time calculation model corresponding to the application server is generated. For each task to be processed, the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server is determined. Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from the at least one processing time calculation model corresponding to the application server, and the target processing time calculation model is called to process the processing time influence coefficient corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, and the application server with the smallest corresponding processing time is used as the target server for processing the task to be processed, so that the target server processes the task to be processed. That is, in the present invention, using at least one application server to process the task to be processed can improve the task processing efficiency compared with the single-machine processing method. Furthermore, when allocating tasks, allocating the tasks to the application servers with the smallest corresponding processing time can further improve the processing efficiency of the tasks.
[0058] It should be noted that the task processing method, device and electronic device provided by the present invention can be used in the field of cloud computing, big data or finance. The above is only an example and does not limit the application field of the task processing method, device and electronic device provided by the present invention.
[0059] Based on the above content, the embodiment of the present invention provides a task processing method, referring to Figure 1 , which may include:
[0060] S11. Obtain task information of at least one task to be processed, and obtain server information of at least one application server.
[0061] The pending tasks in this embodiment can be various types of tasks such as data calculation, data analysis, and data operation. In addition, at least one pending task can also be a task of the same type or a different type, which is not limited in this embodiment. For example, the pending tasks can be a large number of deduction tasks sent daily by the high-speed non-stop electronic toll collection system (ETC) received by the bank. The deduction tasks have high requirements for timeliness. During peak hours, the files that may need to be processed may exceed the system's tolerance, and affect the deduction timeliness, increasing the system burden. Therefore, it is urgent to increase processing efficiency.
[0062] In this embodiment, the number of tasks to be processed may be one or more. Generally speaking, in actual scenarios, there are many scenarios where there are more tasks to be processed.
[0063] The task information of the task to be processed refers to the business complexity P, the business type A, and the business size B (if the task to be processed is a file, it may be the file size).
[0064] The service complexity P is manually determined based on the processing speed and maximum service volume of services of the same magnitude under the same hardware conditions.
[0065] When the business is the above-mentioned deduction business, the business type A and the business size B can be determined by the above-mentioned payment request file identified by the merchant number of the issuer of the high-speed electronic toll collection system (ETC for short). The name of the uploaded payment request file contains the merchant number and the batch number. The corresponding business type A and business size B can be obtained by querying the merchant number and the batch number.
[0066] In this embodiment, at least one application server is set to process the above-mentioned pending tasks, and each application server can be used as a node host. Assuming that there are K node hosts in total, the monitoring mechanism will monitor the performance indicators of the K hosts, including CPU usage and IO throughput.
[0067] In this embodiment, due to the different sizes of tasks to be processed, such as files to be processed, some files are larger and the program processing time is longer, while some files are smaller and the processing time is shorter. In addition, different tasks have different business types due to different complexities, and the processing speeds will also be different. In order to further improve the file processing speed, this embodiment distributes tasks based on task size, business type and application server performance indicators.
[0068] The server information of the application server in this embodiment is set to the CPU average value C and the IO consumption average value D within 1 second.
[0069] The above-mentioned P, A, B, C, and D can be stored in corresponding data tables respectively, such as storing P in a service category table, storing AB in an allocated table, and storing CD in a performance monitoring table of an application server.
[0070] For each task to be processed, there are three corresponding PAB data, and for each application server, there are two corresponding CD data.
[0071] S12: Generate at least one processing time calculation model corresponding to the application server.
[0072] Specifically, at least one processing time calculation model corresponding to the application server is constructed according to the data distribution of the application server, and the processing time calculation rules corresponding to different processing time calculation models are different.
[0073] Referring to Figure 2 , step S12 may include:
[0074] S21. Obtain the task samples corresponding to the application server, as well as the standard task information of the task samples, and determine the processing duration influence coefficient samples corresponding to the standard task information.
[0075] In order to determine the above-mentioned at least one processing time calculation model, in this embodiment, it is obtained by means of data training. Therefore, a relatively large number of task samples need to be prepared. The task samples can be various tasks, such as data processing, collection, analysis, etc.
[0076] Each task sample corresponds to standard task information, and the standard task information includes a task information sample and a server information sample. The task information sample is similar to the above-mentioned task information, and the server information sample is similar to the above-mentioned server information. That is, the standard task information also includes the several data of P, A, B, C, and D. In addition, each task sample is also set with a corresponding task processing time L, and the task processing time L can be the time required for actual task processing.
[0077] Then, determine the processing duration influence coefficient samples corresponding to the standard task information. Specifically, construct a set including the standard task information and the standard processing time corresponding to the standard task information, and process the set according to the preset decision tree processing operation to obtain the processing duration influence coefficient samples corresponding to the standard task information.
[0078] In detail, in this embodiment, the random forest algorithm is used to determine the processing duration influence coefficient samples.
[0079] First, the above-obtained L feature variables (P, A, B, C, D, Y) are formed into a set N. Then, M samples are selected from N with replacement as the training set for each decision tree. When each tree is split, select a feature variable L0 < L, and randomly select an optimal feature from m sub-samples with the feature variable L0 from the M samples to perform the left and right subtree partitioning. Repeat the above steps multiple times, and finally vote to obtain the optimal classification, that is, obtain the processing duration influence coefficient samples corresponding to the standard task information. Specifically, that is, obtain the processing duration influence coefficients corresponding to P, A, B, C, and D respectively, which are: P: a1, A: a2, B: a3, C: a4, D: a5. That is, the processing duration influence coefficient corresponding to P is a1, the processing duration influence coefficient corresponding to A is a2,..., and the processing duration influence coefficient corresponding to D is a5.
[0080] S22: construct the standard task information and a three-dimensional scatter plot of processing duration influence coefficient samples corresponding to the standard task information.
[0081] Specifically, after obtaining P:a1, A:a2, B:a3, C:a4, D:a5, a 6-dimensional scatter plot is made for the set N. Specifically, a 6-dimensional coordinate system is established, and the samples in the set N are plotted in the 6-dimensional coordinates, with the independent variables being P, A, B, C, and D, and the dependent variable being Y, to form a 3D scatter plot.
[0082] S23, performing a clustering operation on the three-dimensional scatter plot to obtain a plurality of clusters, and constructing a regression analysis equation for the clusters.
[0083] Specifically, the data in the three-dimensional scatter plot is taken as the center point, and each cluster Y1...Yn is formed from the center point to the nearest secondary dense point. A regression analysis equation is constructed in each cluster, such as: Y1 = a*a1*a3*a2*P*A*Bb*a4*Cc*a5*D+d, where a, b, c, and d are parameters that need to be calculated.
[0084] S24: using the task sub-samples corresponding to the cluster in the task samples to train the regression analysis equation of the cluster until a preset training stop condition is met.
[0085] Specifically, the task subsamples corresponding to the aggregate cluster Y1, that is, the standard task information of the task subsamples, and the processing time influence coefficient samples corresponding to the standard task information, are randomly sampled with replacement to form a training set m0 and a test set m1. m0 is brought into the regression analysis equation to calculate the parameter values of a, b, c, and d, and the obtained results are verified with the m1 training set. The final sum of the variances is taken as the error. If the error is greater than the set value T, the above actions are repeated to randomly sample the task subsamples in the aggregate cluster y1 with replacement to form a training set m0 and a test set m1 until the error is less than the set value T, and the regression analysis equation of the aggregate cluster is obtained.
[0086] S25, taking each of the regression analysis equations obtained through training as a processing time calculation model.
[0087] After obtaining at least one regression analysis equation, each of the regression analysis equations is used as a processing time calculation model.
[0088] S13: For each of the tasks to be processed, determine the processing duration impact coefficients corresponding to the task information of the task to be processed and the server information of the application server.
[0089] Specifically, the processing duration influence coefficients can adopt the above-mentioned a1 - a5.
[0090] S14. Based on the task information of the task to be processed, the server information of the application server, the task information of the task to be processed, and the processing duration influence coefficients corresponding to the server information of the application server respectively, select a target processing time calculation model from at least one processing time calculation model corresponding to the application server.
[0091] Specifically, calculate the variance values of the task information of the task to be processed, the server information of the application server, and the processing duration influence coefficients corresponding to the task information of the task to be processed and the server information of the application server respectively, and the target data; the target data is the center point of the processing time calculation model. Among the at least one processing time calculation model corresponding to the application server, use the processing time calculation model with the variance value less than the preset threshold as the target processing time calculation model.
[0092] Specifically, for the PABCD corresponding to the task to be processed, and a1 - a5, calculate the variance di = (x - xi) 2 +…+(y - yi) 2 with the center point of each aggregation cluster, where x and y are the independent variables of the aggregation cluster center point, and xi and yi are other variables in the aggregation cluster except the center point. This formula represents the sum of the squared differences between the independent variables of different aggregation cluster center points and other variables.
[0093] Select the aggregation cluster with the smallest di or di less than the preset threshold, and use the processing time calculation model corresponding to this specific cluster as the target processing time calculation model.
[0094] If there are two or more di error values < T1 (the set preset threshold, such as the error value), then use the processing time calculation model with the di error value < T1 as the target processing time calculation model.
[0095] S15. Invoke the target processing time calculation model to process the task information of the task to be processed, the server information of the application server, the task information of the task to be processed, and the processing duration influence coefficients corresponding to the server information of the application server respectively, to obtain the processing time corresponding to the target processing time calculation model.
[0096] Use the regression analysis equation in the target processing time calculation model to process the task information of the task to be processed, the server information of the application server, and the processing duration influence coefficients corresponding to the task information of the task to be processed and the server information of the application server respectively, to obtain the processing time corresponding to the target processing time calculation model.
[0097] Specifically, the processing time can be calculated by bringing PABCD and a1-a5 corresponding to the task to be processed into the target processing time calculation model.
[0098] Among them, if there are several target processing time calculation models, several processing times will be calculated.
[0099] S16. Use the application server with the smallest corresponding processing time as the target server for processing the task to be processed, so that the target server processes the task to be processed.
[0100] The application server with the smallest corresponding processing time is used as the target server for processing the task to be processed. When processing the task to be processed, the processing time is minimized, thereby improving the processing efficiency of the task to be processed.
[0101] In this embodiment, the task information of at least one task to be processed is obtained, and the server information of at least one application server is obtained, and at least one processing time calculation model corresponding to the application server is generated. For each task to be processed, the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server is determined. Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from the at least one processing time calculation model corresponding to the application server, and the target processing time calculation model is called to process the processing time influence coefficient corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed, and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, and the application server with the smallest corresponding processing time is used as the target server for processing the task to be processed, so that the target server processes the task to be processed. That is, in the present invention, using at least one application server to process the task to be processed can improve the task processing efficiency compared with the single-machine processing method. Furthermore, when allocating tasks, allocating the tasks to the application servers with the smallest corresponding processing time can further improve the processing efficiency of the tasks.
[0102] Optionally, based on the above-mentioned embodiment of the task processing method, another embodiment of the present invention provides a task processing device, referring to Figure 3 ,include:
[0103] The information acquisition module 11 is used to acquire task information of at least one task to be processed and to acquire server information of at least one application server;
[0104] A model generation module 12, configured to generate at least one processing time calculation model corresponding to the application server; different processing time calculation models correspond to different processing time calculation rules;
[0105] A coefficient determination module 13 is used to determine, for each of the tasks to be processed, a processing duration influence coefficient corresponding to the task information of the task to be processed and the server information of the application server;
[0106] A model screening module 14 is used to screen out a target processing time calculation model from at least one processing time calculation model corresponding to the application server based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients corresponding to the task information of the task to be processed and the server information of the application server respectively;
[0107] The time determination module 15 is used to call the target processing time calculation model to process the processing time influence coefficients corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model;
[0108] The task allocation module 16 is used to select the application server with the smallest corresponding processing time as the target server for processing the task to be processed, so that the target server processes the task to be processed.
[0109] Furthermore, the model generation module includes:
[0110] A data acquisition submodule, used to acquire task samples corresponding to the application server and standard task information of the task samples, and determine processing time influence coefficient samples corresponding to the standard task information; the standard task information includes task information samples and server information samples;
[0111] A graph construction submodule, used to construct the standard task information and a three-dimensional scatter plot of the processing time influence coefficient samples corresponding to the standard task information;
[0112] A clustering submodule, used for performing a clustering operation on the three-dimensional scatter plot to obtain a plurality of clusters, and constructing a regression analysis equation of the clusters;
[0113] A training submodule, used to train the regression analysis equation of the cluster using the task subsample corresponding to the cluster in the task sample until a preset training stop condition is met;
[0114] The model determination submodule is used to use each of the regression analysis equations obtained through training as a processing time calculation model.
[0115] Furthermore, when the data acquisition submodule is used to determine the processing time influence coefficient sample corresponding to the standard task information, it is specifically used to:
[0116] A set including the standard task information and the standard processing time corresponding to the standard task information is constructed, and the set is processed according to a preset decision tree processing operation to obtain a sample of the processing time influence coefficient corresponding to the standard task information.
[0117] Furthermore, the model screening module is specifically used for:
[0118] Calculate the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, and the variance value of the target data; the target data is the center point of the processing time calculation model;
[0119] Among at least one processing time calculation model corresponding to the application server, a processing time calculation model whose corresponding variance value is less than a preset threshold is used as a target processing time calculation model.
[0120] Further, the time determination module 15 is specifically used for:
[0121] Using the regression analysis equation in the target processing time calculation model, the task information of the task to be processed, the server information of the application server, and the processing duration influence coefficients corresponding to the task information of the task to be processed and the server information of the application server are processed to obtain the processing time corresponding to the target processing time calculation model.
[0122] In this embodiment, the task information of at least one task to be processed is obtained, and the server information of at least one application server is obtained, and at least one processing time calculation model corresponding to the application server is generated. For each task to be processed, the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server is determined. Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from the at least one processing time calculation model corresponding to the application server, and the target processing time calculation model is called to process the processing time influence coefficient corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed, and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, and the application server with the smallest corresponding processing time is used as the target server for processing the task to be processed, so that the target server processes the task to be processed. That is, in the present invention, using at least one application server to process the task to be processed can improve the task processing efficiency compared with the single-machine processing method. Furthermore, when allocating tasks, allocating the tasks to the application servers with the smallest corresponding processing time can further improve the processing efficiency of the tasks.
[0123] It should be noted that, for the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.
[0124] Optionally, based on the above-mentioned embodiments of the task processing method and device, another embodiment of the present invention provides an electronic device, including: a memory and a processor;
[0125] Wherein, the memory is used to store programs;
[0126] The processor calls the program and is used to execute the above-mentioned task processing method.
[0127] In this embodiment, the task information of at least one task to be processed is obtained, and the server information of at least one application server is obtained, and at least one processing time calculation model corresponding to the application server is generated. For each task to be processed, the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server is determined. Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from the at least one processing time calculation model corresponding to the application server, and the target processing time calculation model is called to process the processing time influence coefficient corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed, and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, and the application server with the smallest corresponding processing time is used as the target server for processing the task to be processed, so that the target server processes the task to be processed. That is, in the present invention, using at least one application server to process the task to be processed can improve the task processing efficiency compared with the single-machine processing method. Furthermore, when allocating tasks, allocating the tasks to the application servers with the smallest corresponding processing time can further improve the processing efficiency of the tasks.
[0128] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A task processing method, characterized in that: include: Obtaining task information of at least one task to be processed, and obtaining server information of at least one application server; generating at least one processing time calculation model corresponding to the application server; different processing time calculation models correspond to different processing time calculation rules; For each of the tasks to be processed, determining a processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server; Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients respectively corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from at least one processing time calculation model corresponding to the application server; The target processing time calculation model is called to process the processing time influence coefficients corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model; Using the application server with the smallest corresponding processing time as the target server for processing the task to be processed, so that the target server processes the task to be processed; The step of generating at least one processing time calculation model corresponding to the application server includes: Obtaining a task sample corresponding to the application server and standard task information of the task sample, and determining a processing time influence coefficient sample corresponding to the standard task information; the standard task information includes a task information sample and a server information sample; Constructing the standard task information and a three-dimensional scatter plot of processing time influence coefficient samples corresponding to the standard task information; Performing a clustering operation on the three-dimensional scatter plot to obtain a plurality of clusters, and constructing a regression analysis equation of the clusters; Using the task subsample corresponding to the cluster in the task sample, training the regression analysis equation of the cluster until a preset training stop condition is met; Each of the regression analysis equations obtained through training is used as a processing time calculation model.
2. The task processing method according to claim 1, characterized in that: Determining a processing time influence coefficient sample corresponding to the standard task information includes: Constructing a set including the standard task information and the standard processing time corresponding to the standard task information; The set is processed according to a preset decision tree processing operation to obtain a processing time influence coefficient sample corresponding to the standard task information.
3. The task processing method according to claim 1, characterized in that: Based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients respectively corresponding to the task information of the task to be processed and the server information of the application server, a target processing time calculation model is selected from at least one processing time calculation model corresponding to the application server, including: Calculate the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, and the variance value of the target data; the target data is the center point of the processing time calculation model; Among at least one processing time calculation model corresponding to the application server, a processing time calculation model whose corresponding variance value is less than a preset threshold is used as a target processing time calculation model.
4. The task processing method according to claim 1, characterized in that: Calling the target processing time calculation model to process the task information of the task to be processed, the server information of the application server, the processing duration influence coefficients corresponding to the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model, including: Using the regression analysis equation in the target processing time calculation model, the task information of the task to be processed, the server information of the application server, and the processing duration influence coefficients corresponding to the task information of the task to be processed and the server information of the application server are processed to obtain the processing time corresponding to the target processing time calculation model.
5. A task processing device, characterized in that: include: An information acquisition module, used to acquire task information of at least one task to be processed, and to acquire server information of at least one application server; A model generation module, used to generate at least one processing time calculation model corresponding to the application server; different processing time calculation models correspond to different processing time calculation rules; A coefficient determination module, used for determining, for each of the tasks to be processed, a processing duration influence coefficient corresponding to the task information of the task to be processed and the server information of the application server; a model screening module, configured to screen out a target processing time calculation model from at least one processing time calculation model corresponding to the application server based on the task information of the task to be processed, the server information of the application server, and the processing time influence coefficients corresponding to the task information of the task to be processed and the server information of the application server; A time determination module, used for calling the target processing time calculation model to process the processing time influence coefficients corresponding to the task information of the task to be processed, the server information of the application server, the task information of the task to be processed and the server information of the application server, respectively, to obtain the processing time corresponding to the target processing time calculation model; A task allocation module, used for selecting the application server with the smallest corresponding processing time as the target server for processing the task to be processed, so that the target server processes the task to be processed; Wherein, the model generation module includes: A data acquisition submodule is used to acquire task samples corresponding to the application server and standard task information of the task samples, and determine processing time influence coefficient samples corresponding to the standard task information; the standard task information includes task information samples and server information samples; A graph construction submodule, used to construct the standard task information and a three-dimensional scatter plot of the processing time influence coefficient samples corresponding to the standard task information; A clustering submodule, used for performing a clustering operation on the three-dimensional scatter plot to obtain a plurality of clusters, and constructing a regression analysis equation of the clusters; A training submodule, used to train the regression analysis equation of the cluster using the task subsample corresponding to the cluster in the task sample until a preset training stop condition is met; The model determination submodule is used to use each of the regression analysis equations obtained through training as a processing time calculation model.
6. The task processing device according to claim 5, characterized in that: When the data acquisition submodule is used to determine the processing time influence coefficient sample corresponding to the standard task information, it is specifically used to: A set including the standard task information and the standard processing time corresponding to the standard task information is constructed, and the set is processed according to a preset decision tree processing operation to obtain a sample of the processing time influence coefficient corresponding to the standard task information.
7. The task processing device according to claim 5, characterized in that: The model screening module is specifically used for: Calculate the task information of the task to be processed, the server information of the application server, and the processing time influence coefficient corresponding to the task information of the task to be processed and the server information of the application server, and the variance value of the target data; The target data is the center point of the processing time calculation model; Among at least one processing time calculation model corresponding to the application server, a processing time calculation model whose corresponding variance value is less than a preset threshold is used as a target processing time calculation model.
8. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor calls the program and is used to execute the task processing method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Cooperative task scheduling method in user moving scene in mobile edge calculation
CN113597013A
Job scheduling using expected server performance information
US20160098292A1