Abnormal log attribution method, device, equipment, storage medium and product

By using an automated method for attributing exception logs, and by identifying the responsible party based on key stack traces and preset keywords, the problem of low efficiency in attributing exception logs in iOS applications is solved, resulting in more efficient maintenance.

CN119599010BActive Publication Date: 2025-10-28CHINA MERCHANTS BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411502136.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-10-28
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

In iOS applications developed collaboratively by multiple teams, existing technologies rely on developers' experience to determine the attribution of exception logs, which is inefficient and inaccurate, resulting in low maintenance efficiency.

Method used

After receiving an anomaly signal, the system obtains the anomaly log to be assigned, examines and extracts key stack traces, and automatically determines the responsible party using preset attribution keywords, thus achieving automatic attribution of the anomaly log.

Benefits of technology

This improves the efficiency and accuracy of exception log attribution, thereby improving the maintenance efficiency of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599010B_ABST
    Figure CN119599010B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, storage medium, and product for assigning anomaly logs, relating to the field of computer technology. The anomaly log assignment method includes: upon receiving an anomaly signal, acquiring an anomaly log to be assigned; inspecting the anomaly log to be assigned and extracting corresponding key stack trace content; extracting target keywords from the key stack trace content; comparing the target keywords with preset assignment keywords to determine the responsible party for the anomaly log to be assigned. This application employs keyword extraction from the anomaly log to be assigned. When an anomaly log to be assigned is acquired, the responsible party for the anomaly log to be assigned is determined by identifying the keywords of the anomaly log and the preset assignment keywords, thereby achieving automatic assignment of anomaly logs, improving the efficiency of anomaly log assignment, and thus significantly improving maintenance efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to methods, apparatus, devices, storage media, and products for attributing exception logs. Background Technology

[0002] As applications become increasingly complex, multi-team collaborative development has become the norm. In such environments, each team is responsible for different functional modules, which brings challenges in coordination and communication. This is especially true in iOS development, where handling exceptions becomes particularly complex due to its unique development environment and language selection. Therefore, when an application crashes or freezes, quickly locating the problem and assigning it to the appropriate team for resolution is crucial.

[0003] The current practice relies on developers' experience and familiarity with the code to manually determine the origin of exception logs. However, this method is not only inefficient but also difficult to guarantee accuracy, resulting in low application maintenance efficiency.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a method, apparatus, device, storage medium, and product for attributing exception logs, which aims to solve the technical problem of low maintenance efficiency of application programs.

[0006] To achieve the above objectives, this application proposes an anomaly log attribution method, the method comprising:

[0007] Upon receiving an anomaly signal, retrieve the anomaly log to be assigned.

[0008] Examine the anomaly log to be assigned and extract the corresponding key stack trace content;

[0009] Extract the target keywords from the key stack content, compare the target keywords with preset attribution keywords, and determine the responsible party for the anomaly log to be attributed.

[0010] In one embodiment, the step of inspecting the anomaly log to be attributed and extracting the corresponding key stack trace content includes:

[0011] Check the category of the anomaly log to be assigned;

[0012] If the exception log to be assigned is a crash type log and contains the last exception backtracking identifier, then the stack trace content corresponding to the last exception backtracking identifier is extracted as the key stack content.

[0013] If the exception log to be assigned is the crash type log and does not contain the last exception backtracking identifier, then check whether the exception log to be assigned contains a crash thread identifier. If it contains the crash thread identifier, then extract the stack portion content corresponding to the crash thread identifier as the critical stack content.

[0014] If the exception log to be assigned is a stuttering type log, then the main thread stack portion is extracted as the key stack information.

[0015] In one embodiment, the step of extracting the target keywords from the key stack content includes:

[0016] Search the namespace of the key stack information to determine if an application identifier exists;

[0017] If the namespace contains an application identifier and the method call space of the log to be assigned contains a first category symbol, then the target keywords are extracted according to the first extraction scheme corresponding to the first category symbol.

[0018] If the namespace contains an application identifier and the method call space does not contain the first category symbol but contains a second category symbol, then the key stack information is extracted according to the second extraction scheme corresponding to the second category symbol to obtain the first stack extraction content. If the first stack extraction content does not contain the third category symbol, then the first stack extraction content is the target keyword; otherwise, the target keyword is extracted according to the third extraction scheme corresponding to the third category symbol.

[0019] If the namespace contains an application identifier and the method call space does not contain the first category symbol and the second category symbol, then the target keyword is extracted according to the preset fourth extraction scheme;

[0020] If the namespace does not contain an application identifier and contains a preset second attribution keyword, then the target keyword is extracted according to the preset fifth extraction scheme;

[0021] If the application identifier is not present in the key stack information, the exception log to be assigned does not contain the last exception backtracking identifier, and does not contain the attribution keyword, then the target keyword is extracted according to the preset sixth extraction scheme.

[0022] If the key stack information does not contain an application identifier, and the exception log to be assigned contains the last exception backtracking identifier but does not contain application-specific information, then the target keyword is extracted according to the sixth extraction scheme.

[0023] If the critical stack information does not contain an application identifier, and the pending exception log contains the last exception backtracking identifier and the application-specific information, then the next line of the application-specific information is searched to see if it contains a cause identifier. If it contains the cause identifier, the target keyword is extracted according to the preset seventh extraction scheme. If it does not contain the cause identifier, the target keyword is extracted according to the preset eighth extraction scheme.

[0024] In one embodiment, the step of extracting target keywords from the key stack trace content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed includes:

[0025] When the critical stack information is extracted from the crash-type pending exception log, each line of the critical stack information is retrieved;

[0026] If the current row contains the preset filter keyword, then jump to the next row for retrieval; otherwise, check if the application identifier exists in the current row.

[0027] If the current line contains the application identifier, then the target keyword is determined according to the classification symbol type. The prefix words of the target keyword are compared with the preset first attribution keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first attribution keyword. If they are different, it is determined whether the target keyword contains the second attribution keyword. If it does, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second attribution keyword. Otherwise, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the main project.

[0028] If the current line does not contain the application identifier, then determine whether the current line contains the second attribution keyword. If it does, then determine that the responsible party for the pending exception log is the team corresponding to the second attribution keyword. If it does not contain the second attribution keyword, and the pending exception log does not contain the last exception backtracking identifier, and the current line is the last line of the critical stack information, then determine that the responsible party for the pending exception log is the team corresponding to the public crash. Otherwise, confirm whether the pending exception log contains the application-specific information.

[0029] If the anomaly log to be assigned does not contain the application-specific information, then the target keyword is extracted according to the sixth extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the public crash response team.

[0030] If the anomaly log to be assigned contains the application-specific information, then the next line is extracted as the target keyword. It is then determined whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first attribution keyword. If they are different, it is then determined whether the target keyword contains the second attribution keyword. If they are, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second attribution keyword. Otherwise, it is searched to see if the next line of the application-specific information contains a cause identifier. If the cause identifier is contained, then the target keyword is extracted according to the preset seventh extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the public crash. If the cause identifier is not contained, then the target keyword is extracted according to the preset eighth extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the public crash.

[0031] In one embodiment, the step of extracting target keywords from the key stack trace content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed includes:

[0032] When the key stack information is extracted from the main thread stack portion of the pending exception log of the lag type, each line of the key stack information is retrieved;

[0033] If the current row contains the filter keyword, then jump to the next row for retrieval; otherwise, retrieve whether the current row contains the application identifier.

[0034] If the current line contains the application identifier, then the target keyword is determined according to the classification symbol type. The prefix words of the target keyword are compared with the preset first lag keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first lag keyword. If not, the target keyword is searched to see if it contains the preset second lag keyword. If it does, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second lag keyword. If neither of these conditions is met, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the main project.

[0035] If the current line does not contain the application identifier, then it is searched whether the current line contains a preset second lag keyword. If it does, then the responsible party for the pending abnormal log is determined to be the team corresponding to the second lag keyword. If it does not contain the application identifier and the second lag keyword, then the responsible party for the pending abnormal log is determined to be the team corresponding to the public lag.

[0036] In one embodiment, after the step of extracting target keywords from the key stack content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed, the method further includes:

[0037] Obtain the key stack hash value corresponding to the key stack content;

[0038] Based on the key stack hash value and the target keyword, retrieve the target historical logs in the historical anomaly logs whose hash values ​​and keywords are the same as the key stack hash value and the target keyword;

[0039] If the target historical log is not the responsible party for the critical stack content, then search for all historical logs with the same hash value and keywords as the critical stack content that have been misattributed.

[0040] The party responsible for modifying the attribution error history log is the party responsible for the critical stack content.

[0041] Furthermore, to achieve the above objectives, this application also proposes an anomaly log attribution device, which includes:

[0042] The acquisition module is used to acquire the anomaly log to be assigned after receiving an anomaly signal;

[0043] The extraction module is used to examine the anomaly log to be assigned and extract the corresponding key stack trace content.

[0044] The determination module is used to extract target keywords from the key stack content, compare the target keywords with preset attribution keywords, and determine the responsible party for the anomaly log to be assigned.

[0045] In addition, to achieve the above objectives, this application also proposes an anomaly log attribution device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the anomaly log attribution method as described above.

[0046] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the exception log attribution method described above.

[0047] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the exception log attribution method described above.

[0048] One or more technical solutions proposed in this application have at least the following technical effects:

[0049] Compared to related technologies that rely on developers' experience and familiarity with the code to determine the attribution of exception logs, which is not only inefficient but also difficult to guarantee accuracy, leading to low application maintenance efficiency, this application, upon receiving an exception signal, obtains the exception log to be assigned; examines the exception log to be assigned and extracts the corresponding key stack trace content; extracts target keywords from the key stack trace content, and compares the target keywords with preset attribution keywords to determine the responsible party for the exception log to be assigned. It is understood that this application uses keyword extraction of the exception log to be assigned. When the exception log to be assigned is obtained, the responsible party for the exception log to be assigned is determined by identifying the keywords of the exception log and the preset attribution keywords, thereby achieving automatic assignment of exception logs, improving the efficiency of exception log assignment, and thus improving maintenance efficiency. Attached Figure Description

[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart illustrating an embodiment of the method for attributing exception logs in this application.

[0053] Figure 2 This is a flowchart illustrating Embodiment 2 of the method for attributing exception logs in this application.

[0054] Figure 3 This is a flowchart illustrating Embodiment 3 of the method for attributing exception logs in this application.

[0055] Figure 4 This is a schematic diagram of the module structure of the anomaly log attribution device according to an embodiment of this application;

[0056] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the abnormal log attribution method in this application embodiment.

[0057] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0058] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0059] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0060] The main solution in this application embodiment is:

[0061] Upon receiving an anomaly signal, retrieve the anomaly log to be assigned.

[0062] Examine the anomaly log to be assigned and extract the corresponding key stack trace content;

[0063] Extract the target keywords from the key stack content, compare the target keywords with preset attribution keywords, and determine the responsible party for the anomaly log to be attributed.

[0064] In this embodiment, the application uses the abnormal log attribution device as the execution subject. For ease of description, it will be referred to as "device" in the following detailed description.

[0065] Because existing technology relies on developers' experience and familiarity with the code to determine the attribution of exception logs, it is not only inefficient but also difficult to guarantee accuracy, resulting in low application maintenance efficiency.

[0066] This application provides a solution that extracts keywords from abnormal logs to be assigned. When an abnormal log to be assigned is obtained, the responsible party for the abnormal log is determined by identifying the keywords of the abnormal log and the preset assignment keywords, thereby realizing automatic assignment of abnormal logs, improving the efficiency of abnormal log assignment, and thus improving maintenance efficiency.

[0067] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or an exception log attribution device capable of performing the above functions. The following description uses an exception log attribution device as an example to illustrate this embodiment and the subsequent embodiments.

[0068] Based on this, embodiments of this application provide a method for attributing exception logs, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the abnormal log attribution method of this application.

[0069] In this embodiment, the abnormal log attribution method includes steps S10 to S30:

[0070] Step S10: After receiving the abnormal signal, obtain the abnormal log to be assigned.

[0071] It should be noted that the aforementioned exception signal is an indication signal fed back when the application encounters an exception, responsible for triggering the exception attribution process. The exception log to be attributed is the symbolic product of the original crashes or freezes generated on the application side.

[0072] Understandably, this step refers to collecting exception logs that have not yet been categorized or assigned to a responsible team. These exception logs record errors or anomalies encountered during application operation and require further analysis to determine their attribution.

[0073] Step S20: Check the anomaly log to be assigned and extract the corresponding key stack trace content;

[0074] It should be noted that the critical stack content refers to the most important part of the call stack information executed by the program when an exception occurs. It usually includes information such as the method call information that caused the exception, and is crucial for understanding the cause of the exception.

[0075] It is understood that, in one feasible implementation, step S20 may include:

[0076] Check the category of the anomaly log to be assigned;

[0077] If the exception log to be assigned is a crash type log and contains the last exception backtracking identifier, then the stack trace content corresponding to the last exception backtracking identifier is extracted as the key stack content.

[0078] If the exception log to be assigned is the crash type log and does not contain the last exception backtracking identifier, then check whether the exception log to be assigned contains a crash thread identifier. If it contains the crash thread identifier, then extract the stack portion content corresponding to the crash thread identifier as the critical stack content.

[0079] If the exception log to be assigned is a stuttering type log, then the main thread stack portion is extracted as the key stack information.

[0080] It should be noted that the pending exception logs are exception log records that have not yet been categorized or processed. They contain information about errors or exceptions encountered during system operation and require analysis and categorization through specific processing procedures. The last exception backtracking identifier is an identifier used to indicate the last call point or state when the exception occurred, which can help locate the root cause of the problem. The critical stack trace content is the core information directly related to the exception extracted from the stack trace, typically containing the context and call chain of the exception occurrence, which is crucial for problem localization and resolution. The crash thread identifier is used to mark the thread that caused the system crash or exception. In a multi-threaded environment, an exception in one thread can lead to instability in the entire system; therefore, identifying and analyzing crash threads is a crucial step in exception handling.

[0081] Additionally, it should be noted that extracting the stack trace corresponding to the crashed thread identifier as critical stack trace content refers to finding the call stack information corresponding to the abnormal thread number from the exception log. Analyzing this portion of the content can further pinpoint the specific location and cause of the exception.

[0082] For example, refer to Figure 2 When an application crashes or freezes, extracting keywords from the exception log requires identifying the critical stack trace. The log formats collected at the time of an exception vary. Taking crash logs as an example, they can be summarized into two main categories. If the log contains information related to "Last Exception Backtrace," the stack trace content following that line has higher priority. Otherwise, the critical stack trace content needs to be obtained based on the crash thread information. If the log contains "Last Exception Backtrace," the critical stack trace content should be extracted from the line following that line to the line preceding the first empty line. Otherwise, the first line in the log containing "Crashed Thread" should be extracted to obtain the exception thread number n. Then, the line containing "Thread n Crashed" (crash thread number n) should be found, starting from the line following that line and ending at the line preceding the first empty line, to obtain the critical stack trace content. For freeze detection, the main thread is monitored, so only the stack trace information related to the main thread needs to be examined. Thread 0 represents the main thread, so only the content immediately following "Thread 0" in the exception log header needs to be extracted as the critical stack trace information.

[0083] This implementation method extracts key stack information for different anomalies by classifying and judging the identification information.

[0084] Step S30: Extract the target keywords from the key stack content, compare the target keywords with the preset attribution keywords, and determine the responsible party for the anomaly log to be attributed.

[0085] It should be noted that the target keywords are words selected from the key stack content that can represent abnormal characteristics, which helps to quickly index and classify abnormal logs, and facilitates subsequent analysis and attribution.

[0086] It is understood that, in one feasible implementation, step S30 may include:

[0087] Search the namespace of the key stack information to determine if an application identifier exists;

[0088] If the namespace contains an application identifier and the method call space of the log to be assigned contains a first category symbol, then the target keywords are extracted according to the first extraction scheme corresponding to the first category symbol.

[0089] If the namespace contains an application identifier and the method call space does not contain the first category symbol but contains a second category symbol, then the key stack information is extracted according to the second extraction scheme corresponding to the second category symbol to obtain the first stack extraction content. If the first stack extraction content does not contain the third category symbol, then the first stack extraction content is the target keyword; otherwise, the target keyword is extracted according to the third extraction scheme corresponding to the third category symbol.

[0090] If the namespace contains an application identifier and the method call space does not contain the first category symbol and the second category symbol, then the target keyword is extracted according to the preset fourth extraction scheme;

[0091] If the namespace does not contain an application identifier and contains a preset second attribution keyword, then the target keyword is extracted according to the preset fifth extraction scheme;

[0092] If the application identifier is not present in the key stack information, the exception log to be assigned does not contain the last exception backtracking identifier, and does not contain the attribution keyword, then the target keyword is extracted according to the preset sixth extraction scheme.

[0093] If the key stack information does not contain an application identifier, and the exception log to be assigned contains the last exception backtracking identifier but does not contain application-specific information, then the target keyword is extracted according to the sixth extraction scheme.

[0094] If the critical stack information does not contain an application identifier, and the pending exception log contains the last exception backtracking identifier and the application-specific information, then the next line of the application-specific information is searched to see if it contains a cause identifier. If it contains the cause identifier, the target keyword is extracted according to the preset seventh extraction scheme. If it does not contain the cause identifier, the target keyword is extracted according to the preset eighth extraction scheme.

[0095] Understandably, the second column of the critical stack trace in crash or freeze logs typically represents the namespace. If the value is the current App's identifier, it indicates the execution of the App's code. Otherwise, it indicates a system or third-party library call. Therefore, when extracting keywords, it's crucial to distinguish whether the current line contains the App's identifier. The fourth column in the critical stack trace represents method call information.

[0096] Objective-C is an object-oriented programming language, a superset of C, with added Objective-C features such as message passing and dynamic method dispatch. It is primarily used for developing applications for Apple's operating systems. Swift is a programming language developed by Apple to improve development efficiency and code quality. Both Swift and Objective-C are programming languages ​​used for developing applications for Apple platforms. Objective-C was the earlier language used for Apple platform development, while Swift is a newer language developed by Apple based on Objective-C, aiming to provide a more modern, efficient, and secure development experience. In application maintenance, scenarios involving the mixing of these two programming languages ​​may arise.

[0097] For rows containing the current App identifier, Objective-C calls typically include square brackets indicating a method in column 4, while Swift calls do not have square brackets before "offset+", but may include parentheses indicating a closure call.

[0098] Considering the characteristics of method calls in mixed-program apps, refer to Figure 3 Extract keywords from the current line according to the following four cases:

[0099] 1) If the fourth column of the row contains square brackets, extract the content within the square brackets as keywords.

[0100] 2) If the fourth column of the row does not contain square brackets, extract all content before the "+" sign until the first space is encountered. If the extracted content is not "()", then that keyword is the final keyword.

[0101] 3) If the fourth column of the row does not contain square brackets, extract all content before the "+" sign until the first space is encountered. If the extracted content is "()", separate it with spaces and extract up to 5 words (6 words including brackets) as the final keywords.

[0102] 4) If the fourth column of the row does not contain either square brackets or a "+" sign, then starting from the fourth column, extract up to 6 words separated by spaces as the final keywords.

[0103] For example, if the exception occurs during a system or third-party library call, the current line will not contain the current App identifier. Because the extraction of critical crash stack traces distinguishes between lines containing the Last Exception Backtrace, the extraction of keywords for the current line is handled as follows:

[0104] 1) If the current row does not contain an App identifier but contains a second category of keywords, then extract the first word of the second column of the current row as the keyword.

[0105] 2) If the log does not contain the Last Exception Backtrace, and all lines of the critical stack information do not contain the App identifier or any related keywords, then extract the entire contents of the first row and second column of the stack information as the keywords.

[0106] 3) If the log contains a Last Exception Backtrace, and all lines of the critical stack information do not contain the App identifier or Application Specific Information, then take the entire contents of the first row and second column of the stack information as the keyword.

[0107] 4) If the log contains a Last Exception Backtrace and none of the lines of the critical stack contain the App identifier, and the next line of Application Specific Information contains the reason (reason identifier), then extract up to 6 words starting with reason and separated by spaces as keywords.

[0108] 5) If the log contains Last Exception Backtrace, and none of the lines of the critical stack contain the App identifier, and the next line of Application Specific Information does not contain reason, then extract the first 6 words separated by spaces in the next line as keywords.

[0109] This implementation method achieves accurate extraction of target keywords by classifying the key stack information of different abnormal situations.

[0110] It is understood that the responsible party refers to the department, team, or individual responsible for handling and resolving specific anomaly logs. By analyzing and classifying anomaly logs, they can be assigned to the appropriate responsible party for processing, improving the efficiency and accuracy of problem-solving.

[0111] It is understood that, in one feasible implementation, step S30 may include:

[0112] When the critical stack information is extracted from the crash-type pending exception log, each line of the critical stack information is retrieved;

[0113] If the current row contains the preset filter keyword, then jump to the next row for retrieval; otherwise, check if the application identifier exists in the current row.

[0114] If the current line contains the application identifier, then the target keyword is determined according to the classification symbol type. The prefix words of the target keyword are compared with the preset first attribution keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first attribution keyword. If they are different, it is determined whether the target keyword contains the second attribution keyword. If it does, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second attribution keyword. Otherwise, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the main project.

[0115] If the current line does not contain the application identifier, then determine whether the current line contains the second attribution keyword. If it does, then determine that the responsible party for the pending exception log is the team corresponding to the second attribution keyword. If it does not contain the second attribution keyword, and the pending exception log does not contain the last exception backtracking identifier, and the current line is the last line of the critical stack information, then determine that the responsible party for the pending exception log is the team corresponding to the public crash. Otherwise, confirm whether the pending exception log contains the application-specific information.

[0116] If the anomaly log to be assigned does not contain the application-specific information, then the target keyword is extracted according to the sixth extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the public crash response team.

[0117] If the anomaly log to be assigned contains the application-specific information, then the next line is extracted as the target keyword. It is then determined whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first attribution keyword. If they are different, it is then determined whether the target keyword contains the second attribution keyword. If they are, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second attribution keyword. Otherwise, it is searched to see if the next line of the application-specific information contains a cause identifier. If the cause identifier is contained, then the target keyword is extracted according to the preset seventh extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the public crash. If the cause identifier is not contained, then the target keyword is extracted according to the preset eighth extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the public crash.

[0118] Understandably, before calculating the attribution of crashes or glitches, a primary attribution keyword, a secondary attribution keyword, a primary glitch keyword, and a secondary glitch keyword are pre-defined for each internal team. The primary attribution keyword is defined as any extracted keyword that begins with this primary attribution keyword; that is, if the prefix word is the primary attribution keyword, the anomaly log to be attributed is confirmed to be the anomaly log of the team responsible for the primary attribution keyword. The secondary attribution keyword is defined as any extracted keyword that contains this primary attribution keyword; that is, if the target keyword contains the secondary attribution keyword, the anomaly log to be attributed is confirmed to be the anomaly log of the team responsible for the secondary attribution keyword.

[0119] Different teams should avoid using the same prefix during development. If the prefixes are the same, the second attribution keyword should be used as the basis for judgment. If the second attribution keyword still cannot distinguish them, the method calls with the same name should be added to the filter keywords. There are differences in extracting key stack information for crashes and freezes, which leads to differences in the attribution calculation process.

[0120] For example, determining the last method call on which the application encountered the exception is the most effective way to troubleshoot crashes or freezes. The lowest-level method call is usually at the top of the critical stack trace. Therefore, after extracting the critical stack trace from the exception log, each line needs to be scanned from top to bottom to extract relevant keywords. Internal collaborations may involve sharing components; if a crash or freeze occurs on this shared component, it's necessary to determine which team called the exception, thus requiring filtering of such shared calls. Furthermore, since the application always starts on the main thread, calls related to the main thread also need to be filtered. Based on the above analysis, some filtering keywords are preset before keyword extraction. To address situations where adding or deleting shared calls changes the filtering keywords, a management interface is used to adjust the filtering keywords as needed.

[0121] Before calculating the attribution for crashes or freezes, predetermine the primary and secondary attribution keywords for each internal team. The primary attribution keyword is defined as any extracted keyword beginning with this primary attribution keyword, and the secondary attribution keyword is defined as any extracted keyword containing this primary attribution keyword. Different teams should avoid using the same prefix during development. If prefixes are the same, the secondary attribution keyword should be used as the basis for judgment. If the secondary attribution keyword still cannot distinguish between them, duplicate method calls should be added to the filter keywords. The extraction of key stack traces differs between crashes and freezes, resulting in a different attribution calculation process.

[0122] Crash attribution is calculated by extracting critical stack trace information based on the presence of the Last Exception Backtrace identifier. After scanning each line of the critical stack trace from top to bottom, the system first checks if the current line contains a filter keyword; if so, the line is discarded. Otherwise, it checks if the current line contains an App identifier. If the current line contains an App identifier, the extracted keywords are compared to the first attribution keywords of N pre-defined internal teams. If a keyword matches a team's keyword, the crash is attributed to that team. Otherwise, the system continues comparing the extracted keywords to the second attribution keywords of N pre-defined internal teams. If a keyword matches a team's keyword, the crash is attributed to that team. If neither of these conditions is met, the crash is attributed to the main project, and the entire team is responsible for resolving it.

[0123] If the current row being scanned does not contain an App identifier, then the entire current row is compared to see if it contains any of the N pre-defined second-attribute keywords for internal teams. If so, the crash is attributed to the corresponding team. If none of these conditions are met, it is checked whether the current row is the last row.

[0124] If the current line is the last line of the stack trace and the log does not contain a Last Exception Backtrace, it is classified as a common crash. Otherwise, it is necessary to check if the log contains Application Specific Information. If it does not, it is classified as a common crash. If it does, the next line is extracted and compared to whether it meets the preset first attribution keywords of N internal teams. If it does, it is classified as a crash of the relevant team. If it does not, the extracted keywords are then compared to whether they meet the preset second attribution keywords of N internal teams. If they do, it is classified as a crash of the relevant team. Otherwise, it is classified as a common crash.

[0125] In another feasible implementation, step S30 may include:

[0126] When the key stack information is extracted from the main thread stack portion of the pending exception log of the lag type, each line of the key stack information is retrieved;

[0127] If the current row contains the filter keyword, then jump to the next row for retrieval; otherwise, retrieve whether the current row contains the application identifier.

[0128] If the current line contains the application identifier, then the target keyword is determined according to the classification symbol type. The prefix words of the target keyword are compared with the preset first lag keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first lag keyword. If not, the target keyword is searched to see if it contains the preset second lag keyword. If it does, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second lag keyword. If neither of these conditions is met, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the main project.

[0129] If the current line does not contain the application identifier, then it is searched whether the current line contains a preset second lag keyword. If it does, then the responsible party for the pending abnormal log is determined to be the team corresponding to the second lag keyword. If it does not contain the application identifier and the second lag keyword, then the responsible party for the pending abnormal log is determined to be the team corresponding to the public lag.

[0130] For example, the critical stack trace for lag only contains information about the main thread Thread 0. After extracting the critical stack trace represented by Thread 0, rows containing filter keywords are first removed. If the current row contains an App identifier, the extracted keywords are compared to see if they meet the preset first lag keyword. If they do, the calculation is complete. If none of them meet the preset first lag keyword, the extracted keywords are compared to see if they meet the preset second lag keyword. If they do, the lag is attributed to the relevant team; if none of them meet the preset first keyword, the lag is attributed to the main project and is the responsibility of the entire team to resolve. If the current row does not contain an App identifier, the system first checks if the current row contains the second lag keyword. If it does, the lag is attributed to the corresponding team. If none of the rows contain an App identifier or the second lag keyword, the lag is classified as a common lag.

[0131] This embodiment provides a method for extracting keywords from abnormal logs to be assigned. When an abnormal log to be assigned is obtained, the responsible party for the abnormal log is determined by identifying the keywords of the abnormal log and the preset assignment keywords, thereby realizing the automatic assignment of abnormal logs. This improves the efficiency of abnormal log assignment and thus significantly improves maintenance efficiency.

[0132] In one possible implementation, step S30 may be followed by:

[0133] Obtain the key stack hash value corresponding to the key stack content;

[0134] Based on the key stack hash value and the target keyword, retrieve the target historical logs in the historical anomaly logs whose hash values ​​and keywords are the same as the key stack hash value and the target keyword;

[0135] If the target historical log is not the responsible party for the critical stack content, then search for all historical logs with the same hash value and keywords as the critical stack content that have been misattributed.

[0136] The party responsible for modifying the attribution error history log is the party responsible for the critical stack content.

[0137] For example, before calculating the attribution of crashes or freezes, a key stack hash value needs to be calculated. Logs with the same hash value and extracted keywords are grouped into the same category. If a new category of crash or freeze occurs, causing incorrect log attribution calculations, the historical log attribution can be corrected promptly by modifying common filter keywords or pre-set attribution keywords, thus improving the accuracy of the attribution calculation. After the attribution calculation of abnormal logs is completed, logs with the same hash value and keywords as the current logs are searched, then logs with different attributions are searched, and finally the attribution of these incorrectly attributed logs is corrected.

[0138] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method of attribution of abnormal logs in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0139] This application also provides an anomaly log attribution device; please refer to [reference needed]. Figure 4 The anomaly log attribution device includes:

[0140] The acquisition module 10 is used to acquire the anomaly log to be assigned after receiving an anomaly signal;

[0141] Extraction module 20 is used to examine the anomaly log to be assigned and extract the corresponding key stack content;

[0142] The determination module 30 is used to extract target keywords from the key stack content, compare the target keywords with preset attribution keywords, and determine the responsible party for the anomaly log to be attributed.

[0143] And / or, the extraction module 20 includes:

[0144] The first inspection module is used to inspect the category of the abnormal log to be assigned;

[0145] The first extraction module is used to extract the stack trace content corresponding to the last exception trace identifier as key stack content if the exception log to be assigned is a crash type log and contains the last exception trace identifier.

[0146] The second extraction module is used to check whether the exception log to be assigned contains a crash thread identifier if the exception log to be assigned is the crash type log and does not contain the last exception backtracking identifier. If the exception log to be assigned contains the crash thread identifier, the stack part content corresponding to the crash thread identifier is extracted as the key stack content.

[0147] The third extraction module is used to extract the main thread stack portion as the key stack information if the exception log to be assigned is a lag type log.

[0148] And / or, the determining module 30 includes:

[0149] The first retrieval module is used to retrieve the namespace of the key stack information and determine whether an application identifier exists.

[0150] The fourth extraction module is used to extract target keywords according to the first extraction scheme corresponding to the first category symbol if the namespace contains an application identifier and the method call space of the log to be assigned contains a first category symbol.

[0151] The fifth extraction module is used to extract the key stack information according to the second extraction scheme corresponding to the second category symbol if the namespace contains an application identifier and the method call space does not contain the first category symbol but contains a second category symbol, thereby obtaining the first stack extraction content. If the first stack extraction content does not contain the third category symbol, then the first stack extraction content is the target keyword; otherwise, the target keyword is extracted according to the third extraction scheme corresponding to the third category symbol.

[0152] The sixth extraction module is used to extract the target keywords according to a preset fourth extraction scheme if the namespace contains an application identifier and the method call space does not contain the first category symbol and the second category symbol.

[0153] The seventh extraction module is used to extract the target keyword according to the preset fifth extraction scheme if the namespace does not have an application identifier and contains a preset second attribution keyword;

[0154] The eighth extraction module is used to extract the target keyword according to the preset sixth extraction scheme if the application identifier is not present in the key stack information, the exception log to be assigned does not contain the last exception backtracking identifier, and does not contain the attribution keyword.

[0155] The ninth extraction module is used to extract the target keyword according to the sixth extraction scheme if the key stack information does not contain an application identifier, the exception log to be assigned contains the last exception backtracking identifier, and does not contain application-specific information.

[0156] The tenth extraction module is used to retrieve whether the next line of the application-specific information contains a cause identifier if the application identifier is not present in the key stack information, the last exception backtracking identifier is contained in the exception log to be assigned, and the application-specific information is contained. If the cause identifier is contained, the target keyword is extracted according to the preset seventh extraction scheme. If the cause identifier is not contained, the target keyword is extracted according to the preset eighth extraction scheme.

[0157] And / or, the determining module 30 includes:

[0158] The second retrieval module retrieves each line of the key stack information when the key stack information is extracted from the crash-type pending exception log.

[0159] The third search module is used to jump to the next line if the current line contains a preset filter keyword, and to search the current line if it does not contain the filter keyword.

[0160] The first attribution module is used to determine the target keyword based on the classification symbol type if the current line contains the application identifier, compare the prefix words of the target keyword with the preset first attribution keyword, and if they are the same, determine that the responsible party for the anomaly log to be attributed is the team corresponding to the first attribution keyword; if they are different, determine whether the target keyword contains the second attribution keyword; if they are, determine that the responsible party for the anomaly log to be attributed is the team corresponding to the second attribution keyword; otherwise, determine that the responsible party for the anomaly log to be attributed is the team corresponding to the main project.

[0161] The second attribution module is used to determine whether the current line contains the second attribution keyword if the current line does not contain the application identifier. If it does, the responsible party for the anomaly log to be attributed is determined to be the team corresponding to the second attribution keyword. If it does not contain the second attribution keyword, and the anomaly log to be attributed does not contain the last anomaly backtracking identifier, and the current line is the last line of the critical stack information, the responsible party for the anomaly log to be attributed is determined to be the team corresponding to the public crash. Otherwise, it is confirmed whether the anomaly log to be attributed contains the application-specific information.

[0162] The third attribution module is used to extract the target keywords according to the sixth extraction scheme if the anomaly log to be attributed does not contain the application-specific information, and to determine the responsible party for the anomaly log to be attributed as the public crash response team.

[0163] The fourth attribution module is used to extract the next line of content as a target keyword if the application-specific information is contained in the anomaly log to be attributed. It then determines whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, the responsible party for the anomaly log to be attributed is determined to be the team corresponding to the first attribution keyword. If they are different, it determines whether the target keyword contains the second attribution keyword. If they are, the responsible party for the anomaly log to be attributed is determined to be the team corresponding to the second attribution keyword. Otherwise, it searches the next line of the application-specific information to see if it contains a cause identifier. If the cause identifier is contained, the target keyword is extracted according to a preset seventh extraction scheme, and the responsible party for the anomaly log to be attributed is determined to be the team corresponding to the public crash. If the cause identifier is not contained, the target keyword is extracted according to a preset eighth extraction scheme, and the responsible party for the anomaly log to be attributed is determined to be the team corresponding to the public crash.

[0164] And / or, the determining module 30 includes:

[0165] The fourth retrieval module is used to retrieve each line of the key stack information when the key stack information is extracted from the main thread stack portion of the pending exception log of the lag type.

[0166] The fifth search module is used to jump to the next line if the current line contains the filter keyword, and to search whether the current line contains the application identifier if it does not contain the filter keyword.

[0167] The fifth attribution module is used to determine the target keyword based on the classification symbol type if the current line contains the application identifier, compare the prefix words of the target keyword with the preset first lag keyword, and if they are the same, determine that the responsible party for the anomaly log to be assigned is the team corresponding to the first lag keyword. If not, it searches whether the target keyword contains the preset second lag keyword. If it does, it determines that the responsible party for the anomaly log to be assigned is the team corresponding to the second lag keyword. If neither of these conditions is met, it determines that the responsible party for the anomaly log to be assigned is the team corresponding to the main project.

[0168] The sixth attribution module is used to, if the current line does not contain the application identifier, search whether the current line contains a preset second lag keyword. If it does, determine that the responsible party for the anomaly log to be attributed is the team corresponding to the second lag keyword. If it does not contain the application identifier and the second lag attribution keyword, determine that the responsible party for the anomaly log to be attributed is the team corresponding to the public lag.

[0169] And / or, the anomaly log attribution device includes:

[0170] The first acquisition module is used to acquire the key stack hash value corresponding to the key stack content;

[0171] The sixth retrieval module is used to retrieve target historical logs in the historical anomaly logs whose hash values ​​and keywords are the same as the key stack hash value and the target keyword, based on the key stack hash value and the target keyword.

[0172] The first search module is used to search for all historical logs with the same hash value and keywords as the critical stack content if the party responsible for the target historical log is different from that responsible party.

[0173] The first modification module is used to modify the responsible party in the attribution error history log to the responsible party corresponding to the critical stack content.

[0174] The anomaly log attribution device provided in this application, employing the anomaly log attribution method in the above embodiments, can solve the technical problem of low maintenance efficiency of application programs. Compared with the prior art, the beneficial effects of the anomaly log attribution device provided in this application are the same as those of the anomaly log attribution method provided in the above embodiments, and other technical features in the anomaly log attribution device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0175] This application provides an anomaly log attribution device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the anomaly log attribution method in Embodiment 1 above.

[0176] The following is for reference. Figure 5The diagram illustrates a structural schematic suitable for implementing an anomaly log attribution device in the embodiments of this application. The anomaly log attribution device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablets, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The device to which the abnormal log is attributed shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0177] like Figure 5 As shown, the exception log attribution device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the exception log attribution device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the anomaly log attribution device to communicate wirelessly or wiredly with other devices to exchange data. While the figures show anomaly log attribution devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0178] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0179] The anomaly log attribution device provided in this application, employing the anomaly log attribution method in the above embodiments, can solve the technical problem of low application maintenance efficiency. Compared with the prior art, the beneficial effects of the anomaly log attribution device provided in this application are the same as those of the anomaly log attribution method provided in the above embodiments, and other technical features in this anomaly log attribution device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0180] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0181] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0182] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the exception log attribution method in the above embodiments.

[0183] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0184] The aforementioned computer-readable storage medium may be included in the anomaly log home device; or it may exist independently and not be assembled into the anomaly log home device.

[0185] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the exception log attribution device, the exception log attribution device: upon receiving an exception signal, obtains the exception log to be attributed; examines the exception log to be attributed and extracts the corresponding key stack content; extracts the target keywords of the key stack content, compares the target keywords with preset attribution keywords, and determines the responsible party for the exception log to be attributed.

[0186] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0187] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0188] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0189] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described exception log attribution method, thereby solving the technical problem of low maintenance efficiency of application programs. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the exception log attribution method provided in the above embodiments, and will not be repeated here.

[0190] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the exception log attribution method described above.

[0191] The computer program product provided in this application can solve the technical problem of low maintenance efficiency of application programs. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the exception log attribution method provided in the above embodiments, and will not be repeated here.

[0192] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for attributing exception logs, characterized in that, The method includes: Upon receiving an anomaly signal, retrieve the anomaly log to be assigned. Examine the anomaly log to be assigned and extract the corresponding key stack trace content; Extract the target keywords from the key stack content, compare the target keywords with the preset attribution keywords, and determine the responsible party for the anomaly log to be attributed. The step of extracting the target keywords from the key stack content includes: Retrieve each line of the key stack information; If the current line contains preset filter keywords, the search jumps to the next line; otherwise, the search is performed on the namespace of the key stack information to determine if an application identifier exists. If the namespace contains an application identifier and the method call space of the log to be assigned contains a first category symbol, then the target keywords are extracted according to the first extraction scheme corresponding to the first category symbol. If the namespace contains an application identifier and the method call space does not contain the first category symbol but contains a second category symbol, then the key stack information is extracted according to the second extraction scheme corresponding to the second category symbol to obtain the first stack extraction content. If the first stack extraction content does not contain the third category symbol, then the first stack extraction content is the target keyword; otherwise, the target keyword is extracted according to the third extraction scheme corresponding to the third category symbol. If the namespace contains an application identifier and the method call space does not contain the first category symbol and the second category symbol, then the target keyword is extracted according to the preset fourth extraction scheme; If the namespace does not contain an application identifier and contains a preset second attribution keyword, then the target keyword is extracted according to the preset fifth extraction scheme; If the application identifier is not present in the key stack information, the exception log to be assigned does not contain the last exception backtracking identifier, and does not contain the preset attribution keyword and the second attribution keyword, then the target keyword is extracted according to the preset sixth extraction scheme. If the key stack information does not contain an application identifier, and the exception log to be assigned contains the last exception backtracking identifier but does not contain application-specific information, then the target keyword is extracted according to the sixth extraction scheme. If the application identifier is not present in the key stack information, and the exception log to be assigned contains the last exception backtracking identifier and the application-specific information, then the next line of the application-specific information is searched to see if it contains a cause identifier. If it contains the cause identifier, the target keyword is extracted according to the preset seventh extraction scheme. If it does not contain the cause identifier, the target keyword is extracted according to the preset eighth extraction scheme. After the step of extracting target keywords from the key stack content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed, the method further includes: Obtain the key stack hash value corresponding to the key stack content; Based on the key stack hash value and the target keyword, retrieve the target historical logs in the historical anomaly logs whose hash values ​​and keywords are the same as the key stack hash value and the target keyword; If the party responsible for the target historical log is different from that responsible for the critical stack content, then search for all historical logs with the same hash value and keywords as the critical stack content that have been attributed incorrectly. The party responsible for modifying the attribution error history log is the party responsible for the critical stack content.

2. The method as described in claim 1, characterized in that, The step of inspecting the anomaly log to be attributed and extracting the corresponding key stack trace content includes: Check the category of the anomaly log to be assigned; If the exception log to be assigned is a crash type log and contains the last exception backtracking identifier, then the stack trace content corresponding to the last exception backtracking identifier is extracted as the key stack content. If the exception log to be assigned is the crash type log and does not contain the last exception backtracking identifier, then check whether the exception log to be assigned contains a crash thread identifier. If it contains the crash thread identifier, then extract the stack portion content corresponding to the crash thread identifier as the critical stack content. If the exception log to be assigned is a stuttering type log, then the main thread stack portion is extracted as the key stack information.

3. The method as described in claim 1, characterized in that, The step of extracting target keywords from the key stack trace content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed includes: When the critical stack information is extracted from the crash-type pending exception log, each line of the critical stack information is retrieved; If the current row contains the preset filter keyword, then jump to the next row for retrieval; otherwise, check if the application identifier exists in the current row. If the current line contains the application identifier, then the target keyword is determined according to the classification symbol type. The prefix words of the target keyword are compared with the preset first attribution keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first attribution keyword. If they are different, it is determined whether the target keyword contains the second attribution keyword. If it does, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second attribution keyword. Otherwise, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the main project. If the current line does not contain the application identifier, then determine whether the current line contains the second attribution keyword. If it does, then determine that the responsible party for the pending exception log is the team corresponding to the second attribution keyword. If it does not contain the second attribution keyword, and the pending exception log does not contain the last exception backtracking identifier, and the current line is the last line of the critical stack information, then determine that the responsible party for the pending exception log is the team corresponding to the public crash. Otherwise, confirm whether the pending exception log contains the application-specific information. If the anomaly log to be assigned does not contain the application-specific information, then the target keyword is extracted according to the sixth extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the public crash response team. If the anomaly log to be assigned contains the application-specific information, then the next line is extracted as the target keyword. It is then determined whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first attribution keyword. If they are different, it is then determined whether the target keyword contains the second attribution keyword. If they are, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second attribution keyword. Otherwise, it is searched to see if the next line of the application-specific information contains a cause identifier. If the cause identifier is contained, then the target keyword is extracted according to the preset seventh extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the public crash. If the cause identifier is not contained, then the target keyword is extracted according to the preset eighth extraction scheme, and the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the public crash.

4. The method as described in claim 1, characterized in that, The step of extracting target keywords from the key stack trace content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed includes: When the key stack information is extracted from the main thread stack portion of the pending exception log of the lag type, each line of the key stack information is retrieved; If the current row contains the filter keyword, then jump to the next row for retrieval; otherwise, retrieve whether the current row contains the application identifier. If the current line contains the application identifier, then the target keyword is determined according to the classification symbol type. The prefix words of the target keyword are compared with the preset first lag keyword. If they are the same, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the first lag keyword. If not, the target keyword is searched to see if it contains the preset second lag keyword. If it does, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the second lag keyword. If neither of these conditions is met, the responsible party for the anomaly log to be assigned is determined to be the team corresponding to the main project. If the current line does not contain the application identifier, then it is searched whether the current line contains a preset second lag keyword. If it does, then the responsible party for the pending abnormal log is determined to be the team corresponding to the second lag keyword. If it does not contain the application identifier and the second lag keyword, then the responsible party for the pending abnormal log is determined to be the team corresponding to the public lag.

5. An anomaly log attribution device, characterized in that, The device includes: The acquisition module is used to acquire the anomaly log to be assigned after receiving an anomaly signal; The extraction module is used to examine the anomaly log to be assigned and extract the corresponding key stack trace content. The determination module is used to extract target keywords from the key stack content, compare the target keywords with preset attribution keywords, and determine the responsible party for the anomaly log to be assigned. The step of extracting the target keywords from the key stack content includes: Retrieve each line of the key stack information; If the current line contains preset filter keywords, the search jumps to the next line; otherwise, the search is performed on the namespace of the key stack information to determine if an application identifier exists. If the namespace contains an application identifier and the method call space of the log to be assigned contains a first category symbol, then the target keywords are extracted according to the first extraction scheme corresponding to the first category symbol. If the namespace contains an application identifier and the method call space does not contain the first category symbol but contains a second category symbol, then the key stack information is extracted according to the second extraction scheme corresponding to the second category symbol to obtain the first stack extraction content. If the first stack extraction content does not contain the third category symbol, then the first stack extraction content is the target keyword; otherwise, the target keyword is extracted according to the third extraction scheme corresponding to the third category symbol. If the namespace contains an application identifier and the method call space does not contain the first category symbol and the second category symbol, then the target keyword is extracted according to the preset fourth extraction scheme; If the namespace does not contain an application identifier and contains a preset second attribution keyword, then the target keyword is extracted according to the preset fifth extraction scheme; If the application identifier is not present in the key stack information, the exception log to be assigned does not contain the last exception backtracking identifier, and does not contain the preset attribution keyword and the second attribution keyword, then the target keyword is extracted according to the preset sixth extraction scheme. If the key stack information does not contain an application identifier, and the exception log to be assigned contains the last exception backtracking identifier but does not contain application-specific information, then the target keyword is extracted according to the sixth extraction scheme. If the application identifier is not present in the key stack information, and the exception log to be assigned contains the last exception backtracking identifier and the application-specific information, then the next line of the application-specific information is searched to see if it contains a cause identifier. If it contains the cause identifier, the target keyword is extracted according to the preset seventh extraction scheme. If it does not contain the cause identifier, the target keyword is extracted according to the preset eighth extraction scheme. After the step of extracting target keywords from the key stack content, comparing the target keywords with preset attribution keywords, and determining the responsible party for the anomaly log to be attributed, the method further includes: Obtain the key stack hash value corresponding to the key stack content; Based on the key stack hash value and the target keyword, retrieve the target historical logs in the historical anomaly logs whose hash values ​​and keywords are the same as the key stack hash value and the target keyword; If the target historical log is not the responsible party for the critical stack content, then search for all historical logs with the same hash value and keywords as the critical stack content that have been misattributed. The party responsible for modifying the attribution error history log is the party responsible for the critical stack content.

6. An anomaly log attribution device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the anomaly log attribution method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the abnormal log attribution method as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the exception log attribution method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and device for expanding log abnormity classification rules

    CN110825873A

  • Abnormal information positioning method and system, server and storage medium

    CN112235638A