Abnormal job processing method and device, electronic equipment and storage medium

By setting job parameters and time round algorithms, the problems of untimely reminding of abnormal jobs and high resource consumption are solved, flexible timing task execution and efficient abnormal job handling are realized, and system stability and job efficiency are improved.

CN120295822APending Publication Date: 2025-07-11JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510365622.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The reminder method for abnormal jobs in the prior art relies on timed task query, resulting in large resource consumption and untimely reminders, affecting system stability.

Method used

By setting the parameters of job waiting time, running time and inspection cycle, the time round algorithm is used to store job reminder data, reducing invalid judgment and resource consumption, and achieving flexible timing task execution.

Benefits of technology

On the basis of ensuring the timeliness of reminders, it reduces resource consumption, improves system stability and abnormal job handling efficiency, helps users to promptly discover resource deficiency or fault problems, and shortens the job operation cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295822A_ABST
    Figure CN120295822A_ABST
Patent Text Reader

Abstract

The invention discloses an abnormal job processing method and device, electronic equipment and a storage medium, and relates to the technical field of high-performance computing, by setting parameters of job reminding and storing job reminding information to a time wheel, the number of times of access to systems such as a database can be effectively reduced, the number of times of invalid judgment of job reminding can be reduced, and the working efficiency can be improved. The timing task period can be set more finely and flexibly, occupation of computer resources is reduced to the maximum extent on the basis of guaranteeing reminding timeliness, system stability is maintained, abnormal operation is reminded in time, and the working efficiency is improved. According to the method, the problem of insufficient server cluster resources or improper resource management as well as server hardware faults or software errors can be found earlier by the user, so that the operation cycle of the user is shortened, the operation efficiency is improved, and time and resource waste caused by abnormal operation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of high-performance computing technology, and in particular, to a method, device, electronic device, and storage medium for processing abnormal jobs. Background Art

[0002] When processing high-performance computing tasks, the problem of abnormal jobs often occurs. In the related art, the reminder method for abnormal jobs mainly relies on querying job information that meets requirements such as job status and job start time by means of a timed task to query jobs within a fixed time period, and then giving a reminder. However, this method requires querying a large amount of job data. Many of these jobs have not reached the time to determine whether to send a reminder, and they do not adapt dynamically according to the job submission time, which belongs to invalid data and occupies server resources. In order to balance the real-time nature of the reminder and the consumption of server resources, the execution granularity of the timed task needs to be strictly calculated. That is, if the time granularity is too coarse, it will inevitably lead to untimely reminders for abnormal jobs; if the time granularity is too fine, it will lead to too frequent queries and excessive resource occupation, affecting the overall stability of the system. Therefore, there is an urgent need to propose a method, device, electronic device, and storage medium for processing abnormal jobs that can reduce resource consumption while ensuring the timeliness of reminders. Summary of the Invention

[0003] This application provides a method, device, electronic device, and storage medium for processing abnormal jobs to at least solve the problems of untimely reminders and high resource consumption in the processing of abnormal jobs in the related art.

[0004] This application provides a method for processing abnormal jobs, including:

[0005] Obtain a job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0006] Obtain a time wheel, and determine the number of cycles of the target job on the time wheel based on the job parameters of the target job. The time wheel is composed of multiple nodes;

[0007] Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel;

[0008] According to a preset time period, obtain and traverse the job information linked list of the current node;

[0009] Determine whether it meets the preset reminder standard according to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node. If it meets the standard, send a job reminder message.

[0010] This application also provides a device for processing abnormal jobs, including:

[0011] A target job generation module, configured to obtain a job to be submitted, set job parameters for the job to be submitted, and obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0012] A parameter processing module, configured to obtain a time wheel, and determine the number of cycles of the target job on the time wheel based on the job parameters of the target job, where the time wheel consists of multiple nodes;

[0013] An information linked list generation module, configured to obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel, where the attribute information at least includes a reminder information type;

[0014] A traversal module, configured to obtain and traverse the job information linked list of the current node according to a preset time period;

[0015] A reminder module, configured to determine whether it meets a preset reminder standard according to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node, and if it meets the standard, send a job reminder message.

[0016] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the following steps of an abnormal job processing method when executing the computer program:

[0017] Obtain a job to be submitted, set job parameters for the job to be submitted, and obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0018] Obtain a time wheel, and determine the number of cycles of the target job on the time wheel based on the job parameters of the target job, where the time wheel consists of multiple nodes;

[0019] Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel;

[0020] According to a preset time period, obtain and traverse the job information linked list of the current node;

[0021] Determine whether it meets a preset reminder standard according to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node, and if it meets the standard, send a job reminder message.

[0022] This application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps of an abnormal job processing method are implemented:

[0023] Obtain the job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0024] Obtain a time wheel, and based on the job parameters of the target job, determine the number of cycles of the target job on the time wheel. The time wheel consists of multiple nodes;

[0025] Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel;

[0026] According to a preset time period, obtain and traverse the job information linked list of the current node;

[0027] According to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node, determine whether it meets the preset reminder criteria. If it meets, send a job reminder message.

[0028] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps of the abnormal job processing method are implemented:

[0029] Obtain the job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0030] Obtain a time wheel, and based on the job parameters of the target job, determine the number of cycles of the target job on the time wheel. The time wheel consists of multiple nodes;

[0031] Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel;

[0032] According to a preset time period, obtain and traverse the job information linked list of the current node;

[0033] According to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node, determine whether it meets the preset reminder criteria. If it meets, send a job reminder message.

[0034] By setting the parameters of job reminders and saving the job reminder information to the time wheel, this application can effectively reduce the number of accesses to systems such as databases, reduce the number of ineffective judgments for job reminders, and make the timing task cycle more precise and flexible. On the basis of ensuring the timeliness of reminders, it can minimize the occupation of computer resources to the greatest extent and maintain system stability. By promptly reminding of abnormal jobs, it helps users discover earlier the insufficient or mismanaged server cluster resources, server hardware failures or software errors, thereby shortening the user job running cycle, improving job efficiency, and reducing the waste of time and resources caused by abnormal jobs. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0036] Figure 1 FIG. is an application environment diagram of an abnormal job processing method provided by an embodiment of this application;

[0037] Figure 2 FIG. is a schematic overall flow diagram of an abnormal job processing method provided by an embodiment of this application;

[0038] Figure 3 FIG. is another schematic overall flow diagram of an abnormal job processing method provided by an embodiment of this application;

[0039] Figure 4 FIG. is a schematic diagram of the time wheel structure of an abnormal job processing method provided by an embodiment of this application;

[0040] Figure 5 FIG. is a structural block diagram of an abnormal job processing device provided by an embodiment of this application;

[0041] Figure 6 FIG. is an internal structure diagram of an electronic device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] The following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, rather than all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of this application.

[0043] It should be noted that in the description of this application, 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 not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0044] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing steps, and do not particularly refer to the meaning of order or sequence, nor are they used to limit this application. They are only for the convenience of describing the method of this application and should not be construed as indicating the order of steps. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0045] High Performance Computing (HPC) refers to the use of computer clusters integrated with various technologies to jointly process the computing problems of massive data, which can greatly improve the speed and accuracy of computing. It has now been used in many fields such as simulation modeling and big data analysis. When dealing with high-performance computing tasks, problems of abnormal jobs are often encountered. These abnormal jobs mainly include jobs with waiting timeouts, abnormally aborted jobs, jobs with running timeouts, etc. The reasons for abnormal jobs may be caused by software errors, hardware failures, or improper resource management. Users may submit a large number of high-performance jobs in a short period of time, and these submitted high-performance jobs may have abnormal problems such as long waiting and running times. Users cannot obtain the abnormal jobs in real time, which affects the timing of users' handling of abnormal jobs, wastes a lot of time and resources, and affects the normal progress of users' jobs. Therefore, it is particularly important to be able to obtain an abnormal job reminder in the first time, which helps users optimize job scripts and reduce the ineffective occupation of resources.

[0046] According to the background art, in the related art, the reminder method for abnormal operations mainly relies on querying job information that meets requirements such as job status and job start time by means of a scheduled task to query jobs in a fixed time period, and then issues a reminder; however, this method requires querying a large amount of job data, and many of these jobs have not reached the time to determine whether to issue a reminder, and will not be dynamically adapted according to the job submission time, which belongs to invalid data and occupies server resources. In order to balance the real-time nature of the reminder and the consumption of server resources, the execution granularity of the scheduled task needs to be strictly calculated. That is, if the time granularity is too coarse, it will inevitably lead to untimely reminders for abnormal jobs; if the time granularity is too fine, it will lead to too frequent queries and excessive resource occupation, affecting the overall stability of the system.

[0047] To solve the above technical problems, the present application provides an abnormal job processing method, device, electronic device and storage medium. When a job is submitted, a job waiting duration threshold, a job running duration threshold, and a job failure check period are set to ensure independent reminders for three types of abnormal jobs. The time wheel algorithm is used to store job reminder data, and a calculation method for re-queueing job reminders is adopted to reduce invalid judgments and resource consumption, shorten the execution period of the scheduled task, and improve the timeliness of job reminders.

[0048] In order to enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] The abnormal job processing method provided by the present application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the data processing platform set on the server 104 through a network. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0050] As Figure 2 shown, an embodiment of the present application provides an abnormal job processing method. Taking the method applied to the Figure 1 terminal as an example, the method includes the following steps:

[0051] S1: Obtain a job to be submitted, set job parameters for the job to be submitted to obtain a target job, and the job parameters at least include a time dimension for describing the job.

[0052] It should be noted that a job refers to one or more related processes that are being executed, and a job to be submitted refers to a task process to be submitted. Job parameters include at least the job waiting duration, job running duration, and job inspection period, that is, the job waiting duration threshold required for job reminder (calculated starting from the job submission time), the job running duration threshold (calculated starting from the job start time, and the job may wait for a period of time due to resource shortage or other reasons before actually starting to run), and the inspection period for job failure (calculated starting from the job submission time). Among them, the three parameters must be multiples of the execution period of the timing task, and the execution period of the timing task can be set according to actual needs; job parameters also include parameters such as the script required for job running and resource limits.

[0053] Specifically, as Figure 3 shown, before submitting a job, set the job waiting duration, job running duration, and job inspection period parameters for the job to be submitted to obtain a target job.

[0054] In the above embodiment, by setting the job waiting duration threshold, job running duration threshold, and job failure inspection period, it is used to calculate reminder data subsequently, ensuring independent reminders for three types of abnormal jobs and reducing ineffective judgments.

[0055] S2: Obtain a time wheel, and based on the job parameters of the target job, determine the number of cycles of the target job on the time wheel. The time wheel consists of multiple nodes.

[0056] It should be noted that, as Figure 4 shown, a time wheel refers to an implementation of a timer based on a circular queue (Circular Buffer). The time wheel is divided into multiple discrete slots, and each slot represents a time interval. Among them, in this application, the time wheel is a ring of a certain length, and a slot represents a node on the ring. There are multiple nodes and a current node pointer set on the time wheel. The subscript value of the node is the node value. After initialization, the current node subscript value is 0, and the subscript value of the current node will move forward by one position after the execution period of a node task according to the execution period of the timing task until it reaches the end position of the ring, and then starts again from the start position. The length (number of nodes) of the time wheel can be set according to actual needs, such as 60, 3600, etc. The number of cycles refers to the number of laps.

[0057] In some specific embodiments, determining the number of cycles of the target job on the time wheel based on the job parameters of the target job includes:

[0058] Obtain the job waiting duration, and based on the first objective function and the job waiting duration, determine the first number of cycles, where the first objective function includes:

[0059]

[0060] Among them, C1 represents the first number of cycles, S1 represents the job waiting duration, T represents the scheduled task running period, and R represents the total number of nodes in the time wheel;

[0061] Obtain the job running duration, and determine the second number of cycles based on the second objective function and the job running duration, where the second objective function includes:

[0062]

[0063] Among them, C2 represents the second number of cycles, S2 represents the job running duration, T represents the scheduled task running period, and R represents the total number of nodes in the time wheel;

[0064] Obtain the job inspection period, and determine the third number of cycles based on the third objective function and the job inspection period, where the third objective function includes:

[0065]

[0066] Among them, C3 represents the third number of cycles, S3 represents the job inspection period, T represents the scheduled task running period, and R represents the total number of nodes in the time wheel.

[0067] Among them, the first number of cycles refers to the number of circles corresponding to the job waiting duration, the second number of cycles refers to the number of circles corresponding to the job running duration, and the third number of cycles refers to the number of circles corresponding to the job inspection period. The above numbers of cycles can all be calculated by job parameter duration / scheduled task running period / total number of nodes in the time wheel. Among them, the job parameter duration is the above-mentioned job waiting duration, job running duration, and job inspection period. The numbers of cycles respectively refer to the nodes in the time wheel where abnormal jobs corresponding to the job waiting duration, job running duration, and job inspection period need to be reminded. For example, if the total number of nodes in the time wheel is 20, if the node corresponding to the job waiting duration is 30, then the number of cycles is 1 time; if the node corresponding to the job running duration is 10, then the number of cycles is 0 times.

[0068] In the above embodiment, three job reminder messages are calculated based on the job waiting duration threshold, job running duration threshold, and job failure inspection period. Using the time wheel algorithm to store job reminder data can reduce the time granularity of scheduled task execution while taking into account timeliness, and at the same time reduce the frequent access to storage systems such as databases, and use less resource consumption to achieve flexible and efficient reminder of abnormal jobs.

[0069] S3: Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information of the target job and the number of cycles to the target node in the time wheel.

[0070] It should be noted that each node of the time wheel contains a linked list of uncertain length, which stores job attribute information and the number of cycles (number of laps) information. The attribute information of the target job includes at least reminder types, including waiting timeout, running timeout, running failure, etc., and also includes basic job information, which includes job name, job id (unique code), script information, resource limit information, etc.

[0071] In some specific embodiments, storing the job information linked list generated based on the attribute information of the target job and the number of cycles into the target node in the time wheel includes:

[0072] Obtain the attribute information of the target job and its corresponding number of cycles;

[0073] Based on the attribute information of the target job and its corresponding number of cycles, generate a mapping relationship;

[0074] Based on the mapping relationship, generate a job information linked list.

[0075] In some specific embodiments, the method for determining the target node includes:

[0076] Obtain the subscript value of the current node of the time wheel;

[0077] Respectively obtain the remainders of the first number of cycles, the second number of cycles, and the third number of cycles, add the remainders to the subscript value of the current node respectively, and determine the subscript value of the node corresponding to the sum value. The current node is the position pointed to by the time wheel pointer at the current time;

[0078] Define the node corresponding to the node subscript value as the target node.

[0079] After generating the job information linked list, save the job information linked list to the position where the target node is located.

[0080] In the above embodiments, three types of reminders are supported for independent calculation and independent reminder based on the time wheel and the judgment logic. Using the time wheel algorithm, calculate and store job reminder information, which can accurately obtain the jobs to be detected, reduce the access to the database, and reduce resource consumption.

[0081] S4: According to the preset time period, obtain and traverse the job information linked list of the current node.

[0082] It should be noted that the preset time period is the above-mentioned timing task running period, which is the smallest unit equal to the job waiting duration. The current node refers to the node pointed to by the pointer in the time wheel at the current time.

[0083] S5: Determine whether it meets the preset reminder criteria according to the number of loop times, the target job status, and the target job start time in the job information linked list of the current node. If it meets the criteria, send a job reminder message.

[0084] It should be noted that the target job status includes the waiting status, the running status, the failure status, and the end status. The job reminder message is transmitted by a preset transmission method, such as an email, etc.

[0085] In some specific embodiments, determining whether it meets the preset reminder criteria according to the number of loop times, the target job status, and the target job start time in the job information linked list of the current node includes:

[0086] In response to the number of loop times in the job information linked list of the current node being the first preset value, obtain the target job status and the target job start time. Here, the first preset value is generally 0, that is, the number of loop times in the job information linked list of the current node is 0;

[0087] In response to the target job status being the waiting status and the reminder type being waiting timeout, determine that it meets the preset reminder criteria;

[0088] In response to the target job status being the waiting status and the reminder type being running timeout, recalculate the target job reminder node based on the job running duration of the target job. The calculation method is the same as that of the second loop count;

[0089] In response to the target job status being the running status and the reminder type being running timeout, calculate whether the target job times out based on the current time and the target job start time, that is, compare the time value obtained by subtracting the target job start time from the current time with the preset threshold to determine whether it times out;

[0090] If it times out, determine that it meets the preset reminder criteria;

[0091] If it does not time out, determine the remaining detection time for the reminder according to the job running duration of the target job, the current time, and the target job start time. Here, the calculation method of the remaining detection time for the reminder is: Q = S2 - (T1 - T2), where Q represents the remaining detection time for the reminder, T1 represents the current time, and T2 represents the target job start time;

[0092] In response to the target job status being the failure status and the reminder type being job failure reminder, determine that it meets the preset reminder criteria;

[0093] In response to the target job status being the end status and the reminder type being job failure reminder, delete the job type of the job failure reminder;

[0094] In response to the target job status being the running status or the waiting status, and the reminder type being the job failure reminder, recalculate the target job reminder node according to the job check period of the target job, and re-queue it.

[0095] Specifically, based on the timing task period, obtain the job information linked list data on the current node of the time wheel, and traverse the job information linked list. First, judge whether the loop count (number of circles) of the target job is 0. If it is 0, then the target job has reached the time for job reminder. Then call the scheduler (Slurm scheduler and interface) to query the target job status and the target job start time. The scheduler is responsible for receiving the job submission request from the user, scheduling resources for the job, and providing query interfaces for data such as the job running status and the job start time. The three types of reminders are processed separately: (1) The job reminder type is job waiting timeout: If the job is in the waiting state, send a reminder; if the job status is not the waiting state, delete the job reminder data. (2) The reminder type is job running timeout: If the job status is in the waiting state, delete the job reminder data, recalculate the reminder time according to the job running timeout threshold, and re-queue it; if the job is in the running state, delete the job reminder data, calculate whether the job has exceeded the job running duration threshold using the current time and the job start time. If it has not exceeded, calculate the remaining detection time of the reminder using the job running duration threshold, the job start time, and the current time. The formula for calculating the remaining detection time of the reminder is: job running duration threshold - (current time - job start time). Use the remaining detection time of the reminder and re-queue it according to the calculation formula when the job is submitted. If it has timed out, send a reminder; if the job status is other status, delete the job reminder data. (3) The job reminder type is job failure reminder: If the job status is failure, delete the job reminder data and send a job reminder; if the job status is running or waiting, delete the job reminder data, recalculate the job failure check node according to the job failure check period, and re-queue it; if the job status is other status, delete the job reminder data.

[0096] In response to the loop count in the job information linked list of the current node not being the first preset value (being a positive number), subtract 1 from the loop count in the job information linked list of the current node, and move the current node pointer forward one step.

[0097] In the above embodiment, based on the loop count (number of circles) and the calculation logic, judge whether the node for judging whether to send a job reminder has been reached, reduce the ineffective judgment, and based on the job scheduler interface and the way of re-queuing the job, timely remind the abnormal job on the premise of reducing resource occupation, and improve the processing efficiency of the abnormal job.

[0098] In some specific embodiments, obtain the nodes that send job reminders within multiple time periods, as well as the reminder types and job statuses corresponding to these nodes;

[0099] Obtain that the number of occurrences of the same node is greater than the first preset threshold, and filter and obtain the reminder type and job status corresponding to the target node;

[0100] In response to the number of occurrences of the same reminder type being greater than the second preset threshold, filter and obtain the job status corresponding to the target reminder type;

[0101] In response to the number of occurrences of the same job status being greater than the third preset threshold, map the target reminder type and the target node corresponding to the target job status to generate a mapping relationship, and add an identifier generated based on the target node;

[0102] If in the next time period, when the time wheel cycles to the target node, directly extract the target reminder type and job status corresponding to the identifier to determine whether to issue a job reminder.

[0103] Among them, the time period, the first preset threshold, the second preset threshold, and the third preset threshold can be set according to actual needs.

[0104] In the above implementation manner, through the generated identifier, directly judge the nodes that meet the requirements in the subsequent time period to determine whether it is necessary to issue a job reminder, which improves the processing efficiency of abnormal jobs.

[0105] In the above abnormal job processing method, it includes: obtaining the job to be submitted, setting job parameters for the job to be submitted to obtain the target job, and the job parameters at least include the time dimension for describing the job; obtaining the time wheel, and determining the number of cycles of the target job on the time wheel based on the job parameters of the target job, and the time wheel is composed of multiple nodes; obtaining the attribute information of the target job, and saving the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel; obtaining and traversing the job information linked list of the current node according to the preset time period; determining whether it meets the preset reminder standard according to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node, and if it meets, issue a job reminder message. In this application, by setting three parameters for job reminders and saving the job reminder messages into the time wheel of the job storage device, the number of accesses to systems such as databases can be effectively reduced, the number of invalid judgments for job reminders can be reduced, the timing task period can be set more precisely and flexibly, on the basis of ensuring the timeliness of reminders, the occupation of computer resources can be minimized to the greatest extent, and the system stability can be maintained. The timely reminder of job waiting timeout helps users discover the shortage of server cluster resources or improper resource management earlier; the timely reminder of job running timeout and job failure helps users discover server hardware failures or software errors earlier. It helps to shorten the user job running cycle, improve job efficiency, and reduce the time and resource waste caused by abnormal jobs.

[0106] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0107] It should be understood that although Figure 2 - Figure 3 each step in the flowchart of Figure 2 - Figure 3 is displayed in sequence according to the indication of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,

[0108] The embodiment of the present application also provides an abnormal job processing device, as Figure 5 shown, including a target job generation module, a parameter processing module, an information linked list generation module, a traversal module and a reminder module, where:

[0109] The target job generation module is used to obtain a job to be submitted, set job parameters for the job to be submitted, and obtain a target job. The job parameters at least include a time dimension for describing the job;

[0110] The parameter processing module is used to obtain a time wheel, and determine the number of cycles of the target job on the time wheel based on the job parameters of the target job. The time wheel is composed of multiple nodes;

[0111] The information linked list generation module is used to obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel. The attribute information at least includes a reminder information type

[0112] The traversal module is used to obtain and traverse the job information linked list of the current node according to a preset time period;

[0113] The reminder module is used to determine whether it meets a preset reminder standard according to the number of cycles, the target job status and the target job start time in the job information linked list of the current node. If it meets, a job reminder information is sent.

[0114] As a preferred implementation method, in the embodiment of the present invention, the target job generation module is specifically used for:

[0115] Obtain the job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters include at least one of the following: job waiting duration, job running duration, and job inspection period.

[0116] As a preferred implementation manner, in the embodiments of the present invention, the parameter processing module is specifically configured to:

[0117] Obtain the job waiting duration, and determine the first number of loops based on the first objective function and the job waiting duration, where the first objective function includes:

[0118]

[0119] Where C1 represents the first number of loops, S1 represents the job waiting duration, T represents the running period of the timing task, and R represents the total number of nodes of the time wheel;

[0120] Obtain the job running duration, and determine the second number of loops based on the second objective function and the job running duration, where the second objective function includes:

[0121]

[0122] Where C2 represents the second number of loops, S2 represents the job running duration, T represents the running period of the timing task, and R represents the total number of nodes of the time wheel;

[0123] Obtain the job inspection period, and determine the third number of loops based on the third objective function and the job inspection period, where the third objective function includes:

[0124]

[0125] Where C3 represents the third number of loops, S3 represents the job inspection period, T represents the running period of the timing task, and R represents the total number of nodes of the time wheel.

[0126] As a preferred implementation manner, in the embodiments of the present invention, the information linked list generation module is specifically configured to:

[0127] Obtain the subscript value of the current node of the time wheel;

[0128] Respectively obtain the remainders of the first number of loops, the second number of loops, and the third number of loops, and add the remainders to the subscript value of the current node respectively to determine the subscript value of the corresponding node of the sum value;

[0129] Define the node corresponding to the subscript value as the target node.

[0130] As a preferred implementation manner, in the embodiments of the present invention, the information linked list generation module is specifically further configured to:

[0131] Obtain the attribute information of the target job and its corresponding number of loops;

[0132] Generate a mapping relationship based on the attribute information of the target job and its corresponding number of loops;

[0133] Generate a job information linked list based on the mapping relationship and save it to the target node in the time wheel.

[0134] As a preferred implementation manner, in the embodiment of the present invention, the reminder module is specifically configured to:

[0135] When the number of loops in the job information linked list of the current node is a first preset value, obtain the target job status and the target job start time;

[0136] When the target job status is the waiting state and the reminder type is waiting timeout, determine that it meets the preset reminder standard;

[0137] When the target job status is the waiting state and the reminder type is running timeout, recalculate the target job reminder node based on the job running duration of the target job;

[0138] When the target job status is the running state and the reminder type is running timeout, calculate whether the target job times out based on the current time and the target job start time;

[0139] If it times out, determine that it meets the preset reminder standard;

[0140] If it does not time out, determine the remaining detection time for the reminder based on the job running duration of the target job, the current time, and the target job start time.

[0141] As a preferred implementation manner, in the embodiment of the present invention, the reminder module is specifically further configured to:

[0142] When the target job status is the failure state and the reminder type is job failure reminder, determine that it meets the preset reminder standard;

[0143] When the target job status is the end state and the reminder type is job failure reminder, delete the job type of the job failure reminder;

[0144] When the target job status is the running state or the waiting state, and the reminder type is job failure reminder, recalculate the target job reminder node according to the job inspection period of the target job.

[0145] For the description of the features in the corresponding embodiments of the abnormal job processing device, reference can be made to the relevant descriptions in the corresponding embodiments of the abnormal job processing method, which will not be elaborated here one by one. Each module in the above abnormal job processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0146] In one embodiment, an electronic device is provided. The electronic device can be a terminal, and its internal structural diagram can be as Figure 6 shown. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a * method. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, a touchpad, or a mouse, etc.

[0147] Those skilled in the art can understand that Figure 6 the structure shown in

[0148] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0149] S1: Obtain the job to be submitted, set job parameters for the job to be submitted to obtain a target job, and the job parameters at least include a time dimension for describing the job;

[0150] S2: Obtain a time wheel, and based on the job parameters of the target job, determine the number of cycles of the target job on the time wheel. The time wheel consists of multiple nodes;

[0151] S3: Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information of the target job and the number of loops to the target node in the time wheel;

[0152] S4: According to the preset time period, obtain and traverse the job information linked list of the current node;

[0153] S5: Determine whether it meets the preset reminder standard according to the number of loops, the target job status, and the target job start time in the job information linked list of the current node. If it meets the standard, send a job reminder message.

[0154] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in the embodiment of the abnormal job processing method when running, including:

[0155] S1: Obtain the job to be submitted, set job parameters for the job to be submitted to obtain the target job, and the job parameters at least include the time dimension for describing the job;

[0156] S2: Obtain the time wheel, and determine the number of loops of the target job on the time wheel based on the job parameters of the target job. The time wheel is composed of multiple nodes;

[0157] S3: Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information of the target job and the number of loops to the target node in the time wheel;

[0158] S4: According to the preset time period, obtain and traverse the job information linked list of the current node;

[0159] S5: Determine whether it meets the preset reminder standard according to the number of loops, the target job status, and the target job start time in the job information linked list of the current node. If it meets the standard, send a job reminder message.

[0160] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.

[0161] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in the embodiment of the abnormal job processing method, including:

[0162] S1: Obtain the job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0163] S2: Obtain a time wheel, and determine the number of cycles of the target job on the time wheel based on the job parameters of the target job. The time wheel consists of multiple nodes;

[0164] S3: Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel;

[0165] S4: According to a preset time period, obtain and traverse the job information linked list of the current node;

[0166] S5: Determine whether it meets the preset reminder standard according to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node. If it meets the standard, send a job reminder message.

[0167] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the steps in the embodiment of the abnormal job processing method, including:

[0168] S1: Obtain the job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job;

[0169] S2: Obtain a time wheel, and determine the number of cycles of the target job on the time wheel based on the job parameters of the target job. The time wheel consists of multiple nodes;

[0170] S3: Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information and the number of cycles of the target job to the target node in the time wheel;

[0171] S4: According to a preset time period, obtain and traverse the job information linked list of the current node;

[0172] S5: Determine whether it meets the preset reminder standard according to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node. If it meets the standard, send a job reminder message.

[0173] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0174] The above has introduced in detail an abnormal job processing method, device, electronic device, and storage medium provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. An abnormal operation processing method, characterized in that, The method includes: Obtain a job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job; Obtain a time wheel, and based on the job parameters of the target job, determine the number of cycles of the target job on the time wheel, where the time wheel consists of multiple nodes; Obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information of the target job and the number of cycles to the target node in the time wheel; According to a preset time period, obtain and traverse the job information linked list of the current node; According to the number of cycles, the target job status, and the target job start time in the job information linked list of the current node, determine whether it meets the preset reminder standard. If it meets, send a job reminder message.

2. The abnormal operation processing method according to claim 1, wherein Obtain a job to be submitted, and setting job parameters for the job to be submitted to obtain a target job includes: Obtain a job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters include at least one of the following: job waiting duration, job running duration, and job inspection period.

3. The abnormal operation processing method according to claim 2, wherein Based on the job parameters of the target job, determining the number of cycles of the target job on the time wheel includes: Obtain the job waiting duration, and based on a first objective function and the job waiting duration, determine a first number of cycles, where the first objective function includes: Where C1 represents the first number of cycles, S1 represents the job waiting duration, T represents the running period of the timed task, and R represents the total number of nodes in the time wheel; Obtain the job running duration, and based on a second objective function and the job running duration, determine a second number of cycles, where the second objective function includes: Where C2 represents the second number of cycles, S2 represents the job running duration, T represents the running period of the timed task, and R represents the total number of nodes in the time wheel; Obtain the job inspection period, and based on a third objective function and the job inspection period, determine a third number of cycles, where the third objective function includes: Where C3 represents the third number of cycles, S3 represents the job inspection period, T represents the running period of the timed task, and R represents the total number of nodes in the time wheel.

4. The abnormal operation processing method according to claim 3, wherein, The method for determining the target node includes: Obtain the subscript value of the current node of the time wheel; Respectively obtain the remainders of the first number of cycles, the second number of cycles, and the third number of cycles, and add the remainders to the subscript value of the current node respectively to determine the subscript value of the node corresponding to the sum value; Define the node corresponding to the subscript value as the target node.

5. The abnormal operation processing method according to claim 1, wherein Obtain the attribute information of the target job, and saving the job information linked list generated based on the attribute information of the target job and the number of cycles to the target node in the time wheel includes: Obtain the attribute information of the target job and its corresponding number of cycles; Based on the attribute information of the target job and its corresponding number of cycles, generate a mapping relationship; Based on the mapping relationship, generate the job information linked list and save it to the target node in the time wheel.

6. The abnormal operation processing method according to claim 1, wherein The attribute information at least includes a reminder type. Determining whether the preset reminder criteria are met based on the number of loops, the target job status, and the target job start time in the job information linked list of the current node includes: When the number of loops in the job information linked list of the current node is a first preset value, obtain the target job status and the target job start time; When the target job status is the waiting state and the reminder type is waiting timeout, it is determined that the preset reminder criteria are met; When the target job status is the waiting state and the reminder type is running timeout, recalculate the target job reminder node based on the job running duration of the target job; When the target job status is the running state and the reminder type is running timeout, calculate whether the target job times out based on the current time and the target job start time; If it times out, it is determined that the preset reminder criteria are met; If it does not time out, determine the remaining detection time for the reminder based on the job running duration of the target job, the current time, and the target job start time.

7. The abnormal operation processing method according to claim 6, characterized in that The method further includes: When the target job status is the failed state and the reminder type is job failure reminder, it is determined that the preset reminder criteria are met; When the target job status is the ended state and the reminder type is job failure reminder, delete the job type of the job failure reminder; When the target job status is the running state or the waiting state, and the reminder type is job failure reminder, recalculate the target job reminder node according to the job inspection period of the target job.

8. An abnormal operation processing device, characterized in that, It includes: A target job generation module, configured to obtain a job to be submitted, set job parameters for the job to be submitted to obtain a target job, where the job parameters at least include a time dimension for describing the job; A parameter processing module, configured to obtain a time wheel, and determine the number of loops of the target job on the time wheel based on the job parameters of the target job, where the time wheel is composed of multiple nodes; An information linked list generation module, configured to obtain the attribute information of the target job, and save the job information linked list generated based on the attribute information of the target job and the number of loops to a target node in the time wheel, where the attribute information at least includes a reminder information type; A traversal module, configured to obtain and traverse the job information linked list of the current node according to a preset time period; A reminder module, configured to determine whether the preset reminder criteria are met based on the number of loops, the target job status, and the target job start time in the job information linked list of the current node, and if so, send a job reminder message.

9. An electronic device, characterized in that, It includes: A memory, configured to store a computer program; A processor, configured to implement the steps of the abnormal job processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program implements the steps of the abnormal job processing method according to any one of claims 1 to 7 when executed by a processor.