Big data task anomaly detection method, electronic equipment and storage medium
By detecting anomalies in the logs of each node during the execution of big data tasks and combining the correlations of abnormal types, automatic anomaly detection of big data tasks is realized, which solves the problem of low efficiency of anomaly troubleshooting in the existing technology and improves the efficiency of anomaly troubleshooting.
Patent Information
- Application Number
- CN202411130606.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When errors occur in big data tasks in the cluster, the types of errors are diverse and the causes of errors are complex, resulting in low efficiency of troubleshooting. In particular, developers have little relevant experience and have a single method, and need to rely on cluster operation and maintenance support, making troubleshooting time-consuming and laborious.
By obtaining the log data generated by each node during the execution of the big data task, it performs anomaly detection on it, determines the anomaly type, and comprehensively determines the anomaly detection results based on the correlation between the anomaly types to improve the efficiency of anomaly troubleshooting.
Compared with manual troubleshooting, automated anomaly detection methods can quickly identify anomaly types and their relationships, improve the efficiency of anomaly troubleshooting, and reduce reliance on manual intervention and cluster operation and maintenance support.
Smart Images

Figure CN118656244A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an anomaly detection method, electronic device, and storage medium for big data tasks. Background Art
[0002] In the big data cluster (hereinafter referred to as cluster), various offline tasks and stream tasks (hereinafter referred to as tasks) of different types of computing engines are running, such as MapReduce, Spark batch processing, Spark streaming tasks, Flink batch processing tasks, Flink streaming tasks, SparkSQL, FlinkSQL, HiveSQL, Tez and other computing engine tasks. Once an error occurs in a computing task, you need to contact the cluster administrator for error analysis and provide corresponding solutions.
[0003] Since there are many types of task errors and the causes of errors may be caused by multiple big data components, the error troubleshooting of big data tasks is time-consuming and laborious. At the same time, troubleshooting task anomalies requires a lot of experience and technical accumulation, but task developers often have little relevant experience and a single means of troubleshooting. Therefore, they need to contact big data cluster operation and maintenance or big data cluster technical support to participate in anomaly troubleshooting, which is inefficient. Summary of the invention
[0004] The present application at least provides an anomaly detection method for a big data task, an electronic device, and a storage medium.
[0005] The present application provides an anomaly detection method for a big data task, comprising: obtaining different types of log data generated during the execution of the big data task, each log data being generated by each node required for executing the big data task; performing anomaly detection on each log data to determine at least one anomaly type occurring during the execution of the big data task; and determining an anomaly detection result based on the correlation between each anomaly type.
[0006] The present application provides an anomaly detection device for a big data task, comprising: a log acquisition module, an anomaly type determination module and a detection module; the log acquisition module is used to acquire different types of log data generated during the execution of the big data task, each log data is generated by each node required for executing the big data task; the anomaly type determination module is used to perform anomaly detection on each log data to determine at least one anomaly type that occurs during the execution of the big data task; the detection module is used to determine the anomaly detection result according to the correlation between each anomaly type.
[0007] The present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned anomaly detection method for big data tasks.
[0008] The present application provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, the anomaly detection method for the above-mentioned big data task is implemented.
[0009] The above scheme obtains the log data generated by each node during the execution of the big data task, and after performing anomaly detection on the logs of each node, obtains the anomaly type generated during the execution of the big data task. It can then comprehensively determine the anomaly detection result of the big data task execution based on the correlation between the anomaly types. Compared with manual investigation, it can improve the efficiency of anomaly investigation.
[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0012] Figure 1 It is a flowchart of an embodiment of an anomaly detection method for a big data task of the present application; Figure 2 yes Figure 1 Schematic diagram of the sub-process of step S12; Figure 3 yes Figure 1 Schematic diagram of the sub-process of step S13; Figure 4 It is a structural diagram of an embodiment of an anomaly detection device for a big data task of the present application; Figure 5 It is a structural schematic diagram of an embodiment of the electronic device of the present application; Figure 6 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0013] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0014] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0015] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0016] In some application scenarios, the anomaly detection method for big data tasks provided by the present application can be applied to the computer field, etc. The execution subject for implementing the anomaly detection method for big data tasks described in the present application can be an anomaly detection device for big data tasks, an electronic device, etc. For example, the anomaly detection device for big data tasks can be set in a terminal device or a server or other processing device, wherein the terminal device can be an audio device, an electronic device, a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the anomaly detection method for big data tasks can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0017] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of an anomaly detection method for a big data task of the present application. Figure 1 As shown, the anomaly detection method for big data tasks provided by the embodiment of the present disclosure may include the following steps: Step S11: Obtain different types of log data generated during the execution of the big data task.
[0018] In some application scenarios, various offline tasks and stream tasks (hereinafter referred to as tasks) of different types of computing engines can be run in a big data cluster (hereinafter referred to as cluster), such as MapReduce, Spark batch processing, Spark streaming tasks, Flink batch processing tasks, Flink streaming tasks, SparkSQL, FlinkSQL, HiveSQL, Tez and other computing engine tasks. Among them, the engines corresponding to computing engine tasks such as MapReduce, Spark batch processing, Spark streaming tasks, Flink batch processing tasks, Flink streaming tasks, SparkSQL, FlinkSQL, HiveSQL, Tez and other computing engine tasks are common computing engines in big data clusters, and they are not described in detail here.
[0019] A big data cluster generally includes the following components: a cluster management platform, a cluster computing resource manager, a distributed storage system, and a database. The cluster management platform can provide interactive pages to facilitate cluster management and operation and maintenance, such as managing cluster configuration, analyzing big data tasks, viewing task execution logs, and viewing cluster operation audit logs. The cluster computing resource manager (hereinafter referred to as the resource manager) can be responsible for receiving submitted big data tasks, scheduling tasks to multiple nodes for distributed computing, and collecting the operation logs of each node to the distributed storage system. At the same time, it schedules various computing resources, including CPU resources, GPU resources, memory resources, etc. All tasks of different types of computing engines will be submitted to the cluster computing resource manager, which will then apply for computing resources to start these computing tasks. The distributed storage system is responsible for storing various types of data in the big data cluster, such as business data, temporary computing data, task operation logs, and other files. The database stores the background-related data of the cluster, such as configuration information, cluster status information, alarm information, audit logs, etc.
[0020] To run a computing task in a big data cluster, the client first needs to submit the task to the cluster resource manager, and then the cluster resource manager will create a driver node (Master) and several worker nodes (Worker) for the task. Generally speaking, task exceptions may occur at any location during task submission and execution. Therefore, once an exception occurs in a big data task, it is necessary to check the logs of the scheduling node, cluster resource manager, driver node, worker node, etc. Each log data is generated by each node required to execute the big data task. Each node can be the above-mentioned cluster management platform, cluster computing resource manager, and each computing node.
[0021] Step S12: Perform anomaly detection on each log data to determine at least one type of anomaly that occurs during the execution of the big data task.
[0022] Exemplarily, there may be logs indicating execution exceptions in each collected log data, and each log data can be analyzed to determine the specific exception type indicated by the log data indicating the exception. For example, the collected Driver type logs of the Spark computing engine include: 23 / 05 / 24 06:02:37 ERRORcluster.YarnClusterScheduler: Lost executor 3 on 192.168.209.193: Containerfrom a bad node: container_e19_1684393119839_1281_01_000004 on host: hdp-hadoop-hdp-nodemanager.cloudspace.svc.cluster.local. Exit status: 137.Diagnostics: OOMKilled. The exception type indicated by this log is the Executor exit exception of the Driver type log of the Spark computing engine during the execution of the big data task.
[0023] Step S13: Determine the anomaly detection result according to the association relationship between each anomaly type.
[0024] Because exceptions may exist in various stages such as task scheduling and execution, and some exceptions may be caused by the existence of other exceptions, it is impossible to find the root cause of the exception by analyzing each exception separately. This solution can determine the dependency relationship between the exceptions by analyzing the association between the exception types, so as to determine the root cause of the exceptions in the big data task, thereby improving the efficiency of exception analysis and enabling more targeted handling of the exceptions in the future.
[0025] The above scheme obtains the log data generated by each node during the execution of the big data task, and after performing anomaly detection on the logs of each node, obtains the anomaly type generated during the execution of the big data task. It can then comprehensively determine the anomaly detection result of the big data task execution based on the correlation between the anomaly types. Compared with manual investigation, it can improve the efficiency of anomaly investigation.
[0026] In some embodiments, the anomaly detection method for a big data task includes the following steps: a cluster computing resource manager receives a big data task. Then, a log aggregation path corresponding to a computing engine required for the execution of the big data task is obtained. The log data generated during the execution of the big data task is then stored in a distributed storage system according to the log aggregation path. On this basis, the above step S11 may include the following steps: according to the identification code of the big data task, the log aggregation path of the big data task is obtained from the computing resource manager. Several different types of log data corresponding to the big data task are obtained from each distributed storage system according to the log aggregation path.
[0027] Exemplarily, the big data task may be received through an interactive page. In some application scenarios, when the computing resource manager in the big data cluster is started, the initialization configuration item is obtained from the big data cluster management platform, which includes the log aggregation directory path of each big data computing engine. This enables the resource manager to store the logs of different types of tasks in different directories of the distributed storage system. After the cluster computing resource manager receives the submitted computing tasks of different types, it will be responsible for allocating these tasks to different computing nodes for distributed computing, and will aggregate the logs of these nodes into the distributed storage system for storage. The big data cluster may include an anomaly detection module, and the data reading unit in the anomaly detection module obtains the log aggregation path of the big data task from the computing resource manager according to the identification code of the big data task, and then obtains several different types of log data corresponding to the big data task from each distributed storage system according to the log aggregation path. Or in other application scenarios, the data reading unit reads the log file path (Driver + Executors) of all containers of the task from the distributed storage system according to the identification code of the task (for example, the identification code of the task in HadoopResourceManager is ApplicationId), and obtains the scheduling log of the task from the cluster computing resource manager (resource manager).
[0028] In some embodiments, the anomaly detection method for big data tasks may further include the following steps: In response to the big data task being an offline task, after the big data task is completed or the big data task has not been subjected to anomaly detection, the step of obtaining different types of log data generated during the execution of the big data task is executed on the big data task. Or, in response to the big data task being an online task, the step of obtaining different types of log data generated during the execution of the big data task is executed on the big data task in real time.
[0029] The execution completion may specifically mean that each computing node stops executing the big data task. That is, the execution completion may be caused by each computing node stopping executing the big data task due to execution failure, or each computing node stops executing the big data task after successful execution.
[0030] Exemplarily, after a big data task is submitted, the big data cluster management platform obtains the list of tasks being executed through the resource manager interface. Traverse the task list. For offline batch processing tasks, the task status can be determined at the end of the task. If the task fails, the anomaly detection module is called to analyze the task log. For stream processing tasks, the task log can be detected regularly. Optionally, the anomaly detection results of the task log can be persisted to the database and pushed to other platforms according to the configuration.
[0031] In some embodiments, see Figure 2 , the above step S12 may include the following steps: Step S121: Determine the structuring method of each log data.
[0032] Different types of log data have different structuring methods. In some application scenarios, the structured processing can be performed by the abnormal information structuring unit in the abnormality detection module, and the abnormal information structuring unit includes several abnormal information structured extractors. Different computing engine types can have different abnormality detection modules. According to the type of computing engine of the task, select an abnormality detection module for subsequent abnormality detection. The types of computing engines include but are not limited to various big data task types Spark, Flink, MapReduce, Tez, etc. The abnormality detection module may include several abnormal information structured extractors, and abnormal information structured extractors corresponding to different log types. Traverse the log files of all components involved in the task from scheduling to actual operation, and select the corresponding abnormal information structured extractor for structured information extraction according to the log file type and task type. For example, for tasks executed by the Spark engine, there will be abnormal information structured extractors for components such as (Yarn, Driver, Executor, Scheduler). Exemplarily, the logs extracted from the Spark engine may include scheduler logs, Driver logs, Executor logs, and cluster resource manager diagnostic logs. The log types extracted by the Flink engine include scheduler logs, JobManager logs, TaskManager logs, and cluster resource manager diagnostic logs.
[0033] Step S122: Perform structured processing on each log data to obtain structured data corresponding to each log data.
[0034] Among them, each structured data includes an exception type, exception information, and field value data corresponding to each exception information. Optionally, the above step S122 may include: for each log data: in response to the existence of an exception type to be extracted in a structured manner in the log data, extract the exception type as the exception type in the structured data; and extract the field value data corresponding to each exception information in the log data according to each exception information in the structured manner, and obtain the structured data corresponding to the log data. That is, each log data is structured in a structured manner.
[0035] Optionally, the structured method is an abnormal structured method. If the log data is generated during a normal execution process, the log data may not include an abnormal type, and structured data may not be generated for the log data. Take the exception type included in the log data as an example, specifically the Executor exit exception knowledge of the Driver type log of the Spark computing engine as an example. The exception information includes container, exitCode, and diagnostics. The log data is: 23 / 05 / 24 06:02:37 ERROR cluster.YarnClusterScheduler: Lost executor 3 on 192.168.209.193:Container from a bad node: container_e19_1684393119839_1281_01_000004 onhost: hdp-hadoop-hdp-nodemanager.cloudspace.svc.cluster.local. Exit status:137. Diagnostics: OOMKilled. According to each exception information, the field value data of the log data is extracted, and the obtained structured data can be: {"desc": "ContainerLost" “groupDataMap”: "container":"container_e19_1684393119839_1281_01_000004" "exitCode": "137" "diagnostics": "OOMKilled" "errorLog": exception stack text } Among them, desc represents the exception type. In this example, the exception type is specifically ContainerLost, container is the exception information, and the field value data corresponding to the exception information is container_e19_1684393119839_1281_01_000004, exitCode is the exception information, and the field value data corresponding to the exception information is 137, and diagnostics is the exception information, and the field value data corresponding to the exception information is OOMKilled. errorLog is the exception information. The exception stack text is the corresponding field value data. The exception stack text can be specific log data, for example, 23 / 05 / 24 06:02:37ERROR cluster.YarnClusterScheduler: Lost executor 3 on 192.168.209.193:Container from a bad node: container_e19_1684393119839_1281_01_000004 onhost: hdp-hadoop-hdp-nodemanager.cloudspace.svc.cluster.local. Exit status:137. Diagnostics: OOMKilled.
[0036] That is, each structured data will contain the following types of information (exception type, exception information field, field value data corresponding to the exception information). After the exception information structured extractor processes various types of logs, a set of structured exception information for the task can be obtained.
[0037] Optionally, for each log data, select its corresponding exception information structured extractor, process it line by line, and extract the log data into structured data. For different types of engines and different types of logs, an exception knowledge base can be maintained. For example, for the Driver type log of the Spark computing engine, the exception knowledge base includes but is not limited to the exception knowledge base such as broadcast Join timeout, TaskSet return data volume is too large, Driver memory overflow, Executor abnormal exit, etc. Optionally, the exception information structured extractor can read the exception information structured extraction rules to structure the log data. The exception information structured extraction rules of different engines can be different. Among them, the exception information structured extraction rules include exception matching patterns, exception matching fields and other information. Continuing with the above example, the matching rule example is: *Lost executor.*Container from a bad node: (? <container>\S+) on.+Exit status: (? <exitcode>.+)\..*Diagnostics: (? <diagnostics>.*).
[0038] In some embodiments, the anomaly detection result includes the cause of the anomaly corresponding to each anomaly type. Figure 3 , the above step S13 may include the following steps: Step S131: Determine at least one target abnormality type combination according to each abnormality type.
[0039] Each target abnormality type combination includes at least two abnormality types that are associated with each other. Exemplarily, each abnormality type is randomly combined, and each combination includes at least two abnormality types. The same abnormality type can be in multiple target abnormality type combinations, and different target abnormality types can include the same abnormality type. Different abnormality types contain different numbers of abnormality types or the same number of abnormality types but contain at least partially different abnormality types.
[0040] Step S132: Query whether each target anomaly type combination exists in the anomaly combination knowledge base.
[0041] The abnormal combination knowledge base is pre-established, and the abnormal combination knowledge base records the abnormal causes of several abnormal type combinations.
[0042] Step S133: In response to the existence of each target abnormality type combination in the abnormality combination knowledge base, the abnormality generation cause corresponding to the target abnormality type combination in the abnormality combination knowledge base is used as the abnormality generation cause of each target abnormality type combination.
[0043] The cause of the abnormality of the target abnormality type combination is used to characterize the cause of the abnormality corresponding to each abnormality type in the target abnormality type combination. Optionally, in response to the first target abnormality type combination being in the second target abnormality type combination, the cause of the abnormality of the second target abnormality type combination is used as the cause of the abnormality of the first target abnormality type combination. The first target abnormality type combination being in the second target abnormality type combination can be understood as the number of abnormality types contained in the second target abnormality type combination is greater than the number of abnormality types in the first target abnormality type combination, and each abnormality type in the first target abnormality type combination is in the second target abnormality type combination. The first target abnormality type combination and the second target abnormality type combination are both any target abnormality type combinations among all target abnormality type combinations.
[0044] In some embodiments, the method further comprises the following steps: in response to the target exception type combination in which the target exception type is located not existing in the exception combination knowledge base, querying the exception knowledge base, in which the exception knowledge base records the exception generation causes of each exception type. In response to the target exception type being in the exception knowledge base, taking the exception generation cause corresponding to the target exception type recorded in the exception knowledge base as the exception generation cause of the target exception type.
[0045] The target exception type is one of the exception types. That is, the exception type combination in which the target exception type is located does not exist in the exception combination knowledge base, indicating that the generation of the target exception type does not depend on the village of other exception types, so the exception generation cause corresponding to the target exception type recorded in the exception knowledge base can be directly used as the exception generation cause of the target exception type. If the target exception type is not in the exception knowledge base, it can directly report an error or execute a preset process to serve as a prompt.
[0046] In some application scenarios, step S13 can be performed by an abnormal combination knowledge base unit in the abnormal detection module, the input of the abnormal combination knowledge base unit is a set of structured data, and the output includes the cause of the abnormality, or may also include tuning parameters or suggestion text. Exemplarily, the abnormal combination knowledge base unit reads the abnormal combination knowledge base and determines whether the target abnormal type combination is in the abnormal combination knowledge base. Among them, the abnormal combination knowledge bases corresponding to different engines are different, or the abnormal combination knowledge bases corresponding to different engines are in different storage areas in the same abnormal combination knowledge base. The abnormal knowledge bases corresponding to different engines are different, or the abnormal knowledge bases corresponding to different engines are in different storage areas in the same abnormal knowledge base. The abnormal combination knowledge base unit can provide common possible causes and solutions for each specific abnormality. For example, take the broadcast timeout exception in the Spark task as an example org.apache.spark.SparkException: Couldnot execute broadcast in 300 secs. You can increase the timeout forbroadcasts via spark.sql.broadcastTimeout or disable broadcast join bysetting spark.sql.autoBroadcastJoinThreshold to -1, and its exception matching rules are: ^.+org\.apache\.spark\.SparkException.*Could not execute broadcast in(? <threshold>.*) secs.*$.
[0047] Among them, the matching field is: threshold. After the abnormal information structure unit, it will be extracted as a structured data, the specific information is: {"desc": "BroadcastTimeout" "groupDataMap": "threshold":"300s" "errorLog": exception stack text } When the structured data obtained by the driver log through the exception information structured unit contains a broadcast Join timeout exception, and the structured data contains broadcast timeout information. After passing through the exception combination knowledge base unit, it will output exception descriptions and exception solution texts such as "A broadcast Join timeout exception was detected in this Spark task. The current broadcast timeout is set to 300s. It is recommended to set spark.sql.broadcastTimeout to 600s." Among them, 300s is the data extracted from the exception information through the exception information structured unit, so this module can adaptively output recommended parameters.
[0048] Optionally, different engines can have different anomaly combination knowledge bases, and one big data task can be calculated by one engine.
[0049] In some embodiments, the anomaly detection result also includes an anomaly solution for the big data task. The method further includes: determining an anomaly solution for each target anomaly type combination based on the anomaly cause of each target anomaly type combination. Combining each anomaly solution to obtain an anomaly solution for the big data task.
[0050] Optionally, the association between each exception cause and the exception solution can be pre-established, and then the exception solution for each exception cause is determined based on the association. Or in some application scenarios, the exception combination knowledge base unit directly outputs the exception solution after receiving the structured data of the big data task.
[0051] For example, when the Driver has a Container Lost exception and the Executor has a heartbeat loss exception, combining these two exceptions, it can be analyzed that the Executor of the task has a heartbeat loss, which causes the Driver to have a ContainerLost exception. The solution to the exception is to increase the heartbeat timeout of the Driver and Executor.
[0052] Optionally, the anomaly detection results will be persisted in the database of the big data set cluster, and the task anomaly will be prompted on the interactive interface of the big data cluster management platform. The anomaly detection results can also be pushed to pre-set channels (such as but not limited to email, social software, communication software, text messages, and phone calls) at regular intervals according to pre-configured strategies.
[0053] The above solution integrates the logs of each link in the execution of big data tasks, detects the logs of all components on the task operation link, and obtains comprehensive anomaly detection results. For example, it analyzes whether a big data task has anomalies from multiple perspectives such as scheduling node logs, driver node logs, and working node logs, and integrates the anomaly detection results from multiple perspectives to provide comprehensive detection results and solutions.
[0054] See also Figure 4 , Figure 4 It is a structural diagram of an embodiment of an anomaly detection device for a big data task of the present application. The anomaly detection device 30 for a big data task can execute the anomaly detection method for the above-mentioned big data task. The anomaly detection device 30 for a big data task includes a log acquisition module 31, an anomaly type determination module 32 and a detection module 33; the log acquisition module 31 is used to acquire different types of log data generated during the execution of the big data task, and each log data is generated by each node required to execute the big data task; the anomaly type determination module 32 is used to perform anomaly detection on each log data and determine at least one anomaly type that occurs during the execution of the big data task; the detection module 33 is used to determine the anomaly detection result according to the correlation between each anomaly type.
[0055] The division of each module in the anomaly detection device is independent of the division of each unit in the anomaly detection module. For example, the anomaly type determination module 32 may be the above-mentioned structured extractor of anomaly information, and the detection module 33 may be the above-mentioned anomaly combination knowledge base unit.
[0056] The above scheme obtains the log data generated by each node during the execution of the big data task, and after performing anomaly detection on the logs of each node, obtains the anomaly type generated during the execution of the big data task. It can then comprehensively determine the anomaly detection result of the big data task execution based on the correlation between the anomaly types. Compared with manual investigation, it can improve the efficiency of anomaly investigation.
[0057] Among them, the functions of each module can be found in the embodiment of the anomaly detection method for big data tasks, and will not be repeated here.
[0058] See also Figure 5 , Figure 5 4 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 40 includes a memory 41 and a processor 42, and the processor 42 is used to execute program instructions stored in the memory 41 to implement the steps in the embodiment of the anomaly detection method for any of the above-mentioned big data tasks. In a specific implementation scenario, the electronic device 40 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 40 may also include a carrier device such as a laptop computer and a tablet computer, which is not limited here.
[0059] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in the above-mentioned anomaly detection method embodiment of any big data task. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip. The electronic device can be a device with a big data cluster.
[0060] The above scheme obtains the log data generated by each node during the execution of the big data task, and after performing anomaly detection on the logs of each node, obtains the anomaly type generated during the execution of the big data task. It can then comprehensively determine the anomaly detection result of the big data task execution based on the correlation between the anomaly types. Compared with manual investigation, it can improve the efficiency of anomaly investigation.
[0061] See also Figure 6 , Figure 6 The computer-readable storage medium 50 stores program instructions 51, which, when executed by a processor, implement the steps in the above-mentioned anomaly detection method embodiment for any big data task.
[0062] The above scheme obtains the log data generated by each node during the execution of the big data task, and after performing anomaly detection on the logs of each node, obtains the anomaly type generated during the execution of the big data task. It can then comprehensively determine the anomaly detection result of the big data task execution based on the correlation between the anomaly types. Compared with manual investigation, it can improve the efficiency of anomaly investigation.
[0063] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0064] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0065] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. In another image position, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0066] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.< / threshold> < / diagnostics> < / exitcode> < / container>
Claims
1. A method for anomaly detection of big data tasks, characterized in that: include: Acquire different types of log data generated during the execution of the big data task, each of the log data is generated by each node required to execute the big data task; Performing anomaly detection on each of the log data to determine at least one type of anomaly that occurs during the execution of the big data task; An anomaly detection result is determined based on the association relationship between the anomaly types.
2. The method according to claim 1, characterized in that The abnormality detection result includes the abnormality cause corresponding to each abnormality type, and the abnormality detection result is determined according to the association relationship between the abnormality types, including: Determine at least one target abnormality type combination according to each of the abnormality types, each of the target abnormality type combinations including at least two abnormality types that have an associated relationship; Querying whether each target abnormal type combination exists in an abnormal combination knowledge base, wherein the abnormal combination knowledge base is pre-established and records the abnormal causes of several abnormal type combinations; In response to the existence of each of the target exception type combinations in the exception combination knowledge base, the exception cause corresponding to the target exception type combination in the exception combination knowledge base is used as the exception cause of each of the target exception type combinations, and the exception cause of the target exception type combination is used to characterize the exception cause corresponding to each of the exception types in the target exception type combination.
3. The method according to claim 2, characterized in that The anomaly detection result also includes an anomaly solution for the big data task, and the method further includes: Determine the exception solution for each target exception type combination based on the exception generation cause of each target exception type combination; The exception solutions are combined to obtain an exception solution for the big data task.
4. The method according to claim 2, characterized in that: The method further comprises: In response to the target exception type combination in which the target exception type is located not existing in the exception combination knowledge base, querying the exception knowledge base, in which the exception knowledge base records the exception generation cause of each of the exception types; In response to the target exception type being in the exception knowledge base, the exception generation cause corresponding to the target exception type recorded in the exception knowledge base is used as the exception generation cause of the target exception type.
5. The method according to any one of claims 1 to 4, characterized in that: The performing anomaly detection on each of the log data to determine at least one type of anomaly occurring during the execution of the big data task includes: Determining a structured manner of each of the log data, where different types of log data correspond to different structured manners; Structuring is performed on each of the log data to obtain structured data corresponding to each of the log data, wherein each of the structured data includes an exception type, exception information, and field value data corresponding to each of the exception information.
6. The method according to claim 5, characterized in that The performing structured processing on each of the log data to obtain structured data corresponding to each of the log data includes: For each of the log data: in response to the presence of the abnormal type to be extracted in the structured manner in the log data, extract the abnormal type as the abnormal type in the structured data; and, According to each of the abnormal information in the structured manner, field value data corresponding to each of the abnormal information in the log data is extracted to obtain the structured data corresponding to the log data.
7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The cluster computing resource manager receives the big data task; Obtain the log aggregation path corresponding to the computing engine required for executing the big data task; The log data generated during the execution of the big data task is stored in the distributed storage system according to the log aggregation path; The different types of log data generated during the execution of the big data task include: According to the identification code of the big data task, obtaining the log aggregation path of the big data task from the computing resource manager; Several different types of log data corresponding to the big data task are obtained from each of the distributed storage systems according to the log aggregation path.
8. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to the big data task being an offline task, after the big data task is completed or the big data task has not been subjected to abnormality detection, performing the step of obtaining different types of log data generated during the execution of the big data task on the big data task; Or, in response to the big data task being an online task, the step of obtaining different types of log data generated during the execution of the big data task is performed on the big data task in real time.
9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Failure task reason positioning method and device, electronic equipment and storage medium
CN115145870A
Task monitoring method for big data cluster and related equipment
CN116126621A
Flink task exception handling method and device, electronic equipment and medium
CN117149480A
Service operation abnormity reason detection method and device, equipment and storage medium
CN117762678A
Transaction anomaly detection method and device, electronic equipment and computer storage medium
CN118152963A
Cited By
Method, system and equipment for self-detecting abnormity of component and medium
CN119376992A
A method, system, device and medium for self-detecting abnormality of a component
CN119376992B
Abnormity detection and repair method and system for big data task and medium
CN121743130A
An abnormality detection and repair method and system for a big data task and a medium
CN121743130B
