Abnormal task detection method, device and equipment and computer readable storage medium
By defining custom job metrics in Argo Workflows, and automatically exposing and monitoring task operation metrics, the problem that developers cannot monitor the running status of workflow jobs in real time is solved, and efficient abnormal task detection is achieved.
Patent Information
- Application Number
- CN202411874192.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-28
AI Technical Summary
In Argo Workflows, developers cannot monitor and obtain the running status of workflow jobs in real time, resulting in difficulty in detecting exception tasks and affecting efficiency.
By defining custom job metrics in the target task, the task automatically exposes the running metrics, and determines that the task is an exception task based on preset exception conditions.
It realizes automatic monitoring and detection of abnormal tasks without manually querying the running status of the target task, improving the flexibility and efficiency of abnormal task detection.
Smart Images

Figure CN119718833A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an abnormal task detection method, device, equipment and computer-readable storage medium. Background Art
[0002] Argo Workflows is an open source container-native workflow engine designed for orchestrating parallel jobs on Kubernetes. Argo Workflows is a powerful and flexible container-native workflow engine that can efficiently orchestrate parallel jobs on Kubernetes and supports a variety of application scenarios.
[0003] In Argo Workflow, a large number of workflow jobs are run every day. Since Argo Workflow itself does not support job exception alerts, as a developer, after submitting a workflow job, you cannot know whether the job is successful or not. You can only manually check the job running status on the Argo UI.
[0004] However, due to the huge number of workflow jobs, manually checking the task running status is very cumbersome and not user-friendly. Summary of the invention
[0005] In order to solve the above technical problems, the present disclosure provides an abnormal task detection method, an apparatus, a device and a computer-readable storage medium to improve the flexibility of the abnormal task detection method.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for detecting abnormal tasks, including:
[0007] Defining job indicators in a target task so that the target task automatically exposes task operation indicators;
[0008] Obtaining the task running indicator;
[0009] When the task operation indicator meets the preset abnormal condition, the target task is determined to be an abnormal task.
[0010] In some embodiments, defining the operation indicator in the target task includes:
[0011] Acquire annotation information of the target task, wherein the annotation information includes job indicator configuration information;
[0012] The operation indicator is defined in the target task according to the operation indicator configuration information.
[0013] In some embodiments, the annotation information includes a warning flag field, and obtaining the annotation information of the target task includes:
[0014] If the alarm flag field is in an on state, the job indicator configuration information in the annotation information is obtained.
[0015] In some embodiments, when the job indicator is a failure warning indicator, the task running indicator is a task running status;
[0016] When the task running indicator meets the preset abnormal condition, determining the target task as an abnormal task includes:
[0017] When the task running status is an execution failure status, the target task is determined to be an abnormal task.
[0018] In some embodiments, when the job indicator is a failure warning indicator and the target task includes multiple subtasks, the task running indicator is the task running status, and defining the job indicator in the target task includes:
[0019] Defining failure alarm indicators in the plurality of subtasks respectively, so that each of the subtasks automatically exposes the task running status;
[0020] A failure alarm indicator is defined in the target task, and when the task running status of any subtask is an execution failure status, the task running status of the target task is determined to be an execution failure status.
[0021] In some embodiments, the operation indicator includes an alarm channel, and after determining that the target task is an abnormal task, the method further includes:
[0022] The alarm information of the abnormal task is sent to the alarm channel.
[0023] In a second aspect, an embodiment of the present disclosure provides an abnormal task detection method and device, including:
[0024] A definition module, used for defining job indicators in a target task, so that the target task automatically exposes the task operation indicators;
[0025] An acquisition module, used to obtain the task running index;
[0026] The determination module is used to determine that the target task is an abnormal task when the task operation indicator meets the preset abnormal condition.
[0027] In some embodiments, the operation indicator includes an alarm channel, and the device further includes:
[0028] The alarm module is used to send the alarm information of the abnormal task to the alarm channel.
[0029] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0030] Memory;
[0031] Processor; and
[0032] Computer programs;
[0033] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.
[0034] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect.
[0035] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the abnormal task detection method as described above is implemented.
[0036] The abnormal task detection method, apparatus, device and computer-readable storage medium provided by the embodiments of the present disclosure realize exposure of task operation indicators by adding custom job indicators to the target task, and then can monitor the operation status of the target task according to the collected task operation indicators, without manually querying the operation status of the target task, thereby improving the flexibility of the abnormal task detection method. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0038] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A flow chart of an abnormal task detection method provided by an embodiment of the present disclosure;
[0040] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0041] Figure 3 A flow chart of an abnormal task detection method provided by an embodiment of the present disclosure;
[0042] Figure 4A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0043] Figure 5 A schematic diagram of the structure of an abnormal task detection device provided in an embodiment of the present disclosure;
[0044] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0047] The present disclosure provides an abnormal task detection method, which is described below in conjunction with a specific embodiment.
[0048] Figure 1 Flowchart of the abnormal task detection method provided by the embodiment of the present disclosure. The method can be applied to Figure 2 The computing environment shown in the figure includes Argo components, Prometheus system, and AlertManager. Among them, AlertManager is a component used to process the alarm information generated by the Prometheus system. Each Argo component will expose the indicators of the Workflow to the Prometheus system for collection, and the PrometheusServer in the Prometheus system will notify the user of the alarm information through the specified channel through AlertManager.
[0049] It is understandable that the abnormal task detection method provided by the embodiment of the present disclosure can also be applied in other scenarios.
[0050] Combine the following Figure 2 The application scenario shown is Figure 1 The abnormal task detection method shown in FIG. 1 is introduced, and the specific steps of the method are as follows:
[0051] S101. Define operation indicators in a target task so that the target task automatically exposes task operation indicators.
[0052] The target task is any job that needs to be monitored. The target task can be a Workflows task or a Template task running in the ArgoWorkflows engine. The Template-level task can be understood as a subtask of the Workflows task.
[0053] That is, define the job indicators in the target task, including defining the job indicators at the Workflows level, and / or defining the job indicators at the Template level.
[0054] Job indicators are used to monitor the deployment status, performance, resource usage and other operating information of the target task. After the job indicators are defined in the target task, the target task can automatically provide the operating information that needs to be monitored, that is, the task operating indicators.
[0055] Among them, job indicators include gauge indicators, histogram indicators, and counter indicators; Gauge indicators are used to represent the instantaneous state or value at a certain point in time, reflecting the dynamic changes in the system state; Histogram indicators are used to report the distribution of data and provide data statistics and aggregation functions; Counter indicators are used to represent the number of times an event or operation occurs, reflecting the cumulative changes in the system state.
[0056] Optionally, the job indicator includes an alarm channel, and when the target task is an abnormal task, the alarm information of the abnormal task is sent to the alarm channel.
[0057] Among them, the alarm channel includes a predetermined communication software, a predetermined task leader, a predetermined group, etc. Sending the alarm information of the abnormal task to the alarm channel is equivalent to sending the alarm information to the designated task leader through the designated communication software, or sending it to the designated chat group.
[0058] Optionally, the job indicator needs to define the name and help fields. The name field is used to specify the name of the indicator and serves as the unique identifier of the job indicator. The help field provides descriptive information about the indicator, which is used to explain the meaning, purpose, and measurement method of the indicator. The label field can also be defined in the job indicator to add labels to the indicator so that the indicator can be grouped and filtered. At the same time, the job indicator also needs to define the when field. When the when condition is met, the value of the indicator is issued, where the value of the indicator is defined by the value field.
[0059] The following is an example of a workflow-level job indicator and a template-level job indicator.
[0060] Workflow-level job metric example:
[0061]
[0062] Template-level job indicator example:
[0063]
[0064] S102: Obtain the task execution index.
[0065] During the operation of the target task, the Prometheus system collects task operation indicators to monitor the execution status of each workflow in ArgoWorkflows in real time, including key information such as task progress and resource consumption.
[0066] Optionally, the Prometheus system collects task operation indicators continuously or periodically.
[0067] S103: When the task operation indicator meets the preset abnormal condition, determine that the target task is an abnormal task.
[0068] The preset abnormal condition means that the target task is running abnormally. When the task running indicators meet the preset abnormal condition, the target task can be determined as an abnormal task.
[0069] The disclosed embodiment defines a job indicator in a target task so that the target task automatically exposes the task running indicator; obtains the task running indicator; and determines that the target task is an abnormal task when the task running indicator meets the preset abnormal condition. By adding a custom job indicator to the target task, the task running indicator is exposed, and the running status of the target task can be monitored according to the collected task running indicators, without manually querying the running status of the target task, thereby improving the flexibility of the abnormal task detection method.
[0070] On the basis of the above embodiment, the operation indicator includes a failure alarm indicator and a timeout alarm indicator, and when the operation indicator is a failure alarm indicator, the task operation indicator is a task operation status. Accordingly, when the task operation indicator meets the preset abnormal condition, determining that the target task is an abnormal task includes: when the task operation status is an execution failure state, determining that the target task is an abnormal task.
[0071] When a failure alarm indicator is defined in the target task, the target task will automatically expose the task running status during the running process; when the task running status of the target task is obtained as an execution failure state, it can be determined that the target task is an abnormal task.
[0072] Optionally, when the job indicator is a failure alarm indicator, and the target task includes multiple subtasks, the task running indicator is the task running status, and the definition of the job indicator in the target task includes: defining failure alarm indicators in the multiple subtasks respectively, so that each subtask automatically exposes the task running status; defining failure alarm indicators in the target task, when the task running status of any subtask is an execution failure status, determining that the task running status of the target task is an execution failure status. Correspondingly, when the task running status is an execution failure status, determining that the target task is an abnormal task.
[0073] When the target task is a Workflow job, it may include multiple subtasks. If the target task needs to be monitored, the task running status of each subtask is detected. When any subtask fails to execute, the target task is determined to have failed to execute.
[0074] In each subtask that needs to be monitored, a failure alarm indicator is defined, namely, a Template-level failure alarm indicator. For each subtask, based on the failure alarm indicator defined therein, the subtask will automatically expose the task running status. When the task running status of any subtask is an execution failure status, the task running status of the target task is determined to be an execution failure status, and the target task becomes an abnormal task.
[0075] The following are examples of Workflow-level failure alarm indicators and Template-level failure alarm indicators.
[0076] Example of Workflow-level failure alarm indicator:
[0077]
[0078] Example of Template-level failure alarm indicator:
[0079]
[0080]
[0081] In other embodiments, when the job indicator is a timeout alarm indicator, the task running indicator is the task running time. When the task running indicator meets the preset abnormal condition, determining the target task as an abnormal task includes: when the task running time exceeds the preset execution time, determining the target task as an abnormal task.
[0082] In Argo Workflow, there is an abnormal target task whose running time exceeds the normal range but still fails or fails. Therefore, defining a timeout alarm indicator in the target task can automatically expose the task running time of the target task, and determine that the target task is an abnormal task when the task running time exceeds the preset execution time.
[0083] Optionally, when the target task includes multiple subtasks, timeout alarm indicators are defined in the multiple subtasks respectively, so that each subtask automatically exposes the task running time. When any subtask is running, the target task is also running; the target task will be completed only when all subtasks are completed. Therefore, if the running time of at least one subtask exceeds the preset execution time, the running time of the target task will also exceed the preset execution time.
[0084] The following are examples of Workflow-level timeout alarm indicators and Template-level timeout alarm indicators.
[0085] Example of a workflow-level timeout alarm indicator:
[0086] Example of Template-level timeout alarm indicator:
[0087]
[0088]
[0089] By defining failure alarm indicators and / or timeout alarm indicators in the target task, the disclosed embodiment can promptly obtain notification when the target task fails to execute or times out; at the same time, automatic detection can be achieved for the target task and each subtask of the target task, thereby improving the universality of the abnormal task detection method.
[0090] Figure 3 Flowchart of the abnormal task detection method provided by the embodiment of the present disclosure. The method can be applied to Figure 4 In the computing environment shown, the computing environment includes an upper platform, an Argo Workflow engine, and a Prometheus system. It can be understood that the abnormal task detection method provided in the embodiment of the present disclosure can also be applied in other scenarios.
[0091] Combine the following Figure 4 The application scenario shown is Figure 3 The abnormal task detection method shown in the figure is introduced, and the specific steps of the method are as follows:
[0092] S301. Obtain annotation information of the target task, where the annotation information includes job indicator configuration information.
[0093] Specifically, the annotation information includes an alarm flag field. If the alarm flag field is in an on state, the job indicator configuration information in the annotation information is obtained.
[0094] The annotation information of the target task is not a part that directly defines the execution details or logic of the task, but is used to provide additional metadata or description information for the task. In the embodiment of the present disclosure, an alarm flag field is added to the annotation information of the target task to indicate whether the target task needs to be defined with a job indicator. If yes, the alarm flag field is in the on state; if no, the alarm flag field is in the off state.
[0095] At the same time, the annotation information also includes job indicator configuration information, such as the preset execution time required for the timeout alarm indicator.
[0096] S302: Define a job indicator in a target task according to the job indicator configuration information.
[0097] Specifically, based on the job indicator configuration information in the annotation information, the corresponding job indicators are automatically defined for the target task.
[0098] The implementation principle of defining job indicators for the subtasks of the target task is similar. The job indicators can be defined in the subtasks according to the status of the alarm flag field in the annotation information of the subtask and the job indicator configuration information.
[0099] That is, users only need to write or change the alarm flag field and job indicator configuration information in the Argo Workflow engine through the upper platform, and the Argo Workflow engine can automatically define job indicators for the corresponding target task (or subtask), so that the target task (or subtask) automatically exposes the task operation indicators.
[0100] The following is an example of annotation information for a failure alarm indicator with the alarm flag field turned on:
[0101] apiVersion:argoproj.io / v1alpha1
[0102] kind:Workflow
[0103] metadata:
[0104] generateName:model-training-
[0105] annotations:
[0106] argoproj.io / enable_failed_alert:"ON"#Enable failure alert
[0107] argoproj.io / notifier:"xiaoming"#Notifier
[0108] spec:
[0109] entrypoint:steps
[0110] The following is an example of annotation information for a timeout alarm indicator with the alarm flag field turned on:
[0111] apiVersion:argoproj.io / v1alpha1
[0112] kind:Workflow
[0113] metadata:
[0114] generateName:model-training-
[0115] annotations:
[0116] argoproj.io / enable_timeout_alert:"ON"#Enable failure alarm
[0117] argoproj.io / notifier:"xiaoming" #Notifier
[0118] argoproj.io / timeout_time:"100s" #timeout
[0119] spec:
[0120] entrypoint:steps
[0121] S303: Obtain the task execution index.
[0122] S304: When the task running indicator meets the preset abnormal condition, determine that the target task is an abnormal task.
[0123] The disclosed embodiment adds an alarm flag field to the annotation of the target task. When the user changes the alarm flag field to an on state, the alarm can be directly turned on without complicated configuration of the target task, thereby ensuring the accuracy of the job indicator definition and reducing the operational difficulty of the abnormal task detection method.
[0124] Figure 5The schematic diagram of the structure of the abnormal task detection device provided in the embodiment of the present disclosure. The abnormal task detection device may be a terminal device including the computing environment described in the above embodiment, or the abnormal task detection device may be a component or assembly in the terminal device. The abnormal task detection device provided in the embodiment of the present disclosure may execute the processing flow provided in the abnormal task detection method embodiment, such as Figure 5 As shown, the abnormal task detection device 50 includes: a definition module 51, an acquisition module 52, and a determination module 53; the definition module 51 is used to define the operation indicators in the target task so that the target task automatically exposes the task operation indicators; the acquisition module 52 is used to obtain the task operation indicators; the determination module 53 is used to determine that the target task is an abnormal task when the task operation indicators meet the preset abnormal conditions.
[0125] Optionally, the definition module 51 is used to obtain annotation information of the target task, where the annotation information includes job indicator configuration information; and define the job indicator in the target task according to the job indicator configuration information.
[0126] Optionally, the annotation information includes an alarm flag field, and the definition module 51 is used to obtain the job indicator configuration information in the annotation information if the alarm flag field is in an open state.
[0127] Optionally, when the job indicator is a failure warning indicator, the task running indicator is a task running status; the determination module 53 is used to determine that the target task is an abnormal task when the task running status is an execution failure status.
[0128] Optionally, when the job indicator is a failure alarm indicator and the target task includes multiple subtasks, the task running indicator is the task running status, and the definition module 51 is used to define failure alarm indicators in the multiple subtasks respectively so that each subtask automatically exposes the task running status; a failure alarm indicator is defined in the target task, and when the task running status of any subtask is an execution failure status, the task running status of the target task is determined to be an execution failure status.
[0129] Optionally, the operation indicator includes an alarm channel, and the abnormal task detection device 50 further includes an alarm module 54, and the alarm module 54 is used to send the alarm information of the abnormal task to the alarm channel.
[0130] Figure 5 The abnormal task detection device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0131] Figure 6The electronic device provided in the embodiment of the present disclosure may be a terminal device including the computing environment described in the above embodiment. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the abnormal task detection method embodiment, such as Figure 6 As shown, the electronic device 60 includes: a memory 61, a processor 62, a computer program and a communication interface 63; wherein the computer program is stored in the memory 61 and is configured so that the processor 62 executes the abnormal task detection method as described above.
[0132] The memory 61 is a non-transitory readable storage medium that can be used to store software program executable instructions and modules, such as program instructions / modules corresponding to the hydraulic automatic transmission fault judgment method in the embodiment of the present disclosure. The processor 62 executes various functional applications and data processing of the server by running the software programs, instructions and modules stored in the memory 61, that is, the hydraulic automatic transmission fault judgment method in the above method embodiment is realized.
[0133] The memory 61 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the vehicle, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 61 may optionally include a memory remotely arranged relative to the processor 62, and these remote memories may be connected to the terminal device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0134] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the abnormal task detection method described in the above embodiment.
[0135] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0136] In addition, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the abnormal task detection method as described above is implemented.
[0137] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0140] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0141] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0142] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
[0143] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting abnormal tasks, characterized in that: The method comprises: Defining job indicators in a target task so that the target task automatically exposes task operation indicators; Obtaining the task running indicator; When the task operation indicator meets the preset abnormal condition, the target task is determined to be an abnormal task.
2. The method according to claim 1, characterized in that Defining the job indicators in the target task includes: Acquire annotation information of the target task, wherein the annotation information includes job indicator configuration information; The operation indicator is defined in the target task according to the operation indicator configuration information.
3. The method according to claim 2, characterized in that The annotation information includes a warning flag field, and the obtaining of the annotation information of the target task includes: If the alarm flag field is in an on state, the job indicator configuration information in the annotation information is obtained.
4. The method according to claim 1, characterized in that When the job indicator is a failure alarm indicator, the task running indicator is a task running status; When the task running indicator meets the preset abnormal condition, determining the target task as an abnormal task includes: When the task running status is an execution failure status, the target task is determined to be an abnormal task.
5. The method according to claim 1, characterized in that When the job indicator is a failure warning indicator, and the target task includes multiple subtasks, the task running indicator is the task running status, and the job indicator is defined in the target task, including: Defining failure alarm indicators in the plurality of subtasks respectively, so that each of the subtasks automatically exposes the task running status; A failure alarm indicator is defined in the target task, and when the task running status of any subtask is an execution failure status, the task running status of the target task is determined to be an execution failure status.
6. The method according to claim 1, characterized in that The operation indicator includes an alarm channel. After determining that the target task is an abnormal task, the method further includes: The alarm information of the abnormal task is sent to the alarm channel.
7. An abnormal task detection device, characterized in that: include: A definition module, used for defining job indicators in a target task, so that the target task automatically exposes the task operation indicators; An acquisition module, used to obtain the task running index; The determination module is used to determine that the target task is an abnormal task when the task operation indicator meets the preset abnormal condition.
8. The device according to claim 7, characterized in that The operation indicator includes an alarm channel, and the device further includes: The alarm module is used to send the alarm information of the abnormal task to the alarm channel.
9. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.