Batch task retry method, device and equipment and storage medium

By introducing a batch task execution framework based on the service discovery mechanism on the task execution server, the problem of batch tasks failing due to temporary problems is solved, and low-cost automatic retry and system record uniformity are achieved.

CN119512823AActive Publication Date: 2025-02-25湖南长银五八消费金融股份有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411736350.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-02-25
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

When handling batch tasks, the existing technology faces the problem of task failure due to temporary problems such as network jitter, which leads to inefficient manual retry or the need to write automatic retry logic, which increases R&D costs and coding complexity.

Method used

By introducing a software package of the batch task execution framework based on the service discovery mechanism on the task execution server, the execution thread is enabled and the task configuration parameters are determined to represent asynchronous execution. If asynchronous, the preset listening method is used to determine whether the execution time exceeds the threshold, determine the task result and try again.

Benefits of technology

It realizes low-cost automatic retry of batch tasks, reduces labor costs, and improves the efficiency of task execution and the unity of system records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512823A_ABST
    Figure CN119512823A_ABST
Patent Text Reader

Abstract

The invention discloses a batch task retry method, device and equipment and a storage medium, and relates to the technical field of information, and the method comprises the steps: sending a batch task request generated based on configuration parameters of batch tasks obtained by a scheduling center to a memory queue of a task execution server; starting an execution thread based on the software package; the software package is a software package which is provided based on a service discovery mechanism and comprises a batch task execution framework; if the configuration parameters are parameters representing asynchronous execution of the batch tasks, executing a target batch task by utilizing an execution thread, judging whether the execution duration exceeds a target duration threshold value or not, and determining a first execution result based on a judgment result; wherein the preset monitoring method is used for monitoring the execution progress of the target batch task, and the target duration threshold value is a duration threshold value determined based on a predicted duration obtained by a target execution duration prediction model; and performing task retry operation on the to-be-retry batch tasks determined based on the first execution result. And batch task retry can be realized at low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a batch task retry method, device, equipment and storage medium. Background Art

[0002] At present, there are two solutions to the problem that batch tasks may not be executed smoothly during execution due to some temporary problems such as data query failure caused by network jitter, failure caused by concurrent operations, etc. One is that after troubleshooting and confirming the problem, the development or operation and maintenance personnel manually restart the batch task again, that is, manual retry; the other is to write the automatic retry logic for each batch task during the development process, and automatically solve it through retry within the task execution when the above problems occur. However, the former is inefficient, time-consuming, and consumes extra manpower. Although the latter is slightly more efficient, each batch task needs to write its own retry logic for the same problem, which still has a certain amount of R&D cost and increases the complexity of coding. At the same time, we cannot automatically make a complete and reasonable system record of the execution exceptions and retries of batch tasks.

[0003] As can be seen from the above, how to implement batch task retry at low cost is an urgent problem to be solved. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a batch task retry method, device, equipment and storage medium, which can realize batch task retry at low cost. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a batch task retry method, comprising:

[0006] Using the scheduling center to obtain the configuration parameters of the batch task, and sending the batch task request generated based on the configuration parameters to the corresponding task execution server, so that the configuration parameters in the batch task request are stored in the memory queue through the task execution server;

[0007] Based on the software package introduced by the task execution server, the execution thread corresponding to the batch task is started, and the batch task request is obtained from the memory queue through the execution thread; the software package is a software package including a batch task execution framework provided based on a service discovery mechanism;

[0008] Determine whether the configuration parameter corresponding to the batch task in the batch task request is a parameter representing asynchronous execution of the batch task;

[0009] If the configuration parameter is a parameter characterizing asynchronous execution of the batch task, the execution thread is used to execute the target batch task for which a preset monitoring method exists, and it is determined whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and a first execution result of the target batch task is determined based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined based on the predicted duration obtained by the target execution duration prediction model;

[0010] The batch tasks to be retried are determined based on the first execution result, and corresponding task retry operations are performed on the batch tasks to be retried.

[0011] Optionally, starting the execution thread corresponding to the batch task based on the software package introduced by the task execution server, and obtaining the batch task request from the memory queue through the execution thread includes:

[0012] Based on the service discovery mechanism, the batch task execution framework is encapsulated into a software package, and the software package is introduced through the task execution server to start the execution thread corresponding to the batch task, and the corresponding batch task request is obtained from the memory queue through the execution thread;

[0013] Among them, the batch task execution framework includes a preset identification annotation corresponding to the batch task, a preset communication interface for receiving the batch task request sent by the scheduling center, a preset launcher for starting the task execution server, a registration thread for registering the service information corresponding to the batch task to the scheduling center, the execution thread for executing the batch task, and a preset executor interface encapsulated based on the execution thread.

[0014] Optionally, if the configuration parameter is a parameter characterizing asynchronous execution of the batch task, then after using the execution thread to execute the target batch task with a preset listening method, determining whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and determining the first execution result of the target batch task based on the determination result, the method further includes:

[0015] If the configuration parameter is not a parameter indicating asynchronous execution of the batch task, executing the batch task using the execution thread to obtain a second execution result;

[0016] Correspondingly, determining the batch tasks to be retried based on the first execution result, and performing corresponding task retry operations on the batch tasks to be retried includes:

[0017] The batch of tasks to be retried is determined based on the first execution result and the second execution result, and a corresponding task retry operation is performed on the batch of tasks to be retried.

[0018] Optionally, determining the batch tasks to be retried based on the first execution result and the second execution result, and performing corresponding task retry operations on the batch tasks to be retried includes:

[0019] Determine the batch tasks to be retried based on the first execution result and the second execution result, and judge whether the number of retries corresponding to the batch tasks to be retried is greater than a preset retry threshold;

[0020] If the number of retries corresponding to the batch task to be retried is greater than a preset retry threshold, marking the first scheduling record corresponding to the batch task to be retried as a failed state;

[0021] If the number of retries corresponding to the batch task to be retried is not greater than the preset retry threshold, marking the first scheduling record corresponding to the batch task to be retried as retried;

[0022] The batch tasks to be retried are used to create a second scheduling record for recording that the batch tasks to be retried are pulled by the task execution server, and based on a preset retry interval time, the step of using the scheduling center to obtain configuration parameters of the batch tasks is jumped to.

[0023] Optionally, if the configuration parameter is a parameter indicating asynchronous execution of the batch task, executing the target batch task having a preset listening method by using the execution thread includes:

[0024] If the configuration parameter is a parameter representing asynchronous execution of the batch task, determining whether the preset executor interface corresponding to the batch task implements a preset monitoring method;

[0025] If the preset executor interface corresponding to the batch task implements the preset monitoring method, a target batch task that implements the preset monitoring method is obtained from the batch task.

[0026] Optionally, judging whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and determining the first execution result of the target batch task based on the judgment result includes:

[0027] Determine whether the execution time of the target batch task exceeds the target time threshold in the configuration parameters;

[0028] If the execution time of the target batch task exceeds the target time threshold in the configuration parameter, the state after the target batch task is executed is characterized as execution failure;

[0029] Correspondingly, determining the batch tasks to be retried based on the first execution result, and performing corresponding task retry operations on the batch tasks to be retried includes:

[0030] If the status of the target batch task after execution is execution failure, the target batch task is determined as a batch task to be retried, and a corresponding task retry operation is performed on the batch task to be retried.

[0031] Optionally, the process of determining the target duration threshold includes:

[0032] If the execution time of the target batch task is not greater than the target threshold, the preset fixed time threshold is used as the target time threshold; the target threshold is a threshold determined based on the target execution time, and the target execution time is the execution time of the target batch task based on the target number and determined according to the preset sliding window rule;

[0033] If the execution time of the target batch task is greater than the target threshold, obtaining time series data based on the target batch task of the target number, and performing a unit root test on the time series data;

[0034] Based on the test results, target time series data that meets the preset reliability conditions is obtained, and the corresponding number of autoregressive items and moving average items are obtained by calculating the autocorrelation function and the partial autocorrelation function of the target time series data;

[0035] Constructing each initial monitoring prediction model by each difference order corresponding to the target time series data, each number of the autoregressive terms, and each number of the moving average terms, and evaluating each initial monitoring prediction model by using the Akaike information criterion and performing a chi-square test to obtain a target execution time prediction model;

[0036] When the target execution duration prediction model predicts the execution duration of the target batch task, if the obtained predicted duration is less than the target value, the preset duration threshold is used as the target duration threshold;

[0037] If the predicted duration is greater than the target value, the target duration threshold is obtained based on the predicted duration and the preset duration threshold.

[0038] In a second aspect, the present application provides a batch task retry device, comprising:

[0039] A task request sending module, used to obtain the configuration parameters of the batch task using the scheduling center, and send the batch task request generated based on the configuration parameters to the corresponding task execution server, so that the configuration parameters in the batch task request are stored in the memory queue through the task execution server;

[0040] An execution thread start module, used to start the execution thread corresponding to the batch task based on the software package introduced by the task execution server, and obtain the batch task request from the memory queue through the execution thread; the software package is a software package including a batch task execution framework provided based on a service discovery mechanism;

[0041] A configuration parameter determination module, used to determine whether the configuration parameter corresponding to the batch task in the batch task request is a parameter representing asynchronous execution of the batch task;

[0042] An execution result determination module is used for, if the configuration parameter is a parameter characterizing asynchronous execution of the batch task, using the execution thread to execute a target batch task for which a preset monitoring method exists, judging whether the execution duration of the target batch task exceeds a target duration threshold in the configuration parameter, and determining a first execution result of the target batch task based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined based on a predicted duration obtained by a target execution duration prediction model;

[0043] The task retry module is used to determine the batch tasks to be retried based on the first execution result, and perform corresponding task retry operations on the batch tasks to be retried.

[0044] In a third aspect, the present application provides an electronic device, including:

[0045] Memory, used to store computer programs;

[0046] The processor is used to execute the computer program to implement the aforementioned batch task retry method.

[0047] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned batch task retry method when executed by a processor.

[0048] The present application uses a scheduling center to obtain configuration parameters of batch tasks, and sends a batch task request generated based on the configuration parameters to a corresponding task execution server, so that the configuration parameters in the batch task request are stored in a memory queue through the task execution server; an execution thread corresponding to the batch task is started based on a software package introduced by the task execution server, and the batch task request is obtained from the memory queue through the execution thread; the software package is a software package containing a batch task execution framework provided based on a service discovery mechanism; it is determined whether the configuration parameters corresponding to the batch task in the batch task request represent asynchronous execution of the batch task execution parameters; if the configuration parameters are parameters that characterize asynchronous execution of the batch tasks, then the execution thread is used to execute the target batch task with a preset monitoring method, and it is determined whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameters, and the first execution result of the target batch task is determined based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined by the predicted duration obtained by the target execution duration prediction model; based on the first execution result, the batch tasks to be retried are determined, and corresponding task retry operations are performed on the batch tasks to be retried.

[0049] As can be seen from the above, by introducing a software package containing a batch task execution framework provided based on a service discovery mechanism in the task execution server, the execution thread of the batch task is started, and it is determined whether the configuration parameter corresponding to the batch task is a parameter representing the asynchronous execution of the batch task. If the configuration parameter is a parameter representing the asynchronous execution of the batch task, it is determined whether there is a preset listening method in the batch task. If there is a preset listening method in the batch task, the batch task is determined as a target batch task, and the target batch task is executed using the execution thread. Then, it is determined whether the execution time of the target batch task exceeds the target time threshold in the configuration parameter, and the first execution result corresponding to the target batch task is determined based on the judgment result. In this way, the scheduling center can determine the batch task to be retried through the first execution result, integrate the retry mechanism of the batch task into the scheduling center, improve the function of the scheduling center, make the control and operation of the batch task more unified, improve the convenience of maintenance, and reduce the cost of batch task retry. 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 flow chart of a batch task retry method disclosed in this application;

[0052] Figure 2 A functional schematic diagram of a software package provided for this application;

[0053] Figure 3 A schematic diagram of a batch task execution method provided for this application;

[0054] Figure 4 A specific flow chart of a batch task retry method provided for this application;

[0055] Figure 5 This is a schematic diagram of the structure of a batch task retry device disclosed in this application;

[0056] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0057] 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.

[0058] At present, there are two solutions for batch task retry. One is that after checking and confirming the problem, the development or operation and maintenance personnel manually restart the batch task, that is, manual retry; the other is to write the automatic retry logic for each batch task during the development process, and automatically solve it by retrying within the task execution when the above problem occurs. However, the former is inefficient, time-consuming, and consumes extra manpower. Although the efficiency of the latter is slightly improved, each batch task needs to write its own retry logic for the same problem, which still has certain R&D costs and increases the complexity of coding. At the same time, we cannot automatically make a complete and reasonable system record of the execution exceptions and retries of batch tasks. To this end, this application provides a batch task retry method, which integrates the retry mechanism of batch tasks into the dispatching center, improves the function of the dispatching center, makes the control and operation of batch tasks more unified, improves the convenience of maintenance, and reduces the cost of batch task retry.

[0059] See also Figure 1 As shown, an embodiment of the present invention discloses a batch task retry method, comprising:

[0060] Step S11, using the scheduling center to obtain the configuration parameters of the batch task, and sending the batch task request generated based on the configuration parameters to the corresponding task execution server, so that the configuration parameters in the batch task request are stored in the memory queue through the task execution server.

[0061] In this embodiment, the corresponding configuration parameters can be configured for batch tasks through the scheduling center, the configuration parameters are obtained by using the scheduling center, and a batch task request containing the batch tasks and the corresponding configuration parameters is sent to the corresponding task execution server. After receiving the batch task request, the task execution server puts the configuration parameters in the batch task request into the memory queue of the task execution server. Among them, the configuration parameters include but are not limited to the maximum number of retries, whether it is an asynchronous task, and the retry interval.

[0062] Step S12: starting the execution thread corresponding to the batch task based on the software package introduced by the task execution server, and obtaining the batch task request from the memory queue through the execution thread; the software package is a software package including a batch task execution framework provided based on a service discovery mechanism.

[0063] In this embodiment, a software package including a batch task execution framework is provided based on a service discovery mechanism, and the software package is introduced through the task execution server to start the execution thread corresponding to the batch task, so as to pull the corresponding batch task request from the memory queue through the execution thread. Specifically, the software package introduced based on the task execution server starts the execution thread corresponding to the batch task, and obtains the batch task request from the memory queue through the execution thread, including: encapsulating the batch task execution framework into the software package based on the service discovery mechanism, and introducing the software package through the task execution server to start the execution thread corresponding to the batch task, and obtaining the corresponding batch task request from the memory queue through the execution thread; wherein the batch task execution framework includes a preset identification annotation corresponding to the batch task, a preset communication interface for receiving the batch task request sent by the scheduling center, a preset launcher for starting the task execution server, registering the service information corresponding to the batch task to the registration thread of the scheduling center, executing the execution thread of the batch task, and a preset executor interface encapsulated based on the execution thread.

[0064] It is understood that the software package includes a batch task execution framework, Figure 2A functional diagram of a software package provided for this embodiment, the software package includes a preset identification annotation corresponding to the batch task, a preset communication interface for receiving the batch task request sent by the scheduling center, an http interface, a preset launcher for starting the task execution server, a registration thread for registering the service information corresponding to the batch task to the scheduling center, the execution thread for executing the batch task, and a preset executor interface encapsulated based on the execution thread. Among them, the preset identification annotation is a custom annotation used to identify the batch task; the http (hypertext transfer protocol) interface is used to receive various requests from the scheduling center, mainly requests for detecting the health status of the task execution server and batch task invocation requests; the preset launcher is started when the server is started, and scans the bean (i.e., the role of the application material) of the executor implementation class of the batch task according to the preset identification annotation, encapsulates it into the execution thread object of the execution thread, and starts the execution thread, and is also responsible for starting the registration thread; the registration thread is used to register the service information corresponding to the execution of the batch task to the scheduling center; the execution thread is responsible for the batch task invocation and encapsulates the batch task execution process framework of the server; the preset executor interface is an encapsulated batch task execution interface, which provides a standard task invocation method for the access party to implement, and provides an optional preset listening method to process the asynchronously executed batch tasks.

[0065] Step S13: determining whether the configuration parameters corresponding to the batch tasks in the batch task request are parameters representing asynchronous execution of the batch tasks.

[0066] In this embodiment, after the batch task request is obtained, it is determined whether the configuration parameters corresponding to the batch tasks in the batch task request are parameters representing asynchronous execution of the batch tasks, so as to execute different methods based on different configuration parameters. Figure 3 A schematic diagram of a batch task execution method provided for this embodiment, wherein the encapsulation interface includes an execution method responsible for invoking the batch task and a listenProgress method (i.e., a preset listening method) for monitoring the progress of asynchronous batch task execution. For the batch task in which the entire process of invoking, data processing, and ending and returning result information is executed synchronously, it is only necessary to implement the execution method, but the logic contained in the execution method is relatively more complex, including not only the invoking of the task but also the judgment of the final status after the task execution is completed. For the batch task executed asynchronously, two methods need to be implemented, wherein the execution method is responsible for invoking the batch task, and the preset listening method is responsible for judging whether the batch task is completed and the completion status.

[0067] Step S14: If the configuration parameter is a parameter characterizing the asynchronous execution of the batch task, the execution thread is used to execute the target batch task for which a preset monitoring method exists, and it is determined whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and a first execution result of the target batch task is determined based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined based on the predicted duration obtained based on the target execution duration prediction model.

[0068] In this embodiment, after determining whether the configuration parameter corresponding to the batch task in the batch task request is a parameter representing the asynchronous execution of the batch task, the execution method of the batch task is different based on the different configuration parameters. In a specific implementation, if the configuration parameter is a parameter representing the asynchronous execution of the batch task, it is determined whether the preset executor interface that executes the batch task implements the preset monitoring method. If the preset executor interface implements the preset monitoring method, the batch task corresponding to the preset monitoring method is determined as the target batch task. Specifically, if the configuration parameter is a parameter representing the asynchronous execution of the batch task, the target batch task with the preset monitoring method is executed by using the execution thread, including: if the configuration parameter is a parameter representing the asynchronous execution of the batch task, it is determined whether the preset executor interface corresponding to the batch task implements the preset monitoring method; if the preset executor interface corresponding to the batch task implements the preset monitoring method, the target batch task that implements the preset monitoring method is obtained from the batch task.

[0069] Further, after obtaining the target batch task, it is determined whether the execution time of the target batch task exceeds the target time threshold determined based on the predicted time obtained by the target execution time prediction model. If the execution time of the target batch task exceeds the target time threshold, then the first execution result of the target batch task is characterized as execution failure. Specifically, the determination of whether the execution time of the target batch task exceeds the target time threshold in the configuration parameter, and determining the first execution result of the target batch task based on the determination result, includes: determining whether the execution time of the target batch task exceeds the target time threshold in the configuration parameter; if the execution time of the target batch task exceeds the target time threshold in the configuration parameter, then the state of the target batch task after execution is characterized as execution failure.

[0070] In another specific implementation, if the configuration parameter is not a parameter characterizing asynchronous execution of the batch task, it is proved that the batch task is a synchronously executed task, and the batch task is executed by the execution thread to obtain a second execution result. Specifically, if the configuration parameter is not a parameter characterizing asynchronous execution of the batch task, the batch task is executed by the execution thread to obtain a first execution result corresponding to the final state after the batch task is executed. Specifically, if the configuration parameter is a parameter characterizing asynchronous execution of the batch task, the target batch task with a preset listening method is executed by the execution thread, and it is determined whether the execution time of the target batch task exceeds the target time threshold in the configuration parameter, and after determining the first execution result of the target batch task based on the judgment result, it also includes: if the configuration parameter is not a parameter characterizing asynchronous execution of the batch task, the batch task is executed by the execution thread to obtain a second execution result.

[0071] In this embodiment, as the business volume gradually increases and fluctuates, the corresponding execution time will change accordingly. Therefore, the operation and maintenance or development personnel are required to reset the monitoring time at regular intervals, and after determining the target time threshold based on the predicted time obtained by the target execution time prediction model, determine whether the execution time of the target batch task exceeds the target time threshold. Among them, the process of determining the target time threshold includes: if the execution time of the target batch task is not greater than the target threshold, then use the preset fixed time threshold as the target time threshold; the target threshold is a threshold determined based on the target execution time, and the target execution time is the execution time determined based on the target number of target batch tasks and in accordance with the preset sliding window rule; if the execution time of the target batch task is greater than the target threshold, then obtain time series data based on the target number of target batch tasks, and perform a unit root test on the time series data; obtain target time series data that meets the preset reliability conditions based on the test results, and perform a unit root test on the target time series data by self-testing the target time series data. Correlation function calculation and partial autocorrelation function calculation are performed to obtain the corresponding number of autoregressive terms and moving average terms; each initial monitoring prediction model is constructed by each differential order corresponding to the target time series data, each of the autoregressive terms and each of the moving average terms, and each of the initial monitoring prediction models is evaluated and tested by the Akaike information criterion to obtain a target execution time prediction model; when the target execution time prediction model predicts the execution time of the target batch task, if the predicted time is less than the target value, the preset time threshold is used as the target time threshold; if the predicted time is greater than the target value, the target time threshold is obtained based on the predicted time and the preset time threshold.

[0072] Furthermore, the target execution duration prediction model can be used to predict the execution duration of asynchronous batch tasks. For a new target batch task, due to insufficient data volume in the initial stage, the execution progress of the target batch task is monitored according to the initial duration threshold configured for the first time. When the data volume meets the preset trigger condition, the target batch task based on the target quantity is triggered and the step of determining the target execution time according to the preset sliding window rule is performed. In a specific implementation, the latest 180 pieces of data can be taken, and the number of data falling within the window can be intercepted and counted with 5 minutes as the window and 1 minute as the step length, that is, window 1 is 0-5 minutes, and window 2 is 1-6 minutes, to see whether the start time corresponding to the window with the largest number is less than 60 minutes. At this time, 60 minutes is equivalent to the target threshold. If the window time period corresponding to the window with the largest number is less than 60 minutes, it indicates that the execution time of the target batch task is short, and 60 minutes can be used as the target time threshold; if the window time period corresponding to the window with the largest number is not less than 60 minutes, 90 pieces are used as the window and 30 pieces are used as the step length to divide the 180 pieces of data into 4 groups of time series, that is, 0-90 pieces are one group, 30-120 pieces are one group, 60-160 pieces are one group, and 0-180 pieces are one group. The following operations are performed on each group of original time series: First, ADF (Augmented Fourier Transformation) is used to generate the target batch task. The Dickey-Fuller (a statistical method for testing the stationarity of time series data) test performs 90%, 95%, and 99% confidence tests on the original time series, the first-order difference series, and the second-order difference series, respectively, to eliminate the series that fail any test, where the first-order difference series refers to the operation of calculating the difference between the current element and the previous element for each element in the original time series. Specifically, for the nth element in the sequence, its first-order difference is defined as the difference between the nth element and the n-1th element.

[0073] If the confidence test of each difference sequence fails, continue to calculate the n-order difference sequence; then perform model identification on all the obtained sequences respectively, first calculate their autocorrelation function (ACF, Autocorrelation Function) and partial autocorrelation function (PACF, Partial AutoCorrelation Function), for example, a set of time series , and The correlation coefficient is The k-order correlation coefficient, the autocorrelation coefficient calculation formula is as follows:

[0074] ;

[0075] in, is the length of the time series, is the mean of the complete time series, is the autocovariance, and the calculation formula of the autocovariance is:

[0076] ;

[0077] For example, a complete time series is , the first part is , the latter part is , the mean is , the variance corresponding to the time series is:

[0078] ; The autocovariance is:

[0079] ;

[0080] The autocorrelation coefficient is:

[0081] ;

[0082] It is understandable that any partial autocorrelation function PACF calculation method can be used, and then the corresponding multiple suitable autoregressive terms p and moving average terms q are obtained, thereby obtaining the three key parameters p, q and differential order d of the initial monitoring prediction model, where the differential order d is the order of the original time series that needs to be differentiated to build multiple available prediction models. Then the obtained multiple prediction models are evaluated, and the Akaike Information Criterion (AIC) is used to determine the target execution time prediction model for each data group, that is, to determine unique p, d, and q for the four groups of data. If the target execution time prediction model of each of the four groups of data is the same, the target execution time prediction model is directly used for prediction. Otherwise, the first three groups of data are predicted using the established model, and the predicted data are compared with the actual data for a chi-square test, that is, the predicted data of each of the first three groups are compared with the actual data, and the error = |predicted data-actual data| / actual data. If the error obtained is less than 5%, the prediction is considered valid, otherwise it is invalid. In this way, the frequencies of valid data and invalid data of the three groups are counted, and chi-square tests are performed on each of them, and finally the only optimal target execution time prediction model is obtained. The target execution time prediction model is used to predict the next execution time of the target batch task. When the target execution time prediction model predicts the execution time of the target batch task, if the predicted time is lower than the target value, the default preset time threshold is used; if the predicted value is higher than the target value, the predicted time plus the preset time threshold is used as the target time threshold.

[0083] Step S15: determine the batch tasks to be retried based on the first execution result, and perform corresponding task retry operations on the batch tasks to be retried.

[0084] In this embodiment, after obtaining the first execution result and the second execution result, the batch tasks to be retried are determined based on the first execution result and the second execution result, and the corresponding task retry operation is performed on the batch tasks to be retried. Specifically, the determining the batch tasks to be retried based on the first execution result and the performing the corresponding task retry operation on the batch tasks to be retried includes: determining the batch tasks to be retried based on the first execution result and the second execution result, and performing the corresponding task retry operation on the batch tasks to be retried.

[0085] It is understandable that if the first execution result or the second execution result is an execution failure, the batch task or the target batch task that failed to execute is determined as a batch task to be retried, and a task retry operation is performed on the batch task to be retried. Specifically, the batch task to be retried is determined based on the first execution result, and a corresponding task retry operation is performed on the batch task to be retried, including: if the status of the target batch task after execution is an execution failure, the target batch task is determined as a batch task to be retried, and a corresponding task retry operation is performed on the batch task to be retried.

[0086] Furthermore, after determining the batch tasks to be retried, it is determined that the number of retries corresponding to the batch tasks to be retried is greater than a preset retry threshold, and based on the determination result, the scheduling records corresponding to the batch tasks to be retried are marked or the batch task scheduling process is reopened. Specifically, the method of determining the batch tasks to be retried based on the first execution result and the second execution result, and performing corresponding task retry operations on the batch tasks to be retried, includes: determining the batch tasks to be retried based on the first execution result and the second execution result, and judging whether the number of retries corresponding to the batch tasks to be retried is greater than a preset retry threshold; if the number of retries corresponding to the batch tasks to be retried is greater than the preset retry threshold, marking the first scheduling record corresponding to the batch tasks to be retried as a failed state; if the number of retries corresponding to the batch tasks to be retried is not greater than the preset retry threshold, marking the first scheduling record corresponding to the batch tasks to be retried as retried; creating a second scheduling record for recording that the batch tasks to be retried are pulled by the task execution server using the batch tasks to be retried, and jumping to the step of obtaining the configuration parameters of the batch tasks using the scheduling center based on the preset retry interval time.

[0087] In a specific implementation, during the first scheduling, the preset retry threshold corresponding to the batch task to be retried is read. When the batch task to be retried is retried, the original retry record -1 is used as the new number of possible retries until the number of possible retries is 0, indicating that the batch task to be retried cannot be retried. If the batch task to be retried cannot be retried, that is, the number of retries corresponding to the batch task to be retried is greater than the preset retry threshold, the scheduling record corresponding to the batch task to be retried is marked as a failed state and sealed; if the batch task to be retried can be retried, that is, the number of retries corresponding to the batch task to be retried is not greater than the preset retry threshold, a database transaction is started, the scheduling record corresponding to the batch task to be retried is marked as retried, and a new scheduling record is initialized to be associated with the batch task to be retried, and finally the task scheduling process is restarted based on the preset retry interval. It should be pointed out that the preset retry threshold and the preset retry interval can be adjusted according to actual conditions, and are not specifically limited here.

[0088] As can be seen from the above, by introducing a software package containing a batch task execution framework provided based on a service discovery mechanism in the task execution server, the execution thread of the batch task is started, and it is determined whether the configuration parameter corresponding to the batch task is a parameter representing the asynchronous execution of the batch task. If the configuration parameter is a parameter representing the asynchronous execution of the batch task, it is determined whether there is a preset listening method in the batch task. If there is a preset listening method in the batch task, the batch task is determined as a target batch task, and the target batch task is executed using the execution thread. Then, it is determined whether the execution time of the target batch task exceeds the target time threshold in the configuration parameter, and the first execution result corresponding to the target batch task is determined based on the judgment result. In this way, the scheduling center can determine the batch task to be retried through the first execution result, integrate the retry mechanism of the batch task into the scheduling center, improve the function of the scheduling center, make the control and operation of the batch task more unified, improve the convenience of maintenance, and reduce the cost of batch task retry.

[0089] It can be seen from the above embodiments that the present application performs task retry operations on batch tasks that are executed synchronously or asynchronously based on the scheduling center and the task execution server. Therefore, the process of performing task retry operations on batch tasks that are executed synchronously or asynchronously based on the scheduling center and the task execution server is described.

[0090] See also Figure 4 As shown, the embodiment of the present invention provides a specific batch task retry method, including:

[0091] First, the configuration parameters corresponding to various executions of batch tasks are obtained through the scheduling center, and the batch task request generated by the configuration parameters is sent to the corresponding task execution server, and the batch task request is received by the task execution server, and the configuration parameters in the batch task request are stored in the memory queue. At the same time, the software package containing the batch task execution framework introduced by the task execution server starts the service to start the execution thread, and then pulls the batch task request from the memory queue to determine whether the configuration parameters corresponding to the batch task in the batch task request are parameters representing the asynchronous execution of the batch task. If the configuration parameters are parameters representing the asynchronous execution of the batch task, the execution thread is used to execute the target batch task with the preset listening method until the target batch task is executed and the first execution result is obtained; if the configuration parameters are parameters representing the synchronous execution of the batch task, the execution thread is used to execute the batch task, and the second execution result is obtained based on the execution result state, and the first execution result and the second execution result are sent to the scheduling center in the form of a message queue.

[0092] After the message queue is obtained through the dispatch center, the batch task to be retried is obtained based on the message queue, and the original scheduling record and corresponding configuration parameters of the batch task to be retried are queried from the database, and a series of business and state checks can be performed in combination with the wired state machine. Specifically, the state machine is initialized using the current state of the original scheduling record, and the retry signal corresponding to the batch task to be retried is input. If the next state is output normally, the step can be continued. If the state machine exits, the message is intercepted. Then, it is determined whether the number of retries corresponding to the batch task to be retried exceeds the preset retry threshold. If the number of retries corresponding to the batch task to be retried exceeds the preset retry threshold, the original scheduling record corresponding to the batch task to be retried is marked as a failed state and sealed; if the number of retries corresponding to the batch task to be retried does not exceed the preset retry threshold, the first scheduling record corresponding to the batch task to be retried is marked as retried and sealed, and then a new scheduling record is initialized for association, and finally the task scheduling process is restarted according to the preset retry interval.

[0093] As can be seen from the above, introducing the batch task retry framework into the task execution server in the form of a software package avoids a lot of repeated development or manual maintenance and improves the efficiency of task retry; integrating the batch task retry mechanism into the scheduling platform improves the function of the scheduling platform, making the control and operation of batch tasks more unified and improving the convenience of maintenance; recording the batch task retries and supporting page display, which helps to understand and control the task execution status and helps to troubleshoot and handle task execution exceptions.

[0094] Accordingly, see Figure 5 As shown, the present application also provides a batch task retry device, comprising:

[0095] The task request sending module 11 is used to obtain the configuration parameters of the batch task by using the scheduling center, and send the batch task request generated based on the configuration parameters to the corresponding task execution server, so that the configuration parameters in the batch task request are stored in the memory queue by the task execution server;

[0096] An execution thread start module 12 is used to start the execution thread corresponding to the batch task based on the software package introduced by the task execution server, and obtain the batch task request from the memory queue through the execution thread; the software package is a software package including a batch task execution framework provided based on a service discovery mechanism;

[0097] A configuration parameter determination module 13 is used to determine whether the configuration parameter corresponding to the batch task in the batch task request is a parameter representing asynchronous execution of the batch task;

[0098] An execution result determination module 14 is used for, if the configuration parameter is a parameter characterizing asynchronous execution of the batch task, using the execution thread to execute the target batch task for which a preset monitoring method exists, judging whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and determining the first execution result of the target batch task based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined based on the predicted duration obtained by the target execution duration prediction model;

[0099] The task retry module 15 is used to determine the batch tasks to be retried based on the first execution result, and perform corresponding task retry operations on the batch tasks to be retried.

[0100] As can be seen from the above, by introducing a software package containing a batch task execution framework provided based on a service discovery mechanism in the task execution server, the execution thread of the batch task is started, and it is determined whether the configuration parameter corresponding to the batch task is a parameter representing the asynchronous execution of the batch task. If the configuration parameter is a parameter representing the asynchronous execution of the batch task, it is determined whether there is a preset listening method in the batch task. If there is a preset listening method in the batch task, the batch task is determined as a target batch task, and the target batch task is executed using the execution thread. Then, it is determined whether the execution time of the target batch task exceeds the target time threshold in the configuration parameter, and the first execution result corresponding to the target batch task is determined based on the judgment result. In this way, the scheduling center can determine the batch task to be retried through the first execution result, integrate the retry mechanism of the batch task into the scheduling center, improve the function of the scheduling center, make the control and operation of the batch task more unified, improve the convenience of maintenance, and reduce the cost of batch task retry.

[0101] In some specific implementations, the execution thread start module 12 may specifically include:

[0102] The task request acquisition unit is used to encapsulate the batch task execution framework into a software package based on a service discovery mechanism, introduce the software package through the task execution server to start the execution thread corresponding to the batch task, and obtain the corresponding batch task request from the memory queue through the execution thread.

[0103] In some specific implementations, the batch task retry device may further include:

[0104] A first configuration parameter judgment unit, configured to, if the configuration parameter is not a parameter representing asynchronous execution of the batch task, execute the batch task using the execution thread to obtain a second execution result;

[0105] Accordingly, the task retry module 15 may specifically include:

[0106] The first task retry completion unit is used to determine the batch tasks to be retried based on the first execution result and the second execution result, and perform corresponding task retry operations on the batch tasks to be retried.

[0107] In some specific implementations, the task retry module 15 may specifically include:

[0108] a retry times judging unit, configured to determine the batch tasks to be retried based on the first execution result and the second execution result, and to judge whether the number of retries corresponding to the batch tasks to be retried is greater than a preset retry threshold;

[0109] A first record marking unit, configured to mark a first scheduling record corresponding to the batch task to be retried as a failure state if the number of retries corresponding to the batch task to be retried is greater than a preset retry threshold;

[0110] A second record marking unit, configured to mark the first scheduling record corresponding to the batch task to be retried as retried if the number of retries corresponding to the batch task to be retried is not greater than a preset retry threshold;

[0111] A scheduling record creation unit is used to use the batch task to be retried to create a second scheduling record for recording that the batch task to be retried is pulled by the task execution server, and jump to the step of obtaining the configuration parameters of the batch task using the scheduling center based on the preset retry interval time.

[0112] In some specific implementations, the configuration parameter determination module 13 may specifically include:

[0113] A second configuration parameter judgment unit is used to judge whether a preset executor interface corresponding to the batch task implements a preset monitoring method if the configuration parameter is a parameter representing asynchronous execution of the batch task;

[0114] The target task acquisition unit is used to acquire a target batch task that implements the preset monitoring method from the batch tasks if the preset executor interface corresponding to the batch tasks implements the preset monitoring method.

[0115] In some specific implementations, the execution result determination module 14 may specifically include:

[0116] An execution time determination unit, used to determine whether the execution time of the target batch task exceeds the target time threshold in the configuration parameters;

[0117] a task status determination unit, configured to indicate that the status of the target batch task after execution is execution failure if the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter;

[0118] Accordingly, the task retry module 15 may specifically include:

[0119] The second task retry completion unit is used to determine the target batch task as a batch task to be retried if the state of the target batch task after execution is execution failure, and perform a corresponding task retry operation on the batch task to be retried.

[0120] In some specific implementations, the execution result determination module 14 may specifically include:

[0121] a target duration threshold determination unit, configured to use a preset fixed duration threshold as the target duration threshold if the execution duration of the target batch task is not greater than the target threshold; the target threshold is a threshold determined based on a target execution time, and the target execution time is an execution time determined based on the target number of target batch tasks and in accordance with a preset sliding window rule;

[0122] a data verification unit, configured to obtain time series data based on a target number of target batch tasks if the execution time of the target batch tasks is greater than a target threshold, and perform a unit root test on the time series data;

[0123] A function calculation unit, used to obtain target time series data that meets a preset reliability condition based on the test result, and to obtain the corresponding number of autoregressive terms and moving average terms by performing autocorrelation function calculation and partial autocorrelation function calculation on the target time series data;

[0124] A target model determination unit, configured to construct each initial monitoring prediction model by using each difference order corresponding to the target time series data, each number of the autoregressive terms, and each number of the moving average terms, and to evaluate each initial monitoring prediction model by using the Akaike information criterion and performing a chi-square test to obtain a target execution duration prediction model;

[0125] A first threshold determination unit is configured to use a preset duration threshold as the target duration threshold when the target execution duration prediction model predicts the execution duration of the target batch task, if the predicted duration is less than the target value;

[0126] The second threshold determination unit is used to obtain the target duration threshold based on the predicted duration and the preset duration threshold if the predicted duration is greater than the target value.

[0127] Furthermore, the present application also discloses an electronic device. Figure 6 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input and output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the batch task retry method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0128] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0129] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0130] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the batch task retry method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0131] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the batch task retry method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.

[0132] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0133] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0134] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

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

[0136] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A batch task retry method, characterized in that: include: Using the scheduling center to obtain the configuration parameters of the batch task, and sending the batch task request generated based on the configuration parameters to the corresponding task execution server, so that the configuration parameters in the batch task request are stored in the memory queue through the task execution server; Based on the software package introduced by the task execution server, an execution thread corresponding to the batch task is started, and the batch task request is obtained from the memory queue through the execution thread; The software package is a software package including a batch task execution framework provided based on a service discovery mechanism; Determine whether the configuration parameter corresponding to the batch task in the batch task request is a parameter representing asynchronous execution of the batch task; If the configuration parameter is a parameter characterizing asynchronous execution of the batch task, the execution thread is used to execute the target batch task for which a preset monitoring method exists, and it is determined whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and a first execution result of the target batch task is determined based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined based on the predicted duration obtained by the target execution duration prediction model; The batch tasks to be retried are determined based on the first execution result, and corresponding task retry operations are performed on the batch tasks to be retried.

2. The batch task retry method according to claim 1, characterized in that: The software package introduced based on the task execution server starts the execution thread corresponding to the batch task, and obtains the batch task request from the memory queue through the execution thread, including: Based on the service discovery mechanism, the batch task execution framework is encapsulated into a software package, and the software package is introduced through the task execution server to start the execution thread corresponding to the batch task, and the corresponding batch task request is obtained from the memory queue through the execution thread; Among them, the batch task execution framework includes a preset identification annotation corresponding to the batch task, a preset communication interface for receiving the batch task request sent by the scheduling center, a preset launcher for starting the task execution server, a registration thread for registering the service information corresponding to the batch task to the scheduling center, the execution thread for executing the batch task, and a preset executor interface encapsulated based on the execution thread.

3. The batch task retry method according to claim 1, characterized in that: If the configuration parameter is a parameter characterizing asynchronous execution of the batch task, the method further includes: using the execution thread to execute the target batch task with a preset listening method, determining whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and determining the first execution result of the target batch task based on the determination result. If the configuration parameter is not a parameter indicating asynchronous execution of the batch task, executing the batch task using the execution thread to obtain a second execution result; Correspondingly, determining the batch tasks to be retried based on the first execution result, and performing corresponding task retry operations on the batch tasks to be retried includes: The batch of tasks to be retried is determined based on the first execution result and the second execution result, and a corresponding task retry operation is performed on the batch of tasks to be retried.

4. The batch task retry method according to claim 3, characterized in that: The determining the batch of tasks to be retried based on the first execution result and the second execution result, and performing corresponding task retry operations on the batch of tasks to be retried, includes: Determine the batch tasks to be retried based on the first execution result and the second execution result, and determine whether the number of retries corresponding to the batch tasks to be retried is greater than a preset retry threshold; If the number of retries corresponding to the batch task to be retried is greater than a preset retry threshold, marking the first scheduling record corresponding to the batch task to be retried as a failed state; If the number of retries corresponding to the batch task to be retried is not greater than the preset retry threshold, marking the first scheduling record corresponding to the batch task to be retried as retried; The batch tasks to be retried are used to create a second scheduling record for recording that the batch tasks to be retried are pulled by the task execution server, and based on a preset retry interval time, the step of using the scheduling center to obtain configuration parameters of the batch tasks is jumped to.

5. The batch task retry method according to any one of claims 1 to 4, characterized in that: If the configuration parameter is a parameter indicating asynchronous execution of the batch task, the execution thread is used to execute the target batch task with a preset monitoring method, including: If the configuration parameter is a parameter representing asynchronous execution of the batch task, determining whether the preset executor interface corresponding to the batch task implements a preset monitoring method; If the preset executor interface corresponding to the batch task implements the preset monitoring method, a target batch task that implements the preset monitoring method is obtained from the batch task.

6. The batch task retry method according to claim 1, characterized in that: The determining whether the execution duration of the target batch task exceeds the target duration threshold in the configuration parameter, and determining the first execution result of the target batch task based on the determination result, includes: Determine whether the execution time of the target batch task exceeds the target time threshold in the configuration parameters; If the execution time of the target batch task exceeds the target time threshold in the configuration parameter, the state after the target batch task is executed is characterized as execution failure; Correspondingly, determining the batch tasks to be retried based on the first execution result, and performing corresponding task retry operations on the batch tasks to be retried includes: If the status of the target batch task after execution is execution failure, the target batch task is determined as a batch task to be retried, and a corresponding task retry operation is performed on the batch task to be retried.

7. The batch task retry method according to claim 6, characterized in that: The process of determining the target duration threshold includes: If the execution time of the target batch task is not greater than the target threshold, the preset fixed time threshold is used as the target time threshold; the target threshold is a threshold determined based on the target execution time, and the target execution time is the execution time of the target batch task based on the target number and determined according to the preset sliding window rule; If the execution time of the target batch task is greater than the target threshold, obtaining time series data based on the target batch task of the target number, and performing a unit root test on the time series data; Based on the test results, target time series data that meets the preset reliability conditions is obtained, and the corresponding number of autoregressive items and moving average items are obtained by calculating the autocorrelation function and the partial autocorrelation function of the target time series data; Constructing each initial monitoring prediction model by each difference order corresponding to the target time series data, each number of the autoregressive terms, and each number of the moving average terms, and evaluating each initial monitoring prediction model by using the Akaike information criterion and performing a chi-square test to obtain a target execution time prediction model; When the target execution duration prediction model predicts the execution duration of the target batch task, if the obtained predicted duration is less than the target value, the preset duration threshold is used as the target duration threshold; If the predicted duration is greater than the target value, the target duration threshold is obtained based on the predicted duration and the preset duration threshold.

8. A batch task retry device, characterized in that: include: A task request sending module, used to obtain the configuration parameters of the batch task using the scheduling center, and send the batch task request generated based on the configuration parameters to the corresponding task execution server, so that the configuration parameters in the batch task request are stored in the memory queue through the task execution server; An execution thread start module, used to start the execution thread corresponding to the batch task based on the software package introduced by the task execution server, and obtain the batch task request from the memory queue through the execution thread; The software package is a software package including a batch task execution framework provided based on a service discovery mechanism; A configuration parameter determination module, used to determine whether the configuration parameter corresponding to the batch task in the batch task request is a parameter representing asynchronous execution of the batch task; An execution result determination module is used for, if the configuration parameter is a parameter characterizing asynchronous execution of the batch task, using the execution thread to execute a target batch task for which a preset monitoring method exists, judging whether the execution duration of the target batch task exceeds a target duration threshold in the configuration parameter, and determining a first execution result of the target batch task based on the judgment result; wherein the preset monitoring method is used to monitor the execution progress of the target batch task, and the target duration threshold is a duration threshold determined based on a predicted duration obtained by a target execution duration prediction model; The task retry module is used to determine the batch tasks to be retried based on the first execution result, and perform corresponding task retry operations on the batch tasks to be retried.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the batch task retry method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the batch task retry method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data consistency processing method and equipment

    CN113392119A

  • Method and device for processing batch tasks

    CN114327816A

  • Message queue processing method and device based on service scene

    CN116800698A

  • Batch task distributed scheduling method and device

    CN117806799A

  • Managing load in request processing environments

    US20200089545A1