Error reporting task processing method and device
By counting the number of errors reported by target tasks in automation tests and determining whether they are tasks corresponding to preset processing methods, and performing error processing marks, the problem of low efficiency in error reporting tasks in automation tests is solved, and automatic distinction and efficient processing of different error reporting tasks are realized.
Patent Information
- Application Number
- CN202210102664.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-01-27
AI Technical Summary
In the prior art, the error-reporting tasks generated during automated testing are less efficient, resulting in large workloads and low efficiency.
By obtaining the execution results of the target task, counting the number of error reports that failed to be executed within the preset time period, determining whether it is the initial error report task, and performing error report processing marks based on whether it is the task corresponding to the preset processing method.
It realizes automatic distinction between different error reporting tasks and processing them through different processing methods, reducing the processing time of error reporting tasks, reducing the processing pressure, and improving processing efficiency.
Smart Images

Figure CN114443482B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to a method for processing an error task. The present application also relates to an apparatus for processing an error task, a computing device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of computer technology and Internet technology, the software industry has become more and more mature and is facing more and more challenges. The ever-changing user needs, shortened development cycle, frequent deployment and launch, complex product architecture, etc. have gradually increased the testing requirements before the software is launched. Automated testing is an increasingly common testing method.
[0003] In the prior art, during the automated testing process, a large number of test tasks are initiated in a cycle every day. Due to environmental problems, failures, false positives of use cases, and other issues, some test tasks cannot run normally, which will generate a large number of error tasks. Each error task needs to be handled manually one by one, resulting in a large workload for manual processing and low efficiency in handling error tasks. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a method for processing an error reporting task. The present application also relates to an error reporting task processing device, a computing device, and a computer-readable storage medium to solve the technical problem of low processing efficiency of error reporting tasks in the prior art.
[0005] According to a first aspect of an embodiment of the present application, a method for processing an error reporting task is provided, comprising:
[0006] Get the target task;
[0007] Counting the number of execution failure errors in at least one execution result of the target task within a preset time period, and determining whether the target task is an initial error reporting task according to the number of errors;
[0008] In the case where the target task is an initial error reporting task, determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task.
[0009] According to a second aspect of an embodiment of the present application, there is provided an error reporting task processing device, comprising:
[0010] An acquisition module, configured to acquire a target task;
[0011] A determination module is configured to count the number of execution failure errors in at least one execution result of the target task within a preset time period, and determine whether the target task is an initial error reporting task according to the number of errors;
[0012] The marking module is configured to determine whether the target task is a task corresponding to a preset processing method when the target task is an initial error reporting task, and to mark the target task for error processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task.
[0013] According to a third aspect of an embodiment of the present application, a computing device is provided, including:
[0014] Memory and processor;
[0015] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions:
[0016] Get the target task;
[0017] Counting the number of execution failure errors in at least one execution result of the target task within a preset time period, and determining whether the target task is an initial error reporting task according to the number of errors;
[0018] In the case where the target task is an initial error reporting task, determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task.
[0019] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of any of the error reporting task processing methods are implemented.
[0020] The error task processing method provided in the present application can first determine whether the target task is an initial error task based on the number of failed errors in the execution result of the target task. If so, it can further determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing based on the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task. In this way, the target task can be marked for error processing based on the number of failed errors in the execution result and whether the corresponding processing method is a general method corresponding to different tasks, and can be processed subsequently through the corresponding processing method, that is, different error tasks can be automatically distinguished, and different error tasks can be processed through different processing methods. Not all error tasks need to be processed one by one in the subsequent processing, which greatly reduces the processing time of error tasks, reduces the processing pressure of error tasks, and improves the processing efficiency of error tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flowchart of a method for processing an error reporting task provided by an embodiment of the present application;
[0022] Figure 2 This is a schematic diagram of a process for determining an initial error reporting task provided by an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of a package code of a preset processing method provided in an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of a feedback abnormality mark provided by an embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of the steps of a preset processing method provided in one embodiment of the present application;
[0026] Figure 6 is a flowchart of another error reporting task processing method provided by an embodiment of the present application;
[0027] Figure 7 It is a structural diagram of an error reporting task processing device provided by an embodiment of the present application;
[0028] Figure 8 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0029] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0030] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0031] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0032] In the present application, a method for processing an error task is provided. The present application also relates to an error task processing device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0033] Figure 1 A flowchart of a method for processing an error reporting task according to an embodiment of the present application is shown, which specifically includes the following steps:
[0034] Step 102: Get the target task.
[0035] It should be noted that the target task refers to any task that is run multiple times in a loop within a preset time period and has execution failures in the execution results of the multiple runs. The target task can be an automated testing task or a task executed during the running of an application, such as a download task, an update task, etc.
[0036] In actual applications, when obtaining the target task, the execution result of each execution of the target task can be obtained. In one possible implementation method, the execution result of the target task within the preset time period is obtained once every preset time period, and the execution results within the preset time period are subsequently analyzed and processed; in another possible implementation method, each time the target task runs and generates an execution result, the generated execution result is obtained in real time.
[0037] For example, if an automated test task is run multiple times in a day, at the end of the day, the execution results of the multiple runs of the automated test task can be obtained. Alternatively, an automated test task is run once at 2:00 and generates execution result 1, and the execution result 1 is obtained at this time; then the automated test task is run again at 3:00 and generates execution result 2, and the execution result 2 is obtained at this time, and so on, and the execution results generated are obtained in real time.
[0038] In the embodiment of the present application, a target task can be obtained that has been run multiple times in a loop within a preset time period and has execution failures in the execution results of the multiple runs, and the execution results of the target task that have been run multiple times can be obtained, which provides a data basis for subsequently determining the type of execution failure of the target task, facilitates the classification and induction of erroneous tasks, and thus performs adaptive processing.
[0039] Step 104: Count the number of execution failure errors in at least one execution result of the target task within a preset time period, and determine whether the target task is an initial error task based on the number of errors.
[0040] Specifically, the preset duration may refer to a preset time period, which may represent a statistical cycle for statistically analyzing the execution results of the target task, such as 12 hours, one day, one week, etc. The initial error reporting task may refer to an initially determined error reporting task that needs to be processed later.
[0041] It should be noted that the number of error reports of failed execution in at least one execution result of the target task is different, indicating that the circumstances of the failure of the target task execution are different. Therefore, the number of error reports of failed execution in at least one execution result of the target task within a preset time period can be counted, and based on the number of errors, it can be determined whether the target task is an initial error task, thereby filtering out error tasks that obviously do not require subsequent processing, reducing processing pressure and improving processing efficiency.
[0042] In an optional implementation of this embodiment, whether it is an initial error reporting task can be determined based on a preset number threshold and whether there is a case of execution passing, that is, according to the number of error reporting, whether the target task is an initial error reporting task is determined. The specific implementation process can be as follows:
[0043] When the number of error reports is greater than the number threshold, determining the target task as the initial error reporting task;
[0044] When the number of error reports is not greater than the number threshold, determining whether there is a case of execution passing in the at least one execution result;
[0045] If the execution is successful, determine that the target task is not the initial error reporting task, and mark the target task as a processed error reporting task;
[0046] If there is no execution success, the target task is determined to be the initial error reporting task.
[0047] Specifically, the number threshold may refer to a preset value used to determine whether the number of execution failure errors in at least one execution result of the target task within a preset time period is too many. For example, the preset threshold may be 2, 3, 4, etc.
[0048] It should be noted that if the number of failed execution errors in at least one execution result of the target task within the preset time period is greater than the number threshold, it means that the target task has been executed multiple times in a loop within the preset time period and the number of errors is too many. At this time, the target task can be initially determined as an error task that needs to be processed subsequently, that is, the target task can be directly determined as the initial error task.
[0049] If the number of failed execution errors in at least one execution result of the target task within the preset time period is not greater than the number threshold, it means that the target task has been executed fewer times in the preset time period, but there are execution failures. Therefore, at this time, it is possible to further determine whether there is an execution success in at least one execution result of the target task within the preset time period. If so, it means that the target task has been successfully executed once in multiple cycles. Therefore, it can be assumed that the error record of the target task has been processed and no subsequent attention is required. At this time, the target task is marked as a processed error task. If not, it means that the target task has failed in multiple cycles. Therefore, at this time, the target task can be initially determined as an error task that needs to be processed later, that is, the target task can be determined as the initial error task.
[0050] For example, Figure 2 FIG. 1 is a schematic diagram of a process for determining an initial error reporting task provided by an embodiment of the present application. Figure 2 As shown in the figure, the execution results of all automated test tasks on the day are analyzed. For the same automated test task, when the number of errors exceeds 2, it is forcibly marked as an initial error task. When the number of errors is less than or equal to 2, as long as there is 1 pass, it is marked as a processed error task. The processed error task does not need to be paid attention to later. In other cases, it is marked as an initial error task, which may need to be processed later.
[0051] In an embodiment of the present application, based on the number of failed execution errors in at least one execution result of the target task within a preset time period, combined with a pre-set number threshold, it can be determined whether the target task is an error task initially determined to need to be processed subsequently. That is, based on the number of errors within a certain time period, error tasks that do not need to be processed subsequently can be preliminarily screened out, thereby reducing the number of error tasks to be processed subsequently and reducing processing pressure.
[0052] Step 106: When the target task is an initial error reporting task, determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error reporting processing according to the determination result.
[0053] Among them, the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task.
[0054] Specifically, the preset processing method may be a general method corresponding to different tasks, that is, a common method for different tasks, wherein the common method is a link segment provided for automated test link automation, which is essentially a small and frequently used link.
[0055] In addition, different error handling tags can correspond to different processing methods, so that different types of error reporting tasks can be classified, summarized, and recorded for adaptive processing.
[0056] In actual applications, determining whether the target task is a task corresponding to the preset processing method may include determining whether the target task calls the preset processing method during operation, or whether the interface included in the preset processing method is called.
[0057] In the embodiment of the present application, it is possible to determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing based on the determination result. Different error processing marks can be used to characterize different processing methods, so that different error tasks can be processed in different processing methods. Not all error tasks need to be processed subsequently, which greatly reduces processing time and improves the processing efficiency of error tasks.
[0058] In an optional implementation of this embodiment, it is possible to determine whether the target task is a task corresponding to the preset processing method based on the preset processing method and the interface included in the preset processing method, that is, to determine whether the target task is a task corresponding to the preset processing method, and to mark the target task for error processing according to the determination result. The specific implementation process may be as follows:
[0059] Determine whether the execution method called by the target task is the preset processing method;
[0060] If it is the preset processing method, determining that the target task is a task corresponding to the preset processing method, and marking the target task as the first error reporting task to be processed;
[0061] If it is not the preset processing method, determine whether the execution interface called by the target task is the interface included in the preset processing method. If it is the interface included in the preset processing method, determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error task to be processed.
[0062] Specifically, the first pending error task may refer to a certain type of pending error task. The first pending error task has a corresponding processing method and may be subsequently processed based on the corresponding processing method. For example, the first pending error task may be an error task marked as being handled by a dedicated person.
[0063] In actual applications, when the call to the preset processing method (i.e., the public method) fails, an exception may be thrown, and this exception can be identified, so it is possible to first determine whether the execution method called by the target task is the preset processing method. If it is the preset processing method, it is possible to determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error-reporting task to be processed. If it is not the preset processing method, it is possible to further determine whether the execution interface called by the target task is the interface included in the preset processing method. If it is the interface included in the preset processing method, it is possible to determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error-reporting task to be processed.
[0064] In one possible implementation, the first error task to be processed may be a task that the current staff does not need to pay attention to. When a preset processing method (i.e., a common method) error is identified or the interface is an interface included in the preset processing method, even if it is an initial error task, the current staff does not need to pay attention to it. The reason for not needing attention is that the preset processing method itself has an independent task, which is handled by a dedicated person in charge. When a preset processing method error is encountered or the interface is an interface included in the preset processing method, the task will automatically be marked as a preset processing method error, and the processing status can be updated to processed, and the current staff is unaware of it.
[0065] For example, Figure 3 is a schematic diagram of a package code of a preset processing method provided in an embodiment of the present application, such as Figure 3 As shown in the figure, in e-commerce testing, creating products is a frequently used process, and the implementation of creating products is encapsulated into a preset processing method at the interface level.
[0066] In an optional implementation of this embodiment, it can be determined whether to call a preset processing method based on the feedback exception mark, that is, to determine whether the execution method called by the target task is the preset processing method. The specific implementation process can be as follows:
[0067] Obtaining an execution report of the target task;
[0068] Determine a target abnormality mark for the execution failure feedback in the execution report;
[0069] In a case where the target exception mark is an exception mark corresponding to the preset processing method, it is determined that the execution method called by the target task is the preset processing method.
[0070] It should be noted that when the target task is executed, if the preset processing method is called, a specific exception mark will be returned if the execution fails. Therefore, it is possible to analyze whether the target exception mark of the execution failure feedback in the execution report of the target task is the exception mark corresponding to the preset processing method. If so, it is determined that the execution method called by the target task is the preset processing method. If not, it is determined that the execution method called by the target task is not the preset processing method.
[0071] For example, Figure 4 is a schematic diagram of a feedback abnormality mark provided by an embodiment of the present application, such as Figure 4 As shown, the code for executing the preset processing method contains an exception tag that will be thrown corresponding to this method, and an exception will be thrown when the call fails.
[0072] In the embodiment of the present application, by analyzing the target exception mark of the execution failure feedback in the execution report, it is determined whether the execution method called by the target task is the preset processing method. The determination process is simple and convenient, and the determination efficiency is high.
[0073] In an optional implementation of this embodiment, each preset processing method may be analyzed in advance to obtain the interface included therein and store it in a processing method interface database for easy query. That is, before determining whether the execution interface called by the target task is the interface included in the preset processing method, the following may also be included:
[0074] For any preset processing method, obtain the code file corresponding to the preset processing method;
[0075] Analyze the code file line by line to obtain at least one interface data corresponding to the code file, wherein each interface data includes an interface domain name and an interface path;
[0076] The at least one interface data is stored in the processing recipe interface database.
[0077] It should be noted that the execution steps of the preset processing method are executed at the interface level, that is, each step is an interface. By analyzing the file code line by line, the interface data in this preset processing method can be obtained. The interface data includes the interface domain name and interface path, and then the warehousing operation is performed and stored in the processing method interface database for subsequent query.
[0078] For example, Figure 5 is a schematic diagram of the steps of a preset processing method provided by an embodiment of the present application, such as Figure 5 As shown, the preset processing method includes 3 steps. The first step is: saving product information, the second step is: saving SKU information, and the third step is: submitting related steps for review, including steps 3_-1 to 3_1.
[0079] In an embodiment of the present application, the code files of each preset processing method can be analyzed line by line in advance to obtain the various interfaces included therein and store them in a processing method interface database. Subsequently, the processing method interface database can be directly traversed to determine whether the interface called by the target task is the interface corresponding to the preset processing method. The determination process is simple and accurate.
[0080] In an optional implementation of this embodiment, the execution report may also be analyzed to obtain the interface path, traverse the processing method interface database, and determine whether the called interface is the interface of the preset processing method, that is, determine whether the execution interface called by the target task is the interface included in the preset processing method. The specific implementation process may be as follows:
[0081] Obtaining an execution report of the target task;
[0082] Determine the target interface path of the error reported in the execution report;
[0083] The processing method interface database is traversed, and if the target interface path is matched, it is determined that the execution interface called by the target task is the interface included in the preset processing method.
[0084] In actual applications, the execution report generated by the target task running is in the form of HTML (HyperText Markup Language). The interface data of the error reporting interface can be obtained from the API (Application Programming Interface) corresponding to the execution report, that is, the target interface path of the error reporting interface can be obtained from the API corresponding to the execution report.
[0085] It should be noted that the processing method interface database stores all the interface data corresponding to each preset processing method. The interface data includes the interface path. Therefore, the execution report of the target task can be analyzed to determine the interface path of the error. By traversing the interface path of each interface data in the processing method interface database, it can be determined whether the interface called by the target task is the interface corresponding to the preset processing method. The determination process is simple and accurate.
[0086] In an optional implementation of this embodiment, if the execution interface called by the target task is not an interface included in the preset processing method, a subsequent judgment may be further performed to determine whether the target task is an error reporting task that actually needs to be processed subsequently, that is, after determining whether the execution interface called by the target task is an interface included in the preset processing method, the following may also be included:
[0087] If it is not an interface included in the preset processing method, determining whether there is an execution pass in the execution result after the acquisition time of the target task;
[0088] If there is a successful execution in the execution result after the acquisition time of the target task, the target task is marked as a processed error-reporting task.
[0089] It should be noted that if there is an execution success in the execution result after the acquisition time of the target task, it means that after the time of obtaining the execution result of the target task, one of the multiple cycles of executing the target task has been successfully executed. Therefore, it can be assumed that the error record of the target task has been processed and no subsequent attention is required, that is, the target task is marked as a processed error task at this time; if there is no such situation, it means that after the time of obtaining the execution result of the target task, multiple cycles of executing the target task have not been successfully executed, so the target task may be an error task that needs to be processed later.
[0090] In an embodiment of the present application, when it is determined that the execution interface called by the target task is not an interface included in the preset processing method, the target task is not directly determined as an error reporting task that needs to be processed subsequently, but it is further determined whether the target task will be executed successfully subsequently, thereby screening out tasks that may be executed successfully subsequently, reducing the task volume of error reporting tasks that need to be processed subsequently, and reducing the processing pressure of error reporting tasks.
[0091] In an optional implementation of this embodiment, when there is no execution pass in the execution result after the acquisition time of the target task, it is further possible to determine whether the target task is an error reporting task that really needs to be processed later in combination with the whitelist, that is, after determining whether there is an execution pass in the execution result after the acquisition time of the target task, it may also include:
[0092] If there is no execution pass in the execution result after the acquisition time of the target task, determining whether the target task is a task in a preset whitelist;
[0093] If yes, the target task is marked as a processed error reporting task;
[0094] If not, the target task is marked as the second pending error reporting task.
[0095] Specifically, the whitelist may refer to a collection of pre-set error reporting tasks that do not need to be followed up or processed. In addition, the second error reporting task to be processed represents an error reporting task that is processed differently from the first error reporting task to be processed, that is, the second error reporting task to be processed has a different processing method than the first error reporting task to be processed, so that the second error reporting task to be processed and the first error reporting task to be processed can be processed in a targeted manner using different processing methods.
[0096] For example, the first error task to be processed can be handled by a dedicated person, and the second error task to be processed can be the error task that is finally screened out and actually needs to be manually processed by current ordinary staff; the first error task to be processed can be automatically processed by a machine, and the second error task to be processed can be the error task that is finally screened out and actually needs to be manually processed by current ordinary staff.
[0097] It should be noted that a whitelist can be pre-set using a tool. If there is no execution pass in the execution results after the acquisition time of the target task, it can be further determined whether the target task is a task in the preset whitelist. If so, it means that the target task does not need further attention and processing. At this time, the target task can be marked as a processed error task; if not, it means that the target task is an error task that really needs to be processed later. Therefore, the target task can be marked as the second error task to be processed, and it can be processed later based on the processing method corresponding to the second error task to be processed.
[0098] In practical applications, different error handling marks can indicate different processing methods. Therefore, after the target task is marked for error handling, the corresponding processing method can be determined based on the error handling mark, and then the target task can be processed based on the corresponding processing method, thereby completing the processing process of the error task.
[0099] In specific implementation, a correspondence table between error processing marks and processing methods can be pre-set. Based on the correspondence table, the processing method corresponding to the error processing mark of the target task can be determined, so that the target task can be processed based on the processing method.
[0100] For example, the correspondence table between the pre-set error processing marks and processing methods is shown in Table 1 below. Assuming that the error processing mark of the target task is the second task to be processed, it can be determined that the processing method of the target task is to be processed by ordinary staff. Subsequently, the target task can be sent to the processing terminal of the ordinary staff, and the ordinary staff will process the target task.
[0101] Table 1 Correspondence between error processing marks and processing methods
[0102]
[0103]
[0104] In practical applications, error reporting tasks with the same error processing mark can be processed in batches according to corresponding processing methods, thereby improving the processing efficiency of the error reporting tasks.
[0105] The error task processing method provided in the present application can first determine whether the target task is an initial error task based on the number of failed errors in the execution result of the target task. If so, it can further determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing based on the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task. In this way, the target task can be marked for error processing based on the number of failed errors in the execution result and whether the corresponding processing method is a general method corresponding to different tasks, and can be processed subsequently through the corresponding processing method, that is, different error tasks can be automatically distinguished, and different error tasks can be processed through different processing methods. Not all error tasks need to be processed one by one in the subsequent processing, which greatly reduces the processing time of error tasks, reduces the processing pressure of error tasks, and improves the processing efficiency of error tasks.
[0106] Figure 6 A flowchart of another error reporting task processing method provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0107] Step 602: Obtain a target task, and count the number of execution failure errors in at least one execution result of the target task within a preset time period.
[0108] Step 604: when the number of error reports is greater than the number threshold, determine the target task as the initial error reporting task.
[0109] Step 606: When the number of error reports is not greater than the number threshold, determine whether there is an execution success in the at least one execution result.
[0110] Step 608: If the execution is successful, determine that the target task is not the initial error reporting task, and mark the target task as a processed error reporting task.
[0111] Step 610: If there is no execution success, determine that the target task is the initial error reporting task.
[0112] Step 612: When the target task is an initial error reporting task, determine whether the execution method called by the target task is the preset processing method.
[0113] In an optional implementation of this embodiment, it can be determined whether to call a preset processing method based on the feedback exception mark, that is, to determine whether the execution method called by the target task is the preset processing method. The specific implementation process can be as follows:
[0114] Obtaining an execution report of the target task;
[0115] Determine a target abnormality mark for the execution failure feedback in the execution report;
[0116] In a case where the target exception mark is an exception mark corresponding to the preset processing method, it is determined that the execution method called by the target task is the preset processing method.
[0117] Step 614: If it is the preset processing method, determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error reporting task to be processed.
[0118] Step 616: If it is not the preset processing method, determine whether the execution interface called by the target task is an interface included in the preset processing method.
[0119] In an optional implementation of this embodiment, each preset processing method may be analyzed in advance to obtain the interface included therein and store it in a processing method interface database for easy query. That is, before determining whether the execution interface called by the target task is the interface included in the preset processing method, the following may also be included:
[0120] For any preset processing method, obtain the code file corresponding to the preset processing method;
[0121] Analyze the code file line by line to obtain at least one interface data corresponding to the code file, wherein each interface data includes an interface domain name and an interface path;
[0122] The at least one interface data is stored in the processing recipe interface database.
[0123] In an optional implementation of this embodiment, the execution report may also be analyzed to obtain the interface path, traverse the processing method interface database, and determine whether the called interface is the interface of the preset processing method, that is, determine whether the execution interface called by the target task is the interface included in the preset processing method. The specific implementation process may be as follows:
[0124] Obtaining an execution report of the target task;
[0125] Determine the target interface path of the error reported in the execution report;
[0126] The processing method interface database is traversed, and if the target interface path is matched, it is determined that the execution interface called by the target task is the interface included in the preset processing method.
[0127] Step 618: If it is an interface included in the preset processing method, determine that the target task is a task corresponding to the preset processing method, and mark the target task as the first error reporting task to be processed.
[0128] Step 620: If it is not an interface included in the preset processing method, determine whether there is an execution pass in the execution result after the acquisition time of the target task.
[0129] Step 622: If there is a successful execution in the execution result after the acquisition time of the target task, mark the target task as a processed error task.
[0130] Step 624: If there is no execution pass in the execution results after the acquisition time of the target task, determine whether the target task is a task in a preset whitelist.
[0131] Step 626: If the target task is in the preset whitelist, the target task is marked as a processed error task.
[0132] Step 628: If the target task is not in the preset whitelist, the target task is marked as the second error-reporting task to be processed.
[0133] The error task processing method provided in the present application can first determine whether the target task is an initial error task based on the number of failed errors in the execution result of the target task. If so, it can further determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing based on the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task. In this way, the target task can be marked for error processing based on the number of failed errors in the execution result and whether the corresponding processing method is a general method corresponding to different tasks, and can be processed subsequently through the corresponding processing method, that is, different error tasks can be automatically distinguished, and different error tasks can be processed through different processing methods. Not all error tasks need to be processed one by one in the subsequent processing, which greatly reduces the processing time of error tasks, reduces the processing pressure of error tasks, and improves the processing efficiency of error tasks.
[0134] Corresponding to the above method embodiment, the present application also provides an error reporting task processing device embodiment, Figure 7 FIG. 1 is a schematic diagram showing the structure of an error reporting task processing device provided by an embodiment of the present application. Figure 7 As shown, the device comprises:
[0135] An acquisition module 702 is configured to acquire a target task;
[0136] The determination module 704 is configured to count the number of execution failure errors in at least one execution result of the target task within a preset time period, and determine whether the target task is an initial error reporting task according to the number of errors;
[0137] The marking module 706 is configured to determine whether the target task is a task corresponding to a preset processing method when the target task is an initial error reporting task, and to mark the target task for error processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task.
[0138] Optionally, the determination module 704 is further configured to:
[0139] When the number of error reports is greater than the number threshold, determining the target task as the initial error reporting task;
[0140] When the number of error reports is not greater than the number threshold, determining whether there is a case of execution passing in the at least one execution result;
[0141] If the execution is successful, determine that the target task is not the initial error reporting task, and mark the target task as a processed error reporting task;
[0142] If there is no execution success, the target task is determined to be the initial error reporting task.
[0143] Optionally, the marking module 706 is further configured to:
[0144] Determine whether the execution method called by the target task is the preset processing method;
[0145] If it is the preset processing method, determining that the target task is a task corresponding to the preset processing method, and marking the target task as the first error reporting task to be processed;
[0146] If it is not the preset processing method, determine whether the execution interface called by the target task is the interface included in the preset processing method. If it is the interface included in the preset processing method, determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error task to be processed.
[0147] Optionally, the marking module 706 is further configured to:
[0148] If it is not an interface included in the preset processing method, determining whether there is an execution pass in the execution result after the acquisition time of the target task;
[0149] If there is a successful execution in the execution result after the acquisition time of the target task, the target task is marked as a processed error-reporting task.
[0150] Optionally, the marking module 706 is further configured to:
[0151] Obtaining an execution report of the target task;
[0152] Determine a target abnormality mark for the execution failure feedback in the execution report;
[0153] In a case where the target exception mark is an exception mark corresponding to the preset processing method, it is determined that the execution method called by the target task is the preset processing method.
[0154] Optionally, the marking module 706 is further configured to:
[0155] Obtaining an execution report of the target task;
[0156] Determine the target interface path of the error reported in the execution report;
[0157] The processing method interface database is traversed, and if the target interface path is matched, it is determined that the execution interface called by the target task is the interface included in the preset processing method.
[0158] Optionally, the marking module 706 is further configured to:
[0159] For any preset processing method, obtain the code file corresponding to the preset processing method;
[0160] Analyze the code file line by line to obtain at least one interface data corresponding to the code file, wherein each interface data includes an interface domain name and an interface path;
[0161] The at least one interface data is stored in the processing recipe interface database.
[0162] Optionally, the marking module 706 is further configured to:
[0163] If there is no execution pass in the execution result after the acquisition time of the target task, determining whether the target task is a task in a preset whitelist;
[0164] If yes, the target task is marked as a processed error reporting task;
[0165] If not, the target task is marked as the second pending error reporting task.
[0166] The error task processing device provided by the present application can first determine whether the target task is an initial error task based on the number of failed errors in the execution result of the target task. If so, it can further determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing based on the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task. In this way, the target task can be marked for error processing based on the number of failed errors in the execution result and whether the corresponding processing method is a general method corresponding to different tasks, and can be processed subsequently by the corresponding processing method, that is, different error tasks can be automatically distinguished, and different error tasks can be processed by different processing methods. Not all error tasks need to be processed one by one in the subsequent processing, which greatly reduces the processing time of error tasks, reduces the processing pressure of error tasks, and improves the processing efficiency of error tasks.
[0167] The above is a schematic scheme of an error reporting task processing device of this embodiment. It should be noted that the technical scheme of the error reporting task processing device and the technical scheme of the error reporting task processing method described above belong to the same concept, and the details of the technical scheme of the error reporting task processing device that are not described in detail can all be referred to the description of the technical scheme of the error reporting task processing method described above.
[0168] Figure 8The block diagram of a computing device according to an embodiment of the present application is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and the database 850 is used to store data.
[0169] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0170] In one embodiment of the present application, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0171] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 800 may also be a mobile or stationary server.
[0172] The processor 820 is used to execute the following computer executable instructions to implement the following method:
[0173] Get the target task;
[0174] Counting the number of execution failure errors in at least one execution result of the target task within a preset time period, and determining whether the target task is an initial error reporting task according to the number of errors;
[0175] In the case where the target task is an initial error reporting task, determine whether the target task is a task corresponding to a preset processing method, and mark the target task for error processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error processing mark is used to characterize the processing method of the target task.
[0176] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned error reporting task processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned error reporting task processing method.
[0177] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, which are used to implement any step of the error reporting task processing method when executed by a processor.
[0178] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned error reporting task processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned error reporting task processing method.
[0179] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0180] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0181] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0182] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0183] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A method for processing an error reporting task, characterized in that: include: Get the target task; Counting the number of execution failure errors in at least one execution result of the target task within a preset time period, and determining whether the target task is an initial error reporting task according to the number of errors; In the case where the target task is an initial error reporting task, determining whether the target task is a task corresponding to a preset processing method, and marking the target task for error reporting processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error reporting processing mark is used to characterize the processing method of the target task; The step of determining whether the target task is a task corresponding to a preset processing method and marking the target task for error processing according to the determination result includes: Determine whether the execution method called by the target task is the preset processing method; If it is the preset processing method, determining that the target task is a task corresponding to the preset processing method, and marking the target task as the first error reporting task to be processed; If it is not the preset processing method, determine whether the execution interface called by the target task is the interface included in the preset processing method. If it is the interface included in the preset processing method, determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error task to be processed.
2. The error reporting task processing method according to claim 1, characterized in that: The determining, according to the number of error reports, whether the target task is an initial error reporting task includes: When the number of error reports is greater than the number threshold, determining the target task as the initial error reporting task; When the number of error reports is not greater than the number threshold, determining whether there is a case of execution passing in the at least one execution result; If the execution is successful, determine that the target task is not the initial error reporting task, and mark the target task as a processed error reporting task; If there is no execution success, the target task is determined to be the initial error reporting task.
3. The error reporting task processing method according to claim 1, characterized in that: After determining whether the execution interface called by the target task is the interface included in the preset processing method, the method further includes: If it is not an interface included in the preset processing method, determining whether there is an execution pass in the execution result after the acquisition time of the target task; If there is a successful execution in the execution result after the acquisition time of the target task, the target task is marked as a processed error task.
4. The error reporting task processing method according to claim 1, characterized in that: The determining whether the execution method called by the target task is the preset processing method includes: Obtaining an execution report of the target task; Determine a target abnormality mark for the execution failure feedback in the execution report; In a case where the target exception mark is an exception mark corresponding to the preset processing method, it is determined that the execution method called by the target task is the preset processing method.
5. The error reporting task processing method according to claim 1, characterized in that: The determining whether the execution interface called by the target task is an interface included in the preset processing method includes: Obtaining an execution report of the target task; Determine the target interface path of the error reported in the execution report; The processing method interface database is traversed, and if the target interface path is matched, it is determined that the execution interface called by the target task is the interface included in the preset processing method.
6. The error reporting task processing method according to claim 5, characterized in that: Before determining whether the execution interface called by the target task is the interface included in the preset processing method, the method further includes: For any preset processing method, obtain the code file corresponding to the preset processing method; Analyze the code file line by line to obtain at least one interface data corresponding to the code file, wherein each interface data includes an interface domain name and an interface path; The at least one interface data is stored in the processing recipe interface database.
7. The error reporting task processing method according to claim 4, characterized in that: After determining whether there is a case of execution passing in the execution result after the acquisition time of the target task, the method further includes: If there is no execution pass in the execution result after the acquisition time of the target task, determining whether the target task is a task in a preset whitelist; If yes, the target task is marked as a processed error reporting task; If not, the target task is marked as the second pending error reporting task.
8. An error reporting task processing device, characterized in that: include: An acquisition module, configured to acquire a target task; A determination module is configured to count the number of execution failure errors in at least one execution result of the target task within a preset time period, and determine whether the target task is an initial error reporting task according to the number of errors; a marking module, configured to determine, when the target task is an initial error reporting task, whether the target task is a task corresponding to a preset processing method, and to mark the target task for error reporting processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error reporting processing mark is used to characterize the processing method of the target task; The step of determining whether the target task is a task corresponding to a preset processing method and marking the target task for error processing according to the determination result includes: Determine whether the execution method called by the target task is the preset processing method; If it is the preset processing method, determining that the target task is a task corresponding to the preset processing method, and marking the target task as the first error reporting task to be processed; If it is not the preset processing method, determine whether the execution interface called by the target task is the interface included in the preset processing method. If it is the interface included in the preset processing method, determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error task to be processed.
9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method: Get the target task; Counting the number of execution failure errors in at least one execution result of the target task within a preset time period, and determining whether the target task is an initial error reporting task according to the number of errors; In the case where the target task is an initial error reporting task, determining whether the target task is a task corresponding to a preset processing method, and marking the target task for error reporting processing according to the determination result, wherein the preset processing method is a general method corresponding to different tasks, and the error reporting processing mark is used to characterize the processing method of the target task; The step of determining whether the target task is a task corresponding to a preset processing method and marking the target task for error processing according to the determination result includes: Determine whether the execution method called by the target task is the preset processing method; If it is the preset processing method, determining that the target task is a task corresponding to the preset processing method, and marking the target task as the first error reporting task to be processed; If it is not the preset processing method, determine whether the execution interface called by the target task is the interface included in the preset processing method. If it is the interface included in the preset processing method, determine that the target task is the task corresponding to the preset processing method, and mark the target task as the first error task to be processed.
10. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, can implement the steps of the error reporting task processing method described in any one of claims 1 to 7.
11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Application program exception handling method and device, electronic device, and storage medium
CN109542724A
Interface early warning method, system and device and storage medium
CN111274094A
Abnormity processing method and device, electronic equipment and storage medium
CN111901140A