A task execution method, device, equipment and medium

By obtaining task attributes and system status data, and using task detection models to perform abnormal detection and processing strategies, the problem of insufficient identification of task failure causes in the existing technology is solved, and the intelligence of task execution and system stability are achieved.

CN119782019APending Publication Date: 2025-04-08HUNAN DATA IND GRP CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411852779.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing task retry strategy cannot effectively distinguish the specific reasons for the task failure, resulting in the lack of targeted triggering and retry strategies, and the inability to realize intelligent processing of abnormal tasks.

Method used

By obtaining the task attribute data and system status data of the abnormal task, a preset task detection model is used for abnormal detection, the task exception cause and task processing strategy are obtained, and the abnormal tasks are repeatedly executed based on this information.

Benefits of technology

Accurate analysis and fault location of abnormal tasks are realized, accurate identification of the cause of task abnormalities and formulate targeted processing strategies, significantly improving the task success rate, reducing the average fault processing time, and improving the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782019A_ABST
    Figure CN119782019A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of artificial intelligence, and relates to a method for executing a task, including: obtaining task attribute data of an abnormal task and system status data of a task management system, wherein the abnormal task is a task that performs an abnormality, and the task management system is a system for processing abnormal tasks; based on the task attribute data and the system status data, using a preset task detection model to perform abnormality detection on the abnormal task, and obtaining the task abnormality cause and task processing strategy of the abnormal task; based on the task abnormality cause and the task processing strategy, repeatedly executing the abnormal task. The present application also provides a device, equipment and medium. The present application can realize intelligent processing of abnormal tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a task execution method, device, equipment and medium. Background Art

[0002] In modern computing systems, tasks may encounter a variety of failure factors during execution, including but not limited to network fluctuations, insufficient resources, system overload, and task errors. In order to cope with these challenges and ensure the successful execution of tasks, the industry has developed a variety of task retry strategies.

[0003] Common retry strategies include fixed interval retry, exponential backoff, exponential backoff with jitter, linear backoff, Fibonacci backoff, and limited number of retries. These strategies have their own characteristics. For example, fixed interval retry maintains a constant waiting time, while exponential backoff increases the waiting time exponentially. Exponential backoff with jitter adds randomness to exponential backoff to avoid retry storms. Linear backoff and Fibonacci backoff increase the waiting time according to the linear law and the Fibonacci sequence, respectively. Limited number of retries sets the maximum number of retries.

[0004] However, these strategies still have many problems. For example, under high load or transient failures, a large number of tasks may fail at the same time and retry immediately, resulting in a retry storm, which further increases the system load. In addition, under some strategies, the retry wait time increases too quickly or the number of retries is fixed, which may cause the task to be judged as failed before the system recovers. At the same time, these strategies lack the flexibility to adjust triggers and retries according to the system status, and cannot effectively reduce system pressure. More importantly, existing methods cannot effectively distinguish the specific reasons for task failure, resulting in a lack of pertinence in trigger and retry strategies, and the inability to achieve intelligent processing of abnormal tasks. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a task execution method, device, equipment and medium to solve the problem that the specific reasons for task failure cannot be effectively distinguished, resulting in a lack of pertinence in triggering and retry strategies and an inability to achieve intelligent processing of abnormal tasks.

[0006] In order to solve the above technical problems, the present application provides a task execution method, which adopts the following technical solutions:

[0007] Acquire task attribute data of abnormal tasks and system status data of task management system, where abnormal tasks are tasks that perform abnormalities, and task management system is a system that processes abnormal tasks; based on task attribute data and system status data, use a preset task detection model to perform abnormality detection on abnormal tasks, and obtain task abnormality causes and task processing strategies for abnormal tasks; based on task abnormality causes and task processing strategies, repeat the abnormal tasks.

[0008] Further, based on the task attribute data and the system status data, a preset task detection model is used to perform anomaly detection on the abnormal task, and the step of obtaining the task anomaly cause and task processing strategy of the abnormal task specifically includes:

[0009] Based on the preset data structure, the task attribute data and system status data are converted into model prompt words; the model prompt words are input into the preset task detection model, and the abnormal reasons of the abnormal tasks are analyzed through the task detection model to obtain the task abnormality reasons and task processing strategies that cause the abnormal tasks to be abnormal.

[0010] Furthermore, based on the preset data structure, the step of converting the task attribute data and the system status data into model prompt words specifically includes:

[0011] Based on the preset data structure, the task attribute data and system status data are formatted to obtain standardized data, which are used as model prompt words.

[0012] Further, based on the cause of the task exception and the task processing strategy, the steps of repeatedly executing the abnormal task include:

[0013] Based on the cause of the task exception, determine whether the fault in executing the abnormal task has been eliminated; if the fault has been eliminated, obtain the current resource usage information of the task management system; if the system resource utilization of the task management system indicated by the resource usage information is less than a preset threshold, repeat the abnormal task based on the task processing strategy; if the fault has not been eliminated, or the system resource utilization reaches the preset threshold, determine the time interval for repeating the abnormal task based on the task processing strategy, and repeat the abnormal task when the waiting time of the abnormal task reaches the time interval.

[0014] Furthermore, before the step of performing anomaly detection on abnormal tasks using a preset task detection model based on task attribute data and system status data to obtain task anomaly causes and task processing strategies for abnormal tasks, the method further includes:

[0015] Obtain a pre-trained language model, and obtain raw data from task execution records, system logs, and operation and maintenance records of historical tasks; pre-process the raw data to remove missing values ​​and outlier noise data in the raw data to obtain a training data set; divide the training data set into a training set, a validation set, and a test set; based on the training set, fine-tune the pre-trained language model to obtain a fine-tuned task model; based on the validation set, verify the task model to obtain a verification result; based on the test set and the verification result, optimize the task processing model to obtain a preset task detection model.

[0016] Further, after the step of repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy, the method further includes:

[0017] In the process of repeatedly executing the abnormal task, determine whether an abnormality occurs. If an abnormality occurs, repeat the abnormal task multiple times and record the number of executions of the abnormal task. When the number of executions reaches the preset threshold and the abnormal task is still not successfully executed, stop executing the abnormal task and mark the task status of the abnormal task as execution abnormality. Obtain the fault information of the abnormal task, which includes the task parameters and operation logs when the exception occurs. Perform correlation analysis on the task parameters, operation logs and causes of the task abnormality, and generate a task abnormality analysis report for the abnormal task.

[0018] Further, after the step of repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy, the method further includes:

[0019] Acquire the successful execution data of the abnormal task; use the association rule mining algorithm to perform association analysis on the successful execution data, task attribute data and system status data to obtain the association rule set for the successful execution of the abnormal task; optimize the task detection model according to the association rule set to obtain the optimized task detection model.

[0020] In order to solve the above technical problems, the embodiment of the present application further provides a task execution device, which adopts the following technical solutions:

[0021] A first acquisition module is used to acquire task attribute data of abnormal tasks and system status data of a task management system, wherein the abnormal task is a task that performs abnormally, and the task management system is a system for processing abnormal tasks;

[0022] A detection module is used to detect abnormal tasks based on task attribute data and system status data using a preset task detection model to obtain the task abnormality cause and task processing strategy of the abnormal task;

[0023] The execution module is used to repeatedly execute the abnormal task based on the task abnormality reason and task processing strategy.

[0024] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the above task execution method are implemented.

[0025] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable at least one processor to perform the steps of the above-mentioned task execution method.

[0026] Compared with the prior art, the embodiment of the present application has the following beneficial effects: by acquiring the task attribute data of abnormal tasks and the system status data of the task management system, accurate analysis of abnormally executed tasks is achieved. Based on these data, a preset task detection model is used for abnormal detection, which can accurately identify the cause of task abnormality and formulate task processing strategies in a targeted manner. The task detection model integrates domain knowledge, improves the professionalism and practicality of the model, and can comprehensively consider multi-dimensional information, such as task attributes in task attribute data, and system status, resource usage and task operation logs in system status data, to make intelligent decisions. For example, whether to retry, when to retry, the number of retries and the configuration parameters that need to be adjusted make the retry process more reasonable and efficient. Through accurate fault location and reasonable retry strategy, the success rate of tasks is significantly improved, the average fault handling time is reduced, and the overall stability and reliability of the system are improved. In addition, the analysis of the cause of task failure and the formulation of processing strategies can be completed automatically, which reduces the dependence on manual intervention, effectively reduces the operation and maintenance costs, and realizes the intelligent processing of abnormal tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0028] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0029] Figure 2 It is a flowchart of a task execution method provided by this application;

[0030] Figure 3 It is a structural schematic diagram of a task execution device provided by the present application;

[0031] Figure 4 It is a structural schematic diagram of a computer device provided by this application. DETAILED DESCRIPTION

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0035] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0036] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0037] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0038] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0039] It should be noted that the task execution method provided in the embodiment of the present application is generally executed by a server, and accordingly, the task execution device is generally set in the server.

[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0041] Continue to refer Figure 2 , shows a flow chart of an embodiment of a task execution method according to the present application. The task execution method comprises the following steps:

[0042] Step S201, obtaining task attribute data of an abnormal task and system status data of a task management system, wherein an abnormal task is a task that performs abnormally, and the task management system is a system for processing abnormal tasks.

[0043] In this embodiment, the task execution method is executed on the electronic device (eg Figure 1 The server shown in the figure) can obtain task attribute data and system status data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0044] Among them, abnormal tasks refer to tasks that fail to complete as expected due to obstacles encountered during execution. These tasks usually fail due to internal logic errors, resource limitations, or external factors (such as network problems). Task attribute data obtained from the task management system can reveal its type, priority, dependencies, and historical operation status. For example, an order statistics analysis task has been successfully run every day in the past week, but the current execution fails, which is an abnormal task.

[0045] Among them, task attribute data is detailed information describing the characteristics and status of the task, which can include task type (such as order statistics analysis task), priority (such as high), dependency (such as dependency on the latest data in the order database), and historical operation status (such as successful operation every day in the past week, averaging 30 minutes, and no retries currently). These data are used to analyze the possible causes of task anomalies and formulate processing strategies.

[0046] Among them, the task management system is a software system responsible for scheduling, monitoring and managing task execution. It collects and stores task attribute data and system status data, supports the operation of task detection models, and executes corresponding task processing strategies based on model output. For example, a task management system may include functional modules such as task scheduler, monitor and log collector.

[0047] Among them, the system status data is detailed information describing the current running status of the task management system, which may include current service data (such as memory utilization, CPU utilization, network IO, etc.), virtual machine GC data (such as total GC duration, maximum GC duration, etc.), task execution statistics (such as the number of successful executions, the number of failed executions, etc.) and task operation log collection (such as error information, warning information, etc.). These data are used to evaluate system load and performance and provide necessary contextual information for the task detection model. For example, when the memory utilization is as high as 85% and the CPU utilization reaches 92%, the system may be in a high load state.

[0048] Step S202 , based on the task attribute data and the system status data, a preset task detection model is used to perform anomaly detection on the abnormal task, and the task anomaly cause and task processing strategy of the abnormal task are obtained.

[0049] Among them, the task detection model is a prediction model built based on machine learning or deep learning technology, which is obtained by fine-tuning the pre-trained language model using existing historical task data. It receives task attribute data and system status data as input, and outputs the cause of task exceptions and task processing strategies. For example, a task detection model may determine that a task failed due to insufficient memory by analyzing the error message "java.lang.OutOfMemoryError:Java heap space" in the task running log, and recommends increasing the JVM heap memory size and trying again.

[0050] The cause of task abnormality refers to the specific factors that lead to abnormal task execution, such as insufficient memory, CPU overload, network fluctuations, or logical errors in the task itself. The task detection model identifies these causes by analyzing task attribute data and system status data, and provides a basis for subsequent task processing strategies. For example, an order statistics analysis task may be abnormal due to insufficient memory when processing a large batch of order data.

[0051] Among them, the task processing strategy is a solution formulated according to the cause of the task exception, which is used to guide the subsequent execution of the task. These strategies can include immediate retry, retry after waiting, retry after adjusting the configuration, or terminate the task. The task detection model outputs the optimal task processing strategy based on the system status and task attribute data. For example, when system resources are tight, the task detection model may recommend waiting for a period of time before retrying the task; when the task fails due to insufficient memory, it may recommend increasing the JVM heap memory size before retrying.

[0052] Step S203: Repeat the abnormal task based on the task abnormality reason and the task processing strategy.

[0053] Among them, repeated execution refers to automatically executing corresponding operations to try to restore the normal operation of the task based on the output of the task detection model. These operations may include immediate retry (if the fault has been eliminated and resources allow), retry after waiting (if system resources are tight or the fault may persist), retry after adjusting the configuration (such as adjusting task parameters according to model recommendations), and termination of the task (if multiple retries are invalid or the error is unrecoverable). Repeated execution aims to increase the success rate of tasks, reduce fault handling time, and improve the overall stability and reliability of the system. For example, when the task detection model determines that system resources have been restored and the fault has been eliminated, it can recommend retrying the abnormal task immediately.

[0054] In one embodiment, taking the task attribute data as the task attribute, the system status data as the system status, and the execution statistics data and the operation log as examples, the execution logic of the task detection model is summarized as follows:

[0055] Information encoding: Convert the input task attributes, system status, execution statistics, and operation logs into vector representations that can be understood by the task detection model. For example, convert task attributes and operation logs into text inputs and use word embedding to represent them as vectors. Standardize numerical features such as system status and execution statistics and integrate them into the task detection model through positional encoding.

[0056] Contextual understanding: The task detection model uses the self-attention mechanism to understand the association and contextual relationship between input information. For example, the task detection model calculates the correlation between each element in the input sequence and other elements. For example, the relationship between the high memory usage of the task and the memory usage of the system. Through the self-attention mechanism, relevant information is integrated to form a comprehensive understanding of the current task and system status.

[0057] Cause reasoning: Based on the input information, the possible reasons for task failure are inferred, that is, the reasons for task abnormality. For example, the task detection model uses the attention mechanism to infer the possible reasons for task failure (abnormality).

[0058] Strategy generation: Based on the inferred task exception cause and status evaluation, the task processing strategy, i.e., processing strategy and retry suggestion, is generated. The task detection model considers the system resource load and task urgency, and calculates the recommended retry time interval. The number of retries is recommended based on the importance and historical success rate of the abnormal task.

[0059] The embodiment of the present application can realize accurate analysis of tasks with abnormal execution by obtaining the task attribute data of abnormal tasks and the system status data of the task management system. Based on these data, a preset task detection model is used for abnormal detection, which can accurately identify the cause of task abnormality and formulate task processing strategies in a targeted manner. The task detection model integrates domain knowledge, improves the professionalism and practicality of the model, and can comprehensively consider multi-dimensional information, such as task attributes in task attribute data, and system status, resource usage and task operation log in system status data, etc., to make intelligent decisions. For example, whether to retry, when to retry, the number of retries and the configuration parameters that need to be adjusted make the retry process more reasonable and efficient. Through accurate fault location and reasonable retry strategy, the success rate of tasks is significantly improved, the average fault processing time is reduced, and the overall stability and reliability of the system are improved. In addition, the analysis of the cause of task failure and the formulation of processing strategies can be completed automatically, reducing the dependence on manual intervention, effectively reducing the operation and maintenance costs, and realizing the intelligent processing of abnormal tasks.

[0060] In some optional implementations of this embodiment, before the step of performing abnormality detection on abnormal tasks using a preset task detection model based on task attribute data and system status data to obtain task abnormality causes and task processing strategies for abnormal tasks in step 202, the following steps are also included:

[0061] Obtain a pre-trained language model, and obtain raw data from task execution records, system logs, and operation and maintenance records of historical tasks; pre-process the raw data to remove missing values ​​and outlier noise data in the raw data to obtain a training data set; divide the training data set into a training set, a validation set, and a test set; based on the training set, fine-tune the pre-trained language model to obtain a fine-tuned task model; based on the validation set, verify the task model to obtain a verification result; based on the test set and the verification result, optimize the task processing model to obtain a preset task detection model.

[0062] Among them, the pre-trained language model refers to a language model that is pre-trained on large-scale text data and can understand and generate natural language text. This model learns the statistical laws and grammatical structures of language from massive texts through deep learning techniques, such as the Transformer architecture. It comes from public or private corpora, represents the semantic information of words, phrases and even sentences, and is used to solve various tasks in the field of natural language processing, such as text classification, sentiment analysis, machine translation, etc. For example, BERT is a widely used pre-trained language model.

[0063] In one embodiment, the core components of the pre-trained language model may include: an embedding layer, a multi-head self-attention mechanism, a feedforward neural network, layer normalization, and a residual connection. Among them, the embedding layer is used to convert the input text and numerical features into vector representations. The multi-head self-attention mechanism is used to capture the correlation between different positions in the input sequence. The feedforward neural network is used to perform a nonlinear transformation on the output of the attention mechanism. Layer normalization is used to accelerate the training speed and improve the model stability. The residual connection is used to prevent the gradient from disappearing and improve the training effect of the deep network.

[0064] Among them, task execution records refer to the various types of information and data generated during the execution of a task in a computer system or application. These records are derived from system feedback during task execution, and represent key information such as the task start time, execution status (such as success, failure, pause), execution duration, input and output data, etc. They are used to monitor the progress of task execution, analyze task performance, and troubleshoot the causes of task failure. For example, in a data analysis task, the task execution record may include the start time of data processing, the algorithm used, the intermediate results generated, and the final report.

[0065] Among them, the system log is a text file that is automatically generated by the computer system or application during operation and records the system status, events, and errors. These logs come from components such as the kernel, process manager, and network stack of the operating system, and represent the system's operating status, abnormal events, warning information, etc. They are used for system monitoring, fault diagnosis, security auditing, etc. For example, the / var / log / syslog file in the Linux system records events such as system startup, process crash, and network failure.

[0066] Among them, operation and maintenance operation records refer to the information about system maintenance, troubleshooting, configuration changes, etc., which are manually recorded by operation and maintenance personnel during the system operation and maintenance process. These records are derived from the actual operations of the operation and maintenance personnel, and represent the specific content, time, executors, and results of the operation and maintenance work. They are used to trace the operation and maintenance history, evaluate the operation and maintenance effects, and summarize the operation and maintenance experience. For example, in a database maintenance task, the operation and maintenance operation record may include the description of the maintenance task, execution time, operation steps, difficulties encountered, and solutions.

[0067] Among them, raw data refers to data directly collected from the above-mentioned task execution records, system logs, and operation and maintenance operation records without any processing or processing. These data come from the actual operation process of the system or application, and represent the original information of the system status, task execution, and operation and maintenance operations. It is used for subsequent data preprocessing, feature extraction, model training and other steps. For example, in a machine learning project, raw data may include task execution timestamps, system CPU usage, memory occupancy, fault descriptions filled in by operation and maintenance personnel, etc. In the fine-tuning process, these data are used to train and optimize the pre-trained language model after data preparation and preprocessing, feature engineering and embedding optimization to obtain a task detection model.

[0068] In one embodiment, the process of fine-tuning the pre-trained language model may include the following steps:

[0069] Prepare a pre-trained model: Choose a pre-trained language model suitable for the task, such as GPT-3, BERT, etc.

[0070] Build a dataset: Collect or create a dataset containing instructions and expected outputs, making sure the dataset covers all aspects of the task and is large enough to train the model.

[0071] Data partitioning: Divide the dataset into training set, validation set, and test set.

[0072] Design input and output formats: Design appropriate input and output formats according to task requirements. Usually the input includes instructions and possible context information, and the output is the text generated by the model based on the instructions.

[0073] Model fine-tuning: Use the training set to fine-tune the pre-trained model, monitor the performance of the model on the validation set, and adjust the training parameters to optimize the results. You can use the industry algorithm Adapter Tuning (add a trainable adapter module to the pre-trained language model, and use a different adapter for fine-tuning each task without changing the main parameters of the pre-trained language model).

[0074] Model evaluation and deployment: Evaluate the performance of the fine-tuned model on the test set, continuously optimize the model based on application feedback, and finally deploy it to actual applications.

[0075] In one example, first, a pre-trained language model is obtained as a basis. The model has been preliminarily trained on a large amount of text data and has basic language understanding and generation capabilities. Subsequently, the execution records of historical tasks, the log files generated by the system, and the operation records of the operation and maintenance personnel can be extracted from the enterprise's database as raw data. These data contain rich contextual information and task-specific knowledge, which are essential for model fine-tuning. Next, the collected raw data is pre-processed, including data cleaning, that is, removing missing values ​​(such as empty fields, unrecorded values) and outliers (such as data that is obviously illogical or beyond a reasonable range) to obtain a high-quality training data set. Next, the pre-processed data set can be divided into a training set, a validation set, and a test set according to a certain ratio, such as a ratio of 7:2:1. The pre-trained language model is fine-tuned using the training set to adjust the model parameters to make it better suited to specific tasks. Then, the performance of the fine-tuned model can be evaluated based on the validation set, and key indicators such as accuracy, recall, and F1 score can be recorded as verification results. Subsequently, the model is optimized using the test set, and the specific steps may include:

[0076] Case analysis and model adjustment: Select samples with incorrect predictions in the test set for in-depth analysis to identify contextual features or specific words that the model failed to correctly understand. For example, if the model frequently misjudges "memory overflow" and "insufficient disk space" when identifying system error logs, adjust the model's attention weights for such professional terms.

[0077] Iterative optimization: Based on the analysis results, fine-tune the model structure or training strategy, such as adding vocabulary embeddings for specific fields, adjusting the learning rate, or introducing an attention mechanism, and re-train on the training set until the performance indicators on the test set are steadily improved.

[0078] In one example, a pre-trained language model, such as BERT, can be obtained first. Then, data is collected from historical task execution records, system status logs, and operation and maintenance operation records. For example, in the order processing system of an e-commerce platform, the task execution records, CPU usage, memory usage, and operation records of operation and maintenance personnel for different errors of all order processing tasks in the past three months are collected. After data collection, annotation work is performed. The input part includes task attributes (such as order type, priority), system status (such as CPU usage, memory usage), and error logs, and the output part is annotated with fault cause analysis, processing strategy, retry interval, and number of times. For example, for an order processing failure caused by insufficient inventory, the failure reason is annotated as "insufficient inventory", the processing strategy is "notify the supplier to replenish stock", and the retry interval is "24 hours". Subsequently, feature engineering and embedding optimization are performed. Task attributes are represented by one-hot encoding, and system status features are processed by standardization. On this basis, a hierarchical embedding representation of task attributes and system status is constructed to capture the intrinsic relationship between them. In the fine-tuning stage, a multi-task learning framework is used to simultaneously predict the cause of task failure, system status evaluation, and processing strategy. By setting a multi-objective loss function, the model can learn multiple tasks simultaneously in a single training process. Finally, the optimizer is used for model training, and the adaptive learning rate adjustment is used to accelerate model convergence and prevent overfitting. After evaluation and optimization of the training, validation, and test sets, a preset task detection model is obtained.

[0079] The embodiment of the present application obtains rich raw data from multi-dimensional data sources (historical task execution records, system logs, and operation and maintenance operation records) to ensure the comprehensiveness and representativeness of the training data set. The preprocessing step effectively eliminates missing values ​​and outliers, improves data quality, and lays a solid foundation for model training. By scientifically dividing the data set into training sets, validation sets, and test sets, a comprehensive evaluation and optimization of the model is achieved. The fine-tuning strategy based on the pre-trained language model makes full use of prior knowledge, accelerates model convergence, and improves the pertinence and accuracy of the task model. The introduction of the validation set makes it possible to monitor the performance of the model in real time, ensuring the stability and reliability of the model in practical applications. Finally, the optimization strategy combined with the test set and verification results further improves the accuracy and generalization ability of the task detection model, enabling it to better adapt to complex and changeable operation and maintenance scenarios.

[0080] In some optional implementations of this embodiment, step S202, based on the task attribute data and the system status data, uses a preset task detection model to perform anomaly detection on the abnormal task, and obtains the task anomaly cause and task processing strategy of the abnormal task, which specifically includes the following steps:

[0081] Based on the preset data structure, the task attribute data and system status data are converted into model prompt words; the model prompt words are input into the preset task detection model, and the abnormal reasons of the abnormal tasks are analyzed through the task detection model to obtain the task abnormality reasons and task processing strategies that cause the abnormal tasks to be abnormal.

[0082] The data structure refers to the way or method of storing, organizing and managing data in a computer. It defines the organizational form of data, the relationship between data elements, and the calculation and operation of data. It is used to organize and convert task attribute data and system status data according to specific formats and rules. For example, the data structure can be a table containing multiple fields, each of which corresponds to a specific task attribute or system status, such as task type, task priority, CPU utilization, memory utilization, etc. This data structure enables data to be parsed and utilized by the model more effectively.

[0083] Among them, the model prompt words are a set of keywords or phrases that are converted from task attribute data and system status data based on a preset data structure and are used to input into the task detection model. These prompt words represent the key features of abnormal tasks and key information of system status, and are used to guide the task detection model to accurately analyze and judge abnormal tasks. For example, when converting task attribute data and system status data into model prompt words, key information such as task type, task priority, system error code, etc. can be extracted to form prompt words such as "high priority order processing task" and "CPU overload error". These prompt words are input into the task detection model to help the model quickly locate the cause of the abnormality and improve the accuracy and efficiency of the analysis.

[0084] In one embodiment, the task detection model can output the task abnormality cause and task processing strategy of the abnormal task, which may specifically include: a detailed analysis of the cause of task failure, an evaluation of the system and resource status, a recommended processing strategy, a recommended retry time interval and number, etc.

[0085] In one example, the data content of the task attribute data may include task attributes. Further, the task attributes include:

[0086] Type: Data processing; Priority: High; Historical operation status: The task has been successfully run 5 times recently, with an average time of 10 minutes; Number of task retries: The task has been retried 2 times.

[0087] Optionally, the data content of the system status data may include historical service data, task execution statistics data, current service data, and task operation log. Specifically, the historical service data, task execution statistics data, current service data, and task operation log respectively include the following contents:

[0088] Historical service data:

[0089] Memory usage: average 70%; CPU usage: average 65%; CPU load: average 1.5 (2-core CPU); Network IO: stable; Total GC time of virtual machine: 500ms; Maximum GC time of virtual machine: 100ms; Average GC time of virtual machine: 50ms.

[0090] Task execution statistics:

[0091] Number of successful executions: 50 times; Number of failed executions: 5 times; Number of blocked executions: 0 times; The longest task duration: 15 minutes; The total task duration: 550 minutes; The average task duration: 11 minutes.

[0092] Current service data:

[0093] Memory utilization: 80%; CPU utilization: 90%; CPU load: 2.5 (2-core CPU); Network IO: large fluctuations; Current number of tasks to be executed: 10; Total GC time of virtual machine: 800ms; Maximum GC time of virtual machine: 200ms; Average GC time of virtual machine: 80ms.

[0094] Task running log:

[0095] Error message: java.lang.OutOfMemoryError: Java heap space.

[0096] In one example, take the order processing system of an online shopping platform as an example. First, define a data structure that contains order attribute data (such as order number, purchased goods, payment status, etc.) and system status data (such as server load, network delay, etc.). The system converts these data into model prompt words, such as "order number 12345, product A, payment failure, server high load". The above model prompt words are input into the preset task detection model, which can analyze the specific reasons and task processing strategies for abnormal orders (such as payment failed orders). In this example, the task detection model identifies the abnormal cause as "payment request processing timeout caused by high server load", and the task detection model can also derive the task processing strategy corresponding to "high server load", such as "automatically expand server resources and retry the task". After executing this strategy, the system can return to normal and the order payment is successful.

[0097] The embodiments of the present application can make full use of the preset data structure to efficiently convert complex task attribute data and system status data into prompt words that can be recognized by the model. This conversion process improves the accuracy and efficiency of data processing. The task detection model is based on deep learning and big data analysis, and can accurately analyze the root causes of abnormal tasks and generate task processing strategies, avoiding the cumbersome and inefficient manual investigation in traditional methods, and significantly improving the accuracy and response speed of anomaly detection. This automated exception handling mechanism not only reduces the burden of manual intervention, but also improves the stability and reliability of the system, ensuring the continuity and efficiency of task execution.

[0098] In some optional implementations of this embodiment, the step of “converting the task attribute data and the system status data into model prompt words based on a preset data structure” specifically includes the following steps:

[0099] Based on the preset data structure, the task attribute data and system status data are formatted to obtain standardized data, which are used as model prompt words.

[0100] In one example, the order processing system of a large e-commerce platform is used as an example to explain the technical solution of this embodiment in detail. First, the system receives the order information of abnormal orders as task attribute data, and collects server load, network delay, etc. as system status data. These data are uniformly formatted based on the preset JSON data structure to ensure the consistency and readability of the data and form standardized data. These standardized data can be used as model prompts.

[0101] The embodiment of the present application cleverly formats the task attributes and system status data by presetting the data structure. This step ensures the uniformity and standardization of the data and lays a solid foundation for subsequent analysis. The obtained standardized data is used as a model prompt word to intuitively reflect the task status and the problems that the system may face, providing a clear direction for subsequent problem tracking and resolution, which not only improves data processing efficiency, but also significantly enhances the recognition accuracy and response speed of the task detection model.

[0102] In some optional implementations of this embodiment, step S204, based on the task abnormality cause and the task processing strategy, repeatedly executing the abnormal task, specifically includes the following steps:

[0103] Based on the cause of the task exception, determine whether the fault in executing the abnormal task has been eliminated; if the fault has been eliminated, obtain the current resource usage information of the task management system; if the system resource utilization of the task management system indicated by the resource usage information is less than a preset threshold, repeat the abnormal task based on the task processing strategy; if the fault has not been eliminated, or the system resource utilization reaches the preset threshold, determine the time interval for repeating the abnormal task based on the task processing strategy, and repeat the abnormal task when the waiting time of the abnormal task reaches the time interval.

[0104] Among them, resource usage information refers to detailed data about the current usage of various resources (such as CPU, memory, disk space, network bandwidth, etc.) within the task management system during the task execution process. It represents the current load status and resource consumption of the task management system and is used to evaluate whether the system has the ability to re-execute the task. For example, when indicators such as CPU usage and memory occupancy are at a low level, it indicates that the system resources are sufficient and suitable for executing the task.

[0105] Among them, the system resource utilization rate refers to the proportion or degree of actual use of various resources within the task management system when executing tasks. For example, when the CPU utilization rate reaches more than 80%, it may mean that the system resources are tight and it is not suitable to re-execute the task immediately.

[0106] The time interval refers to the waiting time length set by the task management system when it determines that the abnormal task cannot be repeated immediately, that is, the period in which the system waits for a period of time before trying to execute the abnormal task again. For example, when system resources are tight, the time interval may be set to a longer period of time to wait for system resources to be released before executing the abnormal task.

[0107] In one embodiment, according to the output of the task detection model, the system automatically performs corresponding operations: for example, retry immediately: if the task detection model determines that the fault has been eliminated and the system resources allow, retry the abnormal task immediately; retry after waiting: if the system resources are tight or the fault may persist, wait according to the time interval recommended by the task detection model and then retry the abnormal task; retry after adjusting the configuration: adjust the configuration parameters of the task according to the recommendation of the task detection model, and then retry the abnormal task; terminate the task: if it is an unrecoverable error, or multiple retries to execute the abnormal task are invalid, terminate the execution of the abnormal task and record it.

[0108] In one example, after obtaining the cause of the task exception and the task processing strategy, it is first possible to determine whether the fault in executing the abnormal task has been eliminated. If the fault has been eliminated, such as the network has returned to normal, the task management system further obtains the current resource usage information to determine whether the system resource utilization is less than the preset threshold. For example, the preset threshold is set to a CPU usage rate of no more than 70% and a memory occupancy rate of no more than 80%. If the system resource utilization meets the conditions, the task management system immediately repeats the abnormal task based on the task processing strategy to ensure the smooth progress of the transaction. If the fault is not eliminated, or the system resource utilization reaches the preset threshold, the time interval for repeating the abnormal task is determined according to the task processing strategy. For example, for abnormal tasks caused by system overload, a longer time interval can be set to wait for the system load to decrease before executing. When a network failure causes an exception, considering the uncertainty of network recovery, a shorter time interval can be set and multiple attempts can be made to improve the success rate of task execution.

[0109] In one example, the method for determining the time interval is further refined, and a specific case analysis is provided. After an abnormal task is detected, the cause of the task abnormality and the handling strategy are analyzed based on the task attribute data and system status data through the preset task detection model. Next, it is determined whether the fault has been eliminated and the system resource utilization is evaluated. If the fault has been eliminated and the system resource utilization is lower than the preset threshold, the abnormal task will be repeated immediately. If the fault has not been eliminated or the system resource utilization reaches the preset threshold, a dynamic adjustment algorithm based on task characteristics and system resource utilization will be used to determine the time interval for repeated execution.

[0110] The time interval determination method may include:

[0111] Task characteristic analysis: First, analyze the type, priority, historical execution record and other information of the abnormal task. For high-priority tasks, the system will tend to set a shorter waiting time interval to ensure that the task is processed as soon as possible. For low-priority or delayed tasks, a longer waiting time interval will be set.

[0112] System resource utilization assessment: Predict resource availability in the future based on current system resource utilization (such as CPU usage, memory usage, disk I / O, etc.). If system resources are tight, a longer waiting time interval will be set to avoid task failure due to resource competition.

[0113] Dynamic adjustment algorithm: Based on the above analysis, a dynamic adjustment algorithm is used to comprehensively consider the task characteristics and system resource utilization to determine a reasonable repetitive execution time interval. This algorithm will continuously adjust the length of the time interval based on historical data and real-time data to achieve the best task execution effect.

[0114] The embodiment of the present application can realize intelligent judgment and response to fault status during task execution through a refined task exception handling mechanism. First, the fault elimination status is accurately identified based on the cause of the task exception, effectively avoiding invalid resource occupation and task duplication. Once it is confirmed that the fault has been resolved, the resource utilization efficiency is further considered. Only when the system resources are sufficient and the utilization rate is lower than the preset threshold, the task is re-executed according to the established task processing strategy, thereby optimizing resource allocation and ensuring the efficiency of task execution and system stability. For situations where the fault is not resolved or system resources are tight, strategic waiting is adopted, and the task processing requirements and system load capacity are balanced by calculating and setting a reasonable re-execution time interval. This dynamically adjusted execution strategy not only reduces the task failure rate caused by resource conflicts, but also improves the flexibility of overall task processing and the utilization efficiency of system resources.

[0115] In some optional implementations of this embodiment, in step S203, after repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy, the following steps are also included:

[0116] In the process of repeatedly executing the abnormal task, determine whether an abnormality occurs. If an abnormality occurs, repeat the abnormal task multiple times and record the number of executions of the abnormal task. When the number of executions reaches the preset threshold and the abnormal task is still not successfully executed, stop executing the abnormal task and mark the task status of the abnormal task as execution abnormality. Obtain the fault information of the abnormal task, which includes the task parameters and operation logs when the exception occurs. Perform correlation analysis on the task parameters, operation logs and causes of the task abnormality, and generate a task abnormality analysis report for the abnormal task.

[0117] In one embodiment, if the abnormal task ultimately fails to execute successfully or requires manual intervention, the system organizes the analysis results of the task detection model into a detailed task abnormality analysis report. The content of the task abnormality analysis report may include: failure cause analysis, system and resource status, recommended solutions, and follow-up processing suggestions. Furthermore, the task abnormality analysis report can also be sent to relevant operation and maintenance personnel, developers, or task leaders to assist them in quickly handling the problem.

[0118] In one example, the abnormal task is automatically repeated according to the detected cause of the task exception and the task processing strategy. During the repeated execution, the execution status of the task is monitored in real time and the number of repeated executions is recorded. If an abnormal order task is still unsuccessful after multiple (such as 5) repeated executions, the task will be stopped and its task status will be marked as "execution exception". At this time, the fault information of the abnormal order task is further obtained, including the task parameters (such as payment amount, payment time, etc.) and operation logs (such as system error information, network delay, etc.) when the exception occurs. By correlating and analyzing this information with the cause of the task exception, a detailed abnormal task analysis report is generated to provide developers with a powerful basis for troubleshooting.

[0119] In the task retry mechanism, the embodiment of the present application combines the monitoring of the number of executions to ensure that the task execution is attempted to be restored within a reasonable range, effectively avoiding invalid repeated operations. When the task continues to fail and reaches the preset threshold, the task status is automatically marked, and the loss is stopped in time to prevent resource waste. In addition, through deep correlation analysis of task parameters, operation logs and abnormal causes, a detailed task abnormality analysis report is generated, providing valuable data support and insights for subsequent troubleshooting and system optimization.

[0120] In some optional implementations of this embodiment, in step S205, after repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy, the following steps are also included:

[0121] Acquire the successful execution data of the abnormal task; use the association rule mining algorithm to perform association analysis on the successful execution data, task attribute data and system status data to obtain the association rule set for the successful execution of the abnormal task; optimize the task detection model according to the association rule set to obtain the optimized task detection model.

[0122] Among them, the execution success data may include key indicators such as task execution results, execution time, resource consumption, etc. The execution success data characterizes the various parameters of the task under normal execution status and is used to analyze the internal laws and external conditions for successful execution of the task.

[0123] Among them, the association rule mining algorithm is a data mining technology used to discover the relationship between item sets in a large amount of data. It is applied to the execution success data, task attribute data and system status data to find out the potential factors and their combinations that affect the successful execution of abnormal tasks. For example, "when the system memory occupancy rate is less than 80% and the network delay is less than 50ms, the probability of successful task execution is higher."

[0124] Among them, the association rule set represents the association pattern between the execution success data and the task attribute data and system status data, and is used to explain which factors or condition combinations are most likely to lead to the successful execution of abnormal tasks.

[0125] In one example, the order processing system of a large e-commerce platform is taken as an example. In the system, order processing tasks may be abnormal due to network delays, insufficient inventory, etc. First, the task attribute data of abnormal orders (such as order number, product information, order time, etc.) and the system status data of the task management system (such as server load, network delay rate, etc.) can be obtained. Subsequently, the preset task detection model based on deep learning is used to comprehensively analyze these data, quickly locate the reasons for order abnormalities (such as insufficient inventory, payment failure) and generate corresponding processing strategies (such as replenishing inventory, reminding users to pay again). Based on the above analysis, the system automatically retries abnormal orders and records the execution success data after successful execution, including the final status of the order, processing time, etc. Then, the association rule mining algorithm is used to perform deep association analysis on the execution success data, task attribute data and system status data, and the association rule set that leads to the successful execution of the order is mined, such as "When the server load is less than 80% and the network delay is less than 50ms, the success rate of payment abnormal orders increases." Based on these association rule sets, the task detection model is iteratively optimized and the model parameters are adjusted so that it can more accurately predict the causes of anomalies and recommend more effective processing strategies in the future, thereby significantly improving order processing efficiency and customer satisfaction.

[0126] In one embodiment, during the actual operation, case data of successful judgments by the task detection model are collected. Representative typical cases can be manually selected to ensure data quality and diversity. The task detection model is fine-tuned again using new typical case data. Through continuous iteration, the judgment accuracy and strategy effectiveness of the task detection model are gradually improved. Different versions of the task detection model are managed, and the training data, parameters and effects of each fine-tuning are recorded. You can roll back to the previous model version as needed, or compare the performance of different versions.

[0127] The embodiment of the present application can repeatedly execute abnormal tasks and collect successful execution data, combined with the association rule mining algorithm, deeply explore the intrinsic correlation factors of successful task execution, and form a valuable set of association rules, which has important guiding significance for the prevention and resolution of similar problems in the future. Finally, the task detection model is optimized according to these association rules, which not only enhances the self-learning ability of the model, but also enables it to give more accurate and effective processing suggestions when facing complex and changeable abnormal tasks, thereby realizing the continuous optimization and upgrading of the task management system and ensuring the stability and efficiency of task execution.

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0129] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0130] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a task execution device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0131] like Figure 3 As shown, the task execution device 400 of this embodiment includes: a first acquisition module 401, a detection module 402 and an execution module 403. Among them:

[0132] A first acquisition module 401, used for the first acquisition module, is used to acquire task attribute data of abnormal tasks and system status data of the task management system, where the abnormal task is a task that performs abnormally, and the task management system is a system for processing abnormal tasks;

[0133] The detection module 402 is used to perform anomaly detection on abnormal tasks based on task attribute data and system status data using a preset task detection model to obtain task anomaly causes and task processing strategies for the abnormal tasks;

[0134] The execution module 403 is used to repeatedly execute the abnormal task based on the task abnormality reason and the task processing strategy.

[0135] The embodiment of the present application can realize accurate analysis of tasks with abnormal execution by obtaining the task attribute data of abnormal tasks and the system status data of the task management system. Based on these data, a preset task detection model is used for abnormal detection, which can accurately identify the cause of task abnormality and formulate task processing strategies in a targeted manner. The task detection model integrates domain knowledge, improves the professionalism and practicality of the model, and can comprehensively consider multi-dimensional information, such as task attributes in task attribute data, and system status, resource usage and task operation log in system status data, etc., to make intelligent decisions. For example, whether to retry, when to retry, the number of retries and the configuration parameters that need to be adjusted make the retry process more reasonable and efficient. Through accurate fault location and reasonable retry strategy, the success rate of tasks is significantly improved, the average fault processing time is reduced, and the overall stability and reliability of the system are improved. In addition, the analysis of the cause of task failure and the formulation of processing strategies can be completed automatically, reducing the dependence on manual intervention, effectively reducing the operation and maintenance costs, and realizing the intelligent processing of abnormal tasks.

[0136] In one embodiment, the detection module 402 includes:

[0137] A conversion submodule, used for converting task attribute data and system status data into model prompt words based on a preset data structure;

[0138] The analysis submodule is used to input the model prompt words into a preset task detection model, analyze the abnormal reasons of the abnormal tasks through the task detection model, and obtain the task abnormality reasons and task processing strategies that cause the abnormal tasks to be abnormal.

[0139] The embodiment of the present application can efficiently convert complex task attribute data and system status data into model-recognizable prompt words by making full use of the preset data structure. This conversion process improves the accuracy and efficiency of data processing. The task detection model is based on deep learning and big data analysis, which can accurately analyze the root causes of abnormal tasks, avoid the cumbersome and inefficient manual investigation in traditional methods, and significantly improve the accuracy and response speed of anomaly detection. This automated exception handling mechanism not only reduces the burden of manual intervention, but also improves the stability and reliability of the system, ensuring the continuity and efficiency of task execution.

[0140] In one embodiment, the conversion submodule is further used to format the task attribute data and the system status data based on a preset data structure to obtain standardized data, and use the standardized data as the model prompt word.

[0141] The embodiment of the present application cleverly formats the task attributes and system status data by presetting the data structure. This step ensures the uniformity and standardization of the data and lays a solid foundation for subsequent analysis. The obtained standardized data is used as a model prompt word to intuitively reflect the task status and the problems that the system may face, providing a clear direction for subsequent problem tracking and resolution, which not only improves data processing efficiency, but also significantly enhances the recognition accuracy and response speed of the task detection model.

[0142] In one embodiment, the execution module 403 includes:

[0143] A judgment submodule is used to judge whether the fault of executing the abnormal task is eliminated based on the cause of the task abnormality;

[0144] An acquisition submodule is used to acquire the current resource usage information of the task management system if the fault has been eliminated, and if the system resource utilization rate of the task management system indicated by the resource usage information is less than a preset threshold, then repeat the abnormal task based on the task processing strategy;

[0145] The determination submodule is used to determine the time interval for repeating the abnormal task based on the task processing strategy if the fault is not eliminated or the system resource utilization reaches a preset threshold. When the waiting time of the abnormal task reaches the time interval, the abnormal task is repeated.

[0146] The embodiment of the present application can realize intelligent judgment and response to fault status during task execution through a refined task exception handling mechanism. First, the fault elimination status is accurately identified based on the cause of the task exception, effectively avoiding invalid resource occupation and task duplication. Once it is confirmed that the fault has been resolved, the resource utilization efficiency is further considered. Only when the system resources are sufficient and the utilization rate is lower than the preset threshold, the task is re-executed according to the established task processing strategy, thereby optimizing resource allocation and ensuring the efficiency of task execution and system stability. For situations where the fault is not resolved or system resources are tight, strategic waiting is adopted, and the task processing requirements and system load capacity are balanced by calculating and setting a reasonable re-execution time interval. This dynamically adjusted execution strategy not only reduces the task failure rate caused by resource conflicts, but also improves the flexibility of overall task processing and the utilization efficiency of system resources.

[0147] In one embodiment, the task execution device 400 further includes:

[0148] The second acquisition module is used to obtain the pre-trained language model and obtain the original data from the task execution records, system logs and operation and maintenance operation records of historical tasks;

[0149] A preprocessing module is used to preprocess the original data to remove missing values ​​and abnormal noise data in the original data to obtain a training data set;

[0150] A partitioning module is used to divide the training data set into a training set, a validation set, and a test set;

[0151] The fine-tuning module is used to fine-tune the pre-trained language model based on the training set to obtain a fine-tuned task model;

[0152] The verification module is used to verify the task model based on the verification set and obtain the verification result;

[0153] The first optimization module is used to optimize the task processing model based on the test set and the verification result to obtain a preset task detection model.

[0154] The embodiment of the present application can obtain rich raw data from multi-dimensional data sources (historical task execution records, system logs, and operation and maintenance operation records) to ensure the comprehensiveness and representativeness of the training data set. The preprocessing step effectively eliminates missing values ​​and outliers, improves data quality, and lays a solid foundation for model training. By scientifically dividing the data set into training sets, validation sets, and test sets, a comprehensive evaluation and optimization of the model is achieved. The fine-tuning strategy based on the pre-trained language model makes full use of prior knowledge, accelerates model convergence, and improves the pertinence and accuracy of the task model. The introduction of the validation set makes it possible to monitor the performance of the model in real time, ensuring the stability and reliability of the model in practical applications. Finally, the optimization strategy combined with the test set and verification results further improves the accuracy and generalization ability of the task detection model, so that it can better adapt to complex and changeable operation and maintenance scenarios.

[0155] In one embodiment, the task execution device 400 further includes:

[0156] A judgment module is used to judge whether an abnormality occurs during the repeated execution of an abnormal task. If an abnormality occurs, the abnormal task is repeatedly executed multiple times, and the number of executions of the repeated abnormal task is recorded;

[0157] The marking module is used to stop executing the abnormal task and mark the task status of the abnormal task as execution abnormality when the execution times reach a preset times threshold and the abnormal task is still not successfully executed;

[0158] The third acquisition module is used to obtain the fault information of the abnormal task, and the fault information includes the task parameters and operation log when the abnormality occurs;

[0159] The first correlation analysis module is used to perform correlation analysis on task parameters, operation logs and task abnormality causes, and generate a task abnormality analysis report for abnormal tasks.

[0160] In the task retry mechanism, the embodiment of the present application combines the monitoring of the number of executions to ensure that the task execution is attempted to be restored within a reasonable range, effectively avoiding invalid repeated operations. When the task continues to fail and reaches the preset threshold, the task status is automatically marked, and the loss is stopped in time to prevent resource waste. In addition, through deep correlation analysis of task parameters, operation logs and abnormal causes, a detailed task abnormality analysis report is generated, providing valuable data support and insights for subsequent troubleshooting and system optimization.

[0161] In one embodiment, the task execution device 400 further includes:

[0162] A fourth acquisition module is used to acquire execution success data of successfully executing an abnormal task;

[0163] The second association analysis module is used to use an association rule mining algorithm to perform association analysis on the execution success data, task attribute data and system status data to obtain an association rule set for the successful execution of abnormal tasks;

[0164] The second optimization module is used to optimize the task detection model according to the association rule set to obtain an optimized task detection model.

[0165] The embodiment of the present application can repeatedly execute abnormal tasks and collect successful execution data, combined with the association rule mining algorithm, deeply explore the intrinsic correlation factors of successful task execution, and form a valuable set of association rules, which has important guiding significance for the prevention and resolution of similar problems in the future. Finally, the task detection model is optimized according to these association rules, which not only enhances the self-learning ability of the model, but also enables it to give more accurate and effective processing suggestions when facing complex and changeable abnormal tasks, thereby realizing the continuous optimization and upgrading of the task management system and ensuring the stability and efficiency of task execution.

[0166] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0167] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 6 having a memory 61, a processor 62, and a network interface 63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.

[0168] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0169] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the task execution method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0170] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions stored in the memory 61 or process data, such as computer-readable instructions for running a task execution method.

[0171] The network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0172] The embodiment of the present application can realize accurate analysis of tasks with abnormal execution by obtaining the task attribute data of abnormal tasks and the system status data of the task management system. Based on these data, a preset task detection model is used for abnormal detection, which can accurately identify the cause of task abnormality and formulate task processing strategies in a targeted manner. The task detection model integrates domain knowledge, improves the professionalism and practicality of the model, and can comprehensively consider multi-dimensional information, such as task attributes in task attribute data, and system status, resource usage and task operation log in system status data, etc., to make intelligent decisions. For example, whether to retry, when to retry, the number of retries and the configuration parameters that need to be adjusted make the retry process more reasonable and efficient. Through accurate fault location and reasonable retry strategy, the success rate of tasks is significantly improved, the average fault processing time is reduced, and the overall stability and reliability of the system are improved. In addition, the analysis of the cause of task failure and the formulation of processing strategies can be completed automatically, reducing the dependence on manual intervention, effectively reducing the operation and maintenance costs, and realizing the intelligent processing of abnormal tasks.

[0173] The present application also provides another implementation, namely, providing a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the task execution method as described above.

[0174] The embodiment of the present application can realize accurate analysis of tasks with abnormal execution by obtaining the task attribute data of abnormal tasks and the system status data of the task management system. Based on these data, a preset task detection model is used for abnormal detection, which can accurately identify the cause of task abnormality and formulate task processing strategies in a targeted manner. The task detection model integrates domain knowledge, improves the professionalism and practicality of the model, and can comprehensively consider multi-dimensional information, such as task attributes in task attribute data, and system status, resource usage and task operation log in system status data, etc., to make intelligent decisions. For example, whether to retry, when to retry, the number of retries and the configuration parameters that need to be adjusted make the retry process more reasonable and efficient. Through accurate fault location and reasonable retry strategy, the success rate of tasks is significantly improved, the average fault processing time is reduced, and the overall stability and reliability of the system are improved. In addition, the analysis of the cause of task failure and the formulation of processing strategies can be completed automatically, reducing the dependence on manual intervention, effectively reducing the operation and maintenance costs, and realizing the intelligent processing of abnormal tasks.

[0175] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0176] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A task execution method, characterized in that: The steps include: Acquire task attribute data of an abnormal task and system status data of a task management system, wherein the abnormal task is a task that performs abnormally, and the task management system is a system that processes the abnormal task; Based on the task attribute data and the system status data, a preset task detection model is used to perform anomaly detection on the abnormal task to obtain the task abnormality cause and task processing strategy of the abnormal task; Based on the task abnormality cause and the task processing strategy, the abnormal task is repeatedly executed.

2. The method according to claim 1, characterized in that The step of performing anomaly detection on the abnormal task using a preset task detection model based on the task attribute data and the system status data to obtain the task anomaly cause and task processing strategy of the abnormal task specifically includes: Based on a preset data structure, converting the task attribute data and the system status data into model prompt words; The model prompt word is input into a preset task detection model, and the abnormal reason of the abnormal task is analyzed through the task detection model to obtain the task abnormality reason and task processing strategy causing the abnormal task to be abnormal.

3. The method according to claim 2, characterized in that The step of converting the task attribute data and the system status data into model prompt words based on the preset data structure specifically includes: Based on a preset data structure, the task attribute data and the system status data are formatted to obtain standardized data, and the standardized data is used as a model prompt word.

4. The method according to claim 1, characterized in that: The step of repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy specifically includes: Based on the cause of the task abnormality, determining whether the fault in executing the abnormal task has been eliminated; If the fault has been eliminated, obtaining the current resource usage information of the task management system, and if the system resource utilization rate of the task management system indicated by the resource usage information is less than a preset threshold, repeatedly executing the abnormal task based on the task processing strategy; If the fault is not eliminated or the system resource utilization reaches the preset threshold, the time interval for repeating the abnormal task is determined based on the task processing strategy. When the waiting time of the abnormal task reaches the time interval, the abnormal task is repeated.

5. The method according to claim 1, characterized in that Before the step of performing anomaly detection on the abnormal task using a preset task detection model based on the task attribute data and the system status data to obtain the task anomaly cause and task processing strategy of the abnormal task, the method further includes: Obtain the pre-trained language model and obtain raw data from task execution records, system logs, and operation and maintenance operation records of historical tasks; Preprocessing the original data to remove missing values ​​and abnormal noise data in the original data to obtain a training data set; Dividing the training data set into a training set, a validation set, and a test set; Based on the training set, fine-tuning the pre-trained language model to obtain a fine-tuned task model; Based on the verification set, verify the task model to obtain a verification result; Based on the test set and the verification result, the task processing model is optimized to obtain a preset task detection model.

6. The method according to claim 1, characterized in that After the step of repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy, the method further includes: In the process of repeatedly executing the abnormal task, determining whether an abnormality occurs, if an abnormality occurs, repeatedly executing the abnormal task multiple times, and recording the number of times the abnormal task is repeatedly executed; When the execution times reaches a preset times threshold and the abnormal task is still not successfully executed, the abnormal task is stopped from being executed and the task status of the abnormal task is marked as execution abnormality; Acquire fault information of the abnormal task, wherein the fault information includes task parameters and operation logs when the abnormality occurs; Perform correlation analysis on the task parameters, the operation log and the cause of the task abnormality, and generate a task abnormality analysis report for the abnormal task.

7. The method according to claim 1, characterized in that After the step of repeatedly executing the abnormal task based on the task abnormality cause and the task processing strategy, the method further includes: Acquire execution success data of successfully executing the abnormal task; Using an association rule mining algorithm, an association analysis is performed on the execution success data, the task attribute data, and the system status data to obtain an association rule set for the abnormal task execution success; The task detection model is optimized according to the association rule set to obtain an optimized task detection model.

8. A task execution device, characterized in that: include: A first acquisition module, used to acquire task attribute data of an abnormal task and system status data of a task management system, wherein the abnormal task is a task that performs abnormally, and the task management system is a system that processes the abnormal task; A detection module, configured to perform anomaly detection on the abnormal task using a preset task detection model based on the task attribute data and the system status data, and obtain a task anomaly cause and a task processing strategy for the abnormal task; The execution module is used to repeatedly execute the abnormal task based on the task abnormality reason and the task processing strategy.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the task execution method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the task execution method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Abnormal task processing method and device, computer equipment and storage medium

    CN120950294A

  • System task exception processing method and device

    CN121326531A

  • System task exception processing method and device

    CN121326531B