Automatic processing method and device for code packaging exception, equipment and storage medium

By detecting the execution status of the code packaging task and executing exception handling tasks, the problem of untimely task exception handling during automated code packaging is solved, and the problem of automatic processing of code packaging tasks is realized, and the efficiency of software packaging is improved.

CN119690810APending Publication Date: 2025-03-25KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411587108.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

During the automated code packaging process, due to network or program code problems, the code packaging task cannot be processed automatically, and manual intervention is required, resulting in an increase in the time-consuming packaging task and reducing the efficiency of software packaging.

Method used

By detecting the execution status of the code packaging task, collecting task logs, determining the exception status, and marking the task based on the flags to be marked corresponding to the exception status, obtaining task triggering instructions, executing exception handling tasks, and solving the exception problem of the code packaging task.

Benefits of technology

It realizes automatic exception handling of code packaging tasks, reduces manual intervention, avoids the increase in packaging tasks caused by untimely exception handling, and improves software packaging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690810A_ABST
    Figure CN119690810A_ABST
Patent Text Reader

Abstract

The invention relates to the field of software development and financial science and technology, and particularly discloses an automatic processing method and device for code packaging exception, equipment and a storage medium. When it is detected that the code packaging task starts to be executed, task logs corresponding to the code packaging task are collected, and the execution state of the code packaging task is obtained; in the abnormal state, a mark to be marked is determined, and the code packaging task is marked based on the mark to be marked; and obtaining a task triggering instruction corresponding to the to-be-marked mark, executing the exception handling task to process the code packaging task, and solving the exception problem of the code packaging task. According to the method, when the code packaging task is in the abnormal state, the code packaging task can be marked, the task triggering instruction is determined according to the mark, and the exception handling task is executed, so that the exception problem of the code packaging task is automatically handled, manual intervention is not needed, and the increase of time consumption of the packaging task caused by untimely exception handling is avoided; and the software packaging efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of software development and financial technology, and in particular to a method, device, equipment and storage medium for automatically processing code packaging anomalies. Background Art

[0002] With the development of computer technology, more and more financial application software is applied to the financial field. Financial application software is used as a platform for product transactions between financial enterprises and customers, which facilitates financial enterprises to market financial products to users and facilitates users to purchase financial products. In the process of developing and updating application software, the code needs to be packaged and released. In order to improve the release efficiency, automatic packaging is usually selected. However, during the automatic packaging process, due to network, program code problems, and the npm (Node Package Manager, Node.js package manager) tool itself, it will be stuck and unable to complete the packaging. It is necessary to manually access the stop task and re-trigger the process. The packaging exception problem cannot be automatically handled, resulting in an increase in the time consumption of the packaging task and a reduction in the efficiency of software packaging. Therefore, how to realize the automated processing of code packaging exceptions and improve the efficiency of software packaging has become an urgent problem to be solved. Summary of the invention

[0003] The present application provides a method, device, equipment and storage medium for automatically processing code packaging exceptions, so as to realize automatic processing of code packaging exceptions and improve software packaging efficiency.

[0004] In a first aspect, the present application provides a method for automatically processing code packaging exceptions, the method comprising:

[0005] When it is detected that the code packaging task starts to be executed, a task log corresponding to the code packaging task is collected, and based on the task log, an execution status of the code packaging task is obtained;

[0006] When the execution state is an abnormal state, determining a to-be-marked flag corresponding to the abnormal state, and marking the code packaging task based on the to-be-marked flag;

[0007] A task triggering instruction corresponding to the flag to be marked is obtained, and based on the task triggering instruction, an exception handling task is executed to process the code packaging task and solve the exception problem of the code packaging task.

[0008] In a second aspect, the present application further provides an automatic processing device for code packaging exceptions, the device comprising:

[0009] A status acquisition module is used to collect the task log corresponding to the code packaging task when detecting that the code packaging task starts to be executed, and obtain the execution status of the code packaging task based on the task log;

[0010] A task marking module, used for determining a to-be-marked flag corresponding to the abnormal state when the execution state is an abnormal state, and marking the code packaging task based on the to-be-marked flag;

[0011] The exception handling module is used to obtain the task triggering instruction corresponding to the flag to be marked, and execute the exception handling task based on the task triggering instruction to process the code packaging task and solve the exception problem of the code packaging task.

[0012] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the automatic processing method of code packaging exceptions as described above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the automatic processing method of code packaging exceptions as described above.

[0014] The present application discloses a method, device, equipment and storage medium for automatically processing code packaging exceptions. When a code packaging task is detected to start execution, the task log corresponding to the code packaging task is collected, and the execution status of the code packaging task is obtained based on the task log; when the execution status is an abnormal state, the to-be-marked flag corresponding to the abnormal state is determined, and the code packaging task is marked based on the to-be-marked flag; the task trigger instruction corresponding to the to-be-marked flag is obtained, and based on the task trigger instruction, the exception handling task is executed to process the code packaging task and solve the abnormal problem of the code packaging task. The present application can mark the code packaging task when the code packaging task is in an abnormal state, determine the task trigger instruction according to the mark, and execute the exception handling task, so as to realize the automatic processing of the abnormal problem of the code packaging task, without manual intervention, avoiding the increase in the time consumption of the packaging task caused by the untimely exception handling, and improving the software packaging efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 This is a schematic flow chart of a first embodiment of a method for automatically processing code packaging exceptions provided by an embodiment of the present application;

[0017] Figure 2 This is a schematic flow chart of a second embodiment of a method for automatically processing code packaging exceptions provided in an embodiment of the present application;

[0018] Figure 3 This is a schematic flow chart of a third embodiment of a method for automatically processing code packaging exceptions provided by an embodiment of the present application;

[0019] Figure 4 A schematic block diagram of an automatic processing device for code packaging exceptions provided in an embodiment of the present application;

[0020] Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0023] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0024] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0025] The embodiments of the present application provide a method, device, equipment and storage medium for automatically processing code packaging exceptions. Among them, the method for automatically processing code packaging exceptions can be applied to a server. When a code packaging task is in an abnormal state, the code packaging task is marked, and the task trigger instruction is determined according to the mark, and the exception handling task is executed, so as to realize the automatic processing of the abnormal problems of the code packaging task without manual intervention, avoid the increase in the time consumption of the packaging task caused by the untimely exception handling, and improve the software packaging efficiency. Among them, the server can be an independent server or a server cluster.

[0026] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0027] See also Figure 1 , Figure 1 This is a schematic flow chart of an automated method for handling code packaging exceptions provided by an embodiment of the present application. The automated method for handling code packaging exceptions can be applied to a server, and is used to mark a code packaging task when the code packaging task is in an abnormal state, and determine a task trigger instruction based on the mark, and execute an exception handling task, thereby realizing automated handling of exception problems of code packaging tasks without manual intervention, avoiding the increase in packaging task time caused by untimely exception handling, and improving software packaging efficiency.

[0028] like Figure 1 As shown, the automatic processing method for code packaging exception specifically includes steps S101 to S103.

[0029] S101. When it is detected that a code packaging task starts to be executed, a task log corresponding to the code packaging task is collected, and based on the task log, an execution status of the code packaging task is obtained;

[0030] In one embodiment, each task is a record from a database, and a task log is generated when a task is performed on a piece of data.

[0031] In one embodiment, when the code packaging task starts to execute, the task logs related to the code packaging task are collected. Based on the collected logs, the execution status of the task is analyzed and obtained.

[0032] In one embodiment, a task queue or task scheduling system is monitored to detect the start event of the code packaging task. When the task is detected to be started, the log collector can be notified to start collecting logs through an internal message queue or a callback function. Specifically, each task has a unique task identifier for tracking and managing the entire life cycle of the task. According to the task identifier, the log file or log stream generated when the task is executed is located. The log content is read in real time, and the read log content is stored in a pre-set storage location, such as a central log database, a file server, or a log analysis platform.

[0033] In one embodiment, the log content is parsed into structured data, and the parsed task log is analyzed to determine the execution status of the code packaging task.

[0034] S102: when the execution state is an abnormal state, determining a to-be-marked flag corresponding to the abnormal state, and marking the code packaging task based on the to-be-marked flag;

[0035] In one embodiment, when the execution state is abnormal, further abnormal analysis is performed on the task log to determine at least one abnormal problem that causes the code packaging task to be in an abnormal state. A flag corresponding to each abnormal problem is obtained as a flag to be marked corresponding to the abnormal state.

[0036] In one embodiment, the code packaging task is marked in a task management system, an issue tracking system, or a code repository. Exemplarily, in a task management interface, tasks of different priorities and issue types are displayed in different colors or labels for quick identification and processing.

[0037] S103, obtaining a task triggering instruction corresponding to the flag to be marked, and executing an exception handling task based on the task triggering instruction to process the code packaging task and solve the exception problem of the code packaging task.

[0038] In one embodiment, each flag to be marked has a corresponding task trigger instruction, and the correspondence between the flag to be marked and the task trigger instruction can be stored in a mapping relationship table. According to the flag to be marked of the task, the corresponding task trigger instruction is retrieved from the mapping relationship table.

[0039] In one embodiment, based on the task triggering instruction, an exception handling task is triggered and executed. The exception handling task can solve or alleviate the exception problem of the code packaging task.

[0040] Furthermore, the obtaining of the task triggering instruction corresponding to the flag to be marked, and based on the task triggering instruction, executing the exception handling task to process the code packaging task and solve the exception problem of the code packaging task, also includes: obtaining historical exception handling records, and based on the exception handling records, obtaining the exception handling steps corresponding to each flag; based on the exception handling steps, generating the exception handling task corresponding to the flag and the task triggering instruction of the exception handling task.

[0041] In one embodiment, a database or log management system is queried to retrieve historical exception handling records related to a specific flag to be marked. Useful historical records can be screened out based on time range, flag type, or other relevant conditions.

[0042] In one embodiment, the processing steps of the exception handling event corresponding to each flag are extracted from the historical records, such as error detection, problem diagnosis, specific operations performed, etc. An exception handling step library is established for each flag.

[0043] In one embodiment, based on the analyzed exception handling steps, the specific content and objectives of the exception handling task are defined. A task trigger instruction is created for each exception handling task, which can be a script, API call, workflow trigger, or other form of automated command. The task trigger instructions are tested in a safe environment to ensure that they can be executed correctly and achieve the expected processing effect.

[0044] In one embodiment, the generated exception handling task and task triggering instruction are stored in a task management system so as to be quickly called when the same flag is detected.

[0045] In the above embodiment, the corresponding exception handling step can be found in the exception handling step library according to the flag, an exception handling task can be generated, and the corresponding exception handling task can be automatically executed when the code packaging task is in an abnormal state to solve the exception problem. The exception handling task can be systematically managed and optimized, the automation level of exception handling can be improved, manual intervention can be reduced, and the efficiency of exception handling can be improved.

[0046] Furthermore, the task triggering instruction corresponding to the flag to be marked is obtained, and based on the task triggering instruction, an exception handling task is executed to process the code packaging task and solve the exception problem of the code packaging task. It also includes: when the exception handling task fails to execute, failure information of the exception handling task is obtained; based on the failure information and the exception problem, a task exception prompt is generated to remind the user to handle the exception problem.

[0047] In one embodiment, when the exception handling task fails to execute, a detailed error log is recorded. Specifically, by monitoring the execution state of the exception handling task, when a failure is detected, the failure information is immediately captured, including error code, error message, stack trace, etc.

[0048] In one embodiment, the failure information is analyzed to obtain possible reasons for the failure. Based on the failure information, possible reasons and the abnormal problems of the code packaging task, the content of the abnormal prompt is formulated, including the abnormal problems of the code packaging task and the abnormal handling tasks performed on the abnormal problems, as well as the failure information, error description, possible impact, etc. of the abnormal handling tasks.

[0049] In one embodiment, the prompt levels may also be divided according to the severity and urgency of the error, such as warning, severe warning, etc.

[0050] In one embodiment, a task exception prompt is sent to the user according to a notification method preset by the user, such as email, text message, in-application notification, etc., to ensure that the user can receive the exception prompt in time.

[0051] This process ensures that when an exception handling task fails, users can obtain necessary information in a timely manner and take appropriate measures to solve the problem, thereby improving the stability and reliability of the system.

[0052] Furthermore, the task triggering instruction corresponding to the flag to be marked is obtained, and based on the task triggering instruction, an exception handling task is executed to process the code packaging task and solve the exception problem of the code packaging task. It also includes: when the exception handling task is executed successfully, the current status of the code packaging task is updated, and based on the exception problem and the current status, task status prompt information is generated for user viewing.

[0053] In one embodiment, after the exception handling task is successfully executed, the state of the code packaging task is updated. Specifically, the state of the code packaging task can be updated to "recovered", "processed successfully" or similar states in the task management database or system to reflect that the exception has been resolved.

[0054] In one embodiment, task status prompt information is generated based on the abnormal problem and the current status, and the task status prompt information is displayed to the user.

[0055] In one embodiment, based on the abnormal problem and the current status, the content of the task status prompt information is formulated, which may include a description of the abnormal problem, measures taken, processing results, etc.

[0056] In one embodiment, the task status information is updated in the user interface to ensure that the user can see the latest task status and prompt information. The task status update and prompt information can also be sent to relevant users, such as developers, project managers, etc., through emails, text messages, in-app notifications, etc. This ensures that after the exception handling task is successfully executed, the user can obtain the task status update and prompt information in a timely manner.

[0057] The above embodiment provides a method, device, equipment and storage medium for automatically processing code packaging exceptions. When it is detected that a code packaging task starts to execute, the task log corresponding to the code packaging task is collected, and based on the task log, the execution status of the code packaging task is obtained; when the execution status is an abnormal state, the to-be-marked flag corresponding to the abnormal state is determined, and based on the to-be-marked flag, the code packaging task is marked; the task trigger instruction corresponding to the to-be-marked flag is obtained, and based on the task trigger instruction, the exception handling task is executed to process the code packaging task and solve the abnormal problem of the code packaging task. The present application can mark the code packaging task when the code packaging task is in an abnormal state, determine the task trigger instruction according to the mark, and execute the exception handling task, thereby realizing the automatic processing of the abnormal problem of the code packaging task without manual intervention, avoiding the increase in the time consumption of the packaging task caused by untimely exception handling, and improving the efficiency of software packaging.

[0058] See also Figure 2 , Figure 2 This is a schematic flow chart of an automated method for handling code packaging anomalies provided by an embodiment of the present application. The automated method for handling code packaging anomalies can be applied to a server, and by analyzing the log information of the code packaging task, the execution status of the code packaging task is determined, and automated detection is implemented to detect the execution status of the code packaging task in a timely manner, so as to quickly respond to and solve the abnormal problems of the code packaging task and improve the efficiency of software packaging.

[0059] like Figure 2 As shown, step S101 of the method for automatically processing code packaging exceptions specifically includes steps S201 to S202.

[0060] S201, based on a preset keyword list, performing keyword detection on the task log to determine whether there are keywords in the keyword list in the task log;

[0061] S202: When a keyword in the keyword list exists in the task log, determine that the execution state is an abnormal state.

[0062] In one embodiment, it is detected whether the task log contains any one or more keywords in a preset keyword list to determine whether the task is abnormal. Specifically, a predefined list containing multiple keywords is first obtained, and the keywords are usually associated with errors, exceptions, or failures. For example, the keyword list may include "error", "Err", "Fail", "failure", "timeout", "No response", etc. The obtained log data is parsed into a searchable text format, and the parsed log text is searched to check whether it contains any keyword in the keyword list.

[0063] In one embodiment, if any one or more keywords in the keyword list exist in the task log, it is determined that the execution status of the task is an abnormal state.

[0064] For example, when the keyword "error" is detected in the task log, the execution state of the code packaging task is determined to be an abnormal state, and the stop flag is used as a flag to be marked. The code packaging task is marked with a stop flag, and when the collector that performs the stop operation detects the stop flag, the stop task is executed to close the running code packaging task process.

[0065] Furthermore, the step S101 also includes: based on the task log, obtaining the latest update time and the current time of the log, and based on the latest update time and the current time of the log, obtaining the time for waiting for the log update; comparing the time with a preset update time threshold; when the time is greater than the update time threshold, determining that the execution status is an abnormal state.

[0066] In one embodiment, the latest update time of the task log is obtained from the log management system or the log file. Specifically, the latest update time of the log can be obtained through the API interface of the log management system or by directly reading the metadata of the log file. The latest update time indicates the time when the log was last written or modified.

[0067] In one embodiment, the current system time is obtained as the current time. Based on the latest update time of the log and the current time, the length of time to wait for the log to be updated is calculated.

[0068] In one embodiment, the calculated waiting time is compared with a preset update time threshold. If the waiting time exceeds the preset update time threshold, the execution state of the task is determined to be abnormal. The update time threshold can be freely set by the user according to actual needs.

[0069] In the above embodiment, the execution status of the code packaging task can be determined by analyzing the log information of the code packaging task, and automatic detection can be implemented to detect the execution status of the code packaging task in time, so as to quickly respond to and solve abnormal problems in the code packaging task and improve software packaging efficiency.

[0070] See also Figure 3 , Figure 3 This is a schematic flow chart of an automated method for handling code packaging anomalies provided by an embodiment of the present application. The automated method for handling code packaging anomalies can be applied to a server to sort abnormal problems according to problem types and priority rules. According to the priority sorting results, resource allocation can be optimized and important problems can be solved first, thereby improving the efficiency of solving abnormal problems and thus improving software packaging efficiency.

[0071] like Figure 3 As shown, the automatic processing method for code packaging exception specifically includes steps S301 to S304.

[0072] S301, when the execution state is an abnormal state, performing an abnormal analysis on the task log to obtain at least one abnormal problem of the code packaging task;

[0073] S302, classifying at least one of the abnormal problems, obtaining a problem type corresponding to each abnormal problem, and determining the flag to be marked based on the problem type;

[0074] S303, based on the preset priority rule and the problem type, the abnormal problems are prioritized, at least one priority ranking result of the abnormal problem is obtained, and the marking order of the flags to be marked is determined based on the priority ranking result;

[0075] S304: Mark the code packaging task based on the to-be-marked flag and the marking order.

[0076] In one embodiment, the log of the abnormal task is deeply analyzed to collect all information related to the abnormality, including error messages, stack traces, log entries, environment variables, etc. All information related to the abnormality is analyzed using log analysis tools, static code analysis tools, or dynamic analysis tools to identify the abnormal problem.

[0077] In one embodiment, according to the nature of the abnormal problem, the problem is classified into different types, such as compilation error, runtime error, performance problem, etc. The flag to be marked corresponding to each problem type is obtained, and the problem type and the corresponding flag to be marked of each abnormal problem are recorded. The corresponding relationship between the problem type of the abnormal problem and the flag to be marked can be set by the user according to actual needs.

[0078] In one embodiment, the priority rule is used to determine the priority of abnormal problems according to the problem type, and can be set by the user according to actual needs.

[0079] In one embodiment, all abnormal problems are sorted according to a preset priority rule to determine the priority of each problem. Based on the priority sorting result, the marking order of the flags to be marked is determined, and high-priority problems are processed first. The priority sorting result and marking order of each abnormal problem are recorded.

[0080] In one embodiment, tasks are marked in a task tracking system or project management tool according to the flags to be marked and the marking order. Specifically, in the task management interface, tasks of different priorities and problem types are displayed with different colors or labels for quick identification and processing.

[0081] In the above embodiment, abnormal problems can be sorted according to problem types and priority rules. According to the priority sorting results, resource allocation can be optimized and important problems can be solved first, thereby improving the efficiency of solving abnormal problems and further improving the efficiency of software packaging.

[0082] See also Figure 4 , Figure 4 The embodiment of the present application provides a schematic block diagram of an automatic processing device for code packaging exceptions, and the automatic processing device for code packaging exceptions is used to execute the automatic processing method for code packaging exceptions described above. The automatic processing device for code packaging exceptions can be configured on a server.

[0083] like Figure 4 As shown, the automatic processing device 400 for code packaging exceptions includes:

[0084] The status acquisition module 401 is used to collect the task log corresponding to the code packaging task when detecting that the code packaging task starts to be executed, and obtain the execution status of the code packaging task based on the task log;

[0085] The task marking module 402 is used to determine a to-be-marked flag corresponding to the abnormal state when the execution state is an abnormal state, and mark the code packaging task based on the to-be-marked flag;

[0086] The exception handling module 403 is used to obtain the task triggering instruction corresponding to the flag to be marked, and execute the exception handling task based on the task triggering instruction to process the code packaging task and solve the exception problem of the code packaging task.

[0087] Furthermore, the state acquisition module 401 includes:

[0088] A keyword detection unit, configured to perform keyword detection on the task log based on a preset keyword list, and determine whether a keyword in the keyword list exists in the task log;

[0089] The abnormal state determining unit is used to determine that the execution state is an abnormal state when a keyword in the keyword list exists in the task log.

[0090] Furthermore, the state acquisition module 401 further includes:

[0091] A duration obtaining unit, used to obtain the latest log update time and the current time based on the task log, and obtain the duration of waiting for log update based on the latest log update time and the current time;

[0092] A duration comparison unit, used to compare the duration with a preset update duration threshold;

[0093] The abnormal state determining unit is used to determine that the execution state is an abnormal state when the duration is greater than the update duration threshold.

[0094] Furthermore, the task marking module 402 includes:

[0095] an abnormal problem obtaining unit, configured to perform abnormal analysis on the task log when the execution state is an abnormal state, and obtain at least one abnormal problem of the code packaging task;

[0096] a flag determination unit, configured to classify at least one of the abnormal problems, obtain a problem type corresponding to each abnormal problem, and determine the flag to be marked based on the problem type;

[0097] An order determination unit, configured to prioritize the abnormal problems based on a preset priority rule and the problem type, obtain a priority ranking result of at least one of the abnormal problems, and determine a marking order of the flags to be marked based on the priority ranking result;

[0098] A flag marking unit is used to mark the code packaging task based on the flag to be marked and the marking order.

[0099] Furthermore, the automatic processing device 400 for code packaging exceptions further includes an exception processing task generation module, and the exception processing task generation module includes:

[0100] An exception handling step obtaining unit is used to obtain historical exception handling records, and based on the exception handling records, obtain the exception handling steps corresponding to each flag;

[0101] The task trigger instruction generating unit is used to generate the exception handling task corresponding to the flag and the task trigger instruction of the exception handling task based on the exception handling step.

[0102] Furthermore, the automatic processing device 400 for code packaging exceptions further includes a task exception prompt generation module, and the task exception prompt generation unit includes:

[0103] A failure information acquisition unit, used to acquire failure information of the exception handling task when the execution of the exception handling task fails;

[0104] The abnormal prompt generating unit is used to generate a task abnormal prompt based on the failure information and the abnormal problem, so as to remind the user to deal with the abnormal problem.

[0105] Furthermore, the automatic processing device 400 for code packaging exceptions further includes:

[0106] The status prompt information generating module is used to update the current status of the code packaging task when the exception handling task is successfully executed, and generate task status prompt information based on the exception problem and the current status for the user to view.

[0107] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0108] The above-mentioned device can be implemented in the form of a computer program. Figure 5 Runs on the computer device shown.

[0109] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0110] See also Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0111] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any automatic processing method for code packaging exceptions.

[0112] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0113] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any automatic processing method for code packaging exceptions.

[0114] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0115] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0116] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0117] When it is detected that the code packaging task starts to be executed, a task log corresponding to the code packaging task is collected, and based on the task log, an execution status of the code packaging task is obtained;

[0118] When the execution state is an abnormal state, determining a to-be-marked flag corresponding to the abnormal state, and marking the code packaging task based on the to-be-marked flag;

[0119] A task triggering instruction corresponding to the flag to be marked is obtained, and based on the task triggering instruction, an exception handling task is executed to process the code packaging task and solve the exception problem of the code packaging task.

[0120] In one embodiment, when the processor obtains the execution status of the code packaging task based on the task log, it is used to implement:

[0121] Based on a preset keyword list, performing keyword detection on the task log to determine whether the task log contains keywords in the keyword list;

[0122] When a keyword in the keyword list exists in the task log, it is determined that the execution state is an abnormal state.

[0123] In one embodiment, the processor is further used to implement, based on the task log, obtaining the execution status of the code packaging task:

[0124] Based on the task log, obtain the latest log update time and the current time, and based on the latest log update time and the current time, obtain the time length for waiting for log update;

[0125] Comparing the duration with a preset update duration threshold;

[0126] When the duration is greater than the update duration threshold, it is determined that the execution state is an abnormal state.

[0127] In one embodiment, when the processor determines a to-be-marked flag corresponding to the abnormal state when the execution state is an abnormal state, and marks the code packaging task based on the to-be-marked flag, it is used to implement:

[0128] When the execution state is an abnormal state, performing an abnormal analysis on the task log to obtain at least one abnormal problem of the code packaging task;

[0129] Classifying at least one of the abnormal problems, obtaining a problem type corresponding to each abnormal problem, and determining the flag to be marked based on the problem type;

[0130] Based on a preset priority rule and the problem type, the abnormal problems are prioritized to obtain a priority ranking result of at least one of the abnormal problems, and the marking order of the flags to be marked is determined based on the priority ranking result;

[0131] The code packaging task is marked based on the to-be-marked flag and the marking order.

[0132] In one embodiment, before the processor implements obtaining the task trigger instruction corresponding to the flag to be marked and executing the exception handling task based on the task trigger instruction to process the code packaging task and solve the exception problem of the code packaging task, it is also used to implement:

[0133] Obtain historical exception handling records, and based on the exception handling records, obtain the exception handling steps corresponding to each flag;

[0134] Based on the exception handling step, an exception handling task corresponding to the flag and a task triggering instruction of the exception handling task are generated.

[0135] In one embodiment, after the processor implements obtaining the task trigger instruction corresponding to the flag to be marked and executing the exception handling task based on the task trigger instruction to process the code packaging task and solve the exception problem of the code packaging task, it is also used to implement:

[0136] When the exception handling task fails to execute, obtaining failure information of the exception handling task;

[0137] Based on the failure information and the abnormal problem, a task abnormality prompt is generated to remind the user to handle the abnormal problem.

[0138] In one embodiment, after the processor implements obtaining the task trigger instruction corresponding to the flag to be marked and executing the exception handling task based on the task trigger instruction to process the code packaging task and solve the exception problem of the code packaging task, it is also used to implement:

[0139] When the exception handling task is successfully executed, the current state of the code packaging task is updated, and based on the exception problem and the current state, task state prompt information is generated for the user to view.

[0140] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any of the automated processing methods for code packaging exceptions provided in the embodiments of the present application.

[0141] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Medi a Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card), etc., equipped on the computer device.

[0142] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for automatically processing code packaging exceptions, characterized in that: include: When it is detected that the code packaging task starts to be executed, a task log corresponding to the code packaging task is collected, and based on the task log, an execution status of the code packaging task is obtained; When the execution state is an abnormal state, determining a to-be-marked flag corresponding to the abnormal state, and marking the code packaging task based on the to-be-marked flag; A task triggering instruction corresponding to the flag to be marked is obtained, and based on the task triggering instruction, an exception handling task is executed to process the code packaging task and solve the exception problem of the code packaging task.

2. The method for automatically processing code packaging exceptions according to claim 1, characterized in that: The obtaining the execution status of the code packaging task based on the task log includes: Based on a preset keyword list, performing keyword detection on the task log to determine whether the task log contains keywords in the keyword list; When a keyword in the keyword list exists in the task log, it is determined that the execution state is an abnormal state.

3. The method for automatically processing code packaging exceptions according to claim 1, characterized in that: The step of obtaining the execution status of the code packaging task based on the task log further includes: Based on the task log, obtain the latest log update time and the current time, and based on the latest log update time and the current time, obtain the time length for waiting for log update; Comparing the duration with a preset update duration threshold; When the duration is greater than the update duration threshold, it is determined that the execution state is an abnormal state.

4. The method for automatically processing code packaging exceptions according to claim 1, characterized in that: When the execution state is an abnormal state, determining a to-be-marked flag corresponding to the abnormal state, and marking the code packaging task based on the to-be-marked flag, includes: When the execution state is an abnormal state, performing an abnormal analysis on the task log to obtain at least one abnormal problem of the code packaging task; Classifying at least one of the abnormal problems, obtaining a problem type corresponding to each abnormal problem, and determining the flag to be marked based on the problem type; Based on a preset priority rule and the problem type, the abnormal problems are prioritized to obtain a priority ranking result of at least one of the abnormal problems, and the marking order of the flags to be marked is determined based on the priority ranking result; The code packaging task is marked based on the to-be-marked flag and the marking order.

5. The method for automatically processing code packaging exceptions according to claim 1, characterized in that: The method further includes: obtaining a task trigger instruction corresponding to the flag to be marked, and executing an exception handling task based on the task trigger instruction to process the code packaging task and solve the exception problem of the code packaging task. Obtain historical exception handling records, and based on the exception handling records, obtain the exception handling steps corresponding to each flag; Based on the exception handling step, an exception handling task corresponding to the flag and a task triggering instruction of the exception handling task are generated.

6. The method for automatically processing code packaging exceptions according to claim 1, characterized in that: The method further comprises: obtaining a task trigger instruction corresponding to the flag to be marked, and executing an exception handling task based on the task trigger instruction to process the code packaging task and solve the exception problem of the code packaging task. When the exception handling task fails to execute, obtaining failure information of the exception handling task; Based on the failure information and the abnormal problem, a task abnormality prompt is generated to remind the user to handle the abnormal problem.

7. The method for automatically processing code packaging exceptions according to any one of claims 1 to 6, characterized in that: The method further comprises: obtaining a task trigger instruction corresponding to the flag to be marked, and executing an exception handling task based on the task trigger instruction to process the code packaging task and solve the exception problem of the code packaging task. When the exception handling task is successfully executed, the current state of the code packaging task is updated, and based on the exception problem and the current state, task state prompt information is generated for the user to view.

8. An automatic processing device for code packaging exceptions, characterized in that: include: A status acquisition module is used to collect the task log corresponding to the code packaging task when detecting that the code packaging task starts to be executed, and obtain the execution status of the code packaging task based on the task log; A task marking module, used for determining a to-be-marked flag corresponding to the abnormal state when the execution state is an abnormal state, and marking the code packaging task based on the to-be-marked flag; The exception handling module is used to obtain the task triggering instruction corresponding to the flag to be marked, and execute the exception handling task based on the task triggering instruction to process the code packaging task and solve the exception problem of the code packaging task.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the automatic processing method for code packaging exceptions according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the automatic processing method for code packaging exceptions according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cloud continuous integration alarm processing method, server and storage medium

    CN113541978A

  • CocoPods-based packaging task processing method and apparatus, and electronic device

    CN114691341A

  • Enforcing the execution exception to prevent packers from evading the scanning of dynamically created code

    US8510828B1