Abnormal log attribution method and device, equipment, storage medium and product
By extracting the keywords of the iOS side exception log and comparing them with the preset attribute keywords, the responsible party for the exception log is automatically determined, and the problem of low maintenance efficiency caused by relying on developer experience in the existing technology is solved, and more efficient exception log attribute and application maintenance are achieved.
Patent Information
- Application Number
- CN202411502136.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In an environment of multi-team collaborative development, the exception situation handling on the iOS side is complex, and the existing methods rely on developer experience, are inefficient and difficult to ensure accuracy, resulting in low application maintenance efficiency.
A method of belonging to the exception log is proposed. By receiving the exception signal, the exception log to be belonged to be obtained, the key stack content is checked and extracted, the target keyword is extracted and the preset belonging keyword is compared with the preset belonging to the exception log is determined.
Automatic ownership of exception logs is realized, and the efficiency of exception log belonging is improved, thereby improving the maintenance efficiency of the application.
Smart Images

Figure CN119599010A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an abnormal log attribution method, device, equipment, storage medium and product. Background Art
[0002] As the complexity of applications continues to increase, multi-team collaborative development has become the norm. In a multi-team development environment, each team is responsible for different functional modules, which brings challenges in coordination and communication. Especially in iOS development, due to its unique development environment and language selection, the handling of abnormal situations becomes particularly complicated. So when an application crashes or freezes, it is crucial to quickly locate the problem and assign it to the corresponding team for resolution.
[0003] The existing practice is to rely on the developer's experience and familiarity with the code to manually determine the ownership of the abnormal log. However, this method is not only inefficient, but also difficult to ensure accuracy, resulting in low maintenance efficiency of the application.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide an abnormal log attribution method, device, equipment, storage medium and product, aiming to solve the technical problem of low maintenance efficiency of application programs.
[0006] To achieve the above purpose, the present application proposes a method for attributing abnormal logs, the method comprising:
[0007] After receiving the abnormal signal, obtain the abnormal log to be attributed;
[0008] Check the exception log to be attributed and extract the corresponding key stack content;
[0009] A target keyword of the key stack content is extracted, and the target keyword is compared with a preset attribution keyword to determine the responsible party of the abnormal log to be attributed.
[0010] In one embodiment, the step of checking the abnormal log to be attributed and extracting the corresponding key stack content includes:
[0011] Checking the category of the abnormal log to be attributed;
[0012] If the exception log to be attributed is a crash type log and contains a last exception backtrace identifier, extracting a stack portion corresponding to the last exception backtrace identifier as a key stack content;
[0013] If the exception log to be attributed is the crash type log and does not contain the last exception backtrace identifier, then checking whether the exception log to be attributed contains the crash thread identifier, and if it contains the crash thread identifier, extracting the stack portion corresponding to the crash thread identifier as the key stack content;
[0014] If the abnormal log to be attributed is a jamming type log, part of the main thread stack content is extracted as the key stack information.
[0015] In one embodiment, the step of extracting target keywords from the key stack content includes:
[0016] Retrieving the namespace of the key stack information to determine whether an application identifier exists;
[0017] If the namespace contains an application identifier, and the method call space of the log to be attributed contains a first classification symbol, extracting the target keyword according to a first extraction scheme corresponding to the first classification symbol;
[0018] If the namespace has an application identifier, and the method call space does not contain the first classification symbol, but has a second classification symbol, then the key stack information is extracted according to a second extraction scheme corresponding to the second classification symbol to obtain a first stack extraction content, and if the first stack extraction content does not contain a third classification symbol, then the first stack extraction content is the target keyword, otherwise the target keyword is extracted according to a third extraction scheme corresponding to the third classification symbol;
[0019] If the namespace contains an application identifier, and the method call space does not contain the first classification symbol and the second classification symbol, extracting the target keyword according to a preset fourth extraction scheme;
[0020] If the namespace does not contain an application identifier and contains a preset second attribution keyword, extracting the target keyword according to a preset fifth extraction scheme;
[0021] If the key stack information does not contain an application identifier, the exception log to be attributed does not contain the last exception backtrace identifier and does not contain an attribution keyword, extracting the target keyword according to a preset sixth extraction scheme;
[0022] If there is no application identifier in the key stack information, the exception log to be attributed includes the last exception backtrace identifier and does not include application-specific information, extracting the target keyword according to the sixth extraction scheme;
[0023] If there is no application identifier in the key stack information, the exception log to be attributed contains the last exception backtrace identifier and the application-specific information, then the next line of the application-specific information is retrieved to see whether 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 a target keyword from the key stack content, comparing the target keyword with a preset attribution keyword, and determining the responsible party of the abnormal log to be attributed includes:
[0025] When the key stack information is extracted from the crash type to-be-attributed exception log, retrieving each line of the key stack information;
[0026] If the current row contains the preset filtering keyword, then jump to search the next row; if not, then search whether the current row contains the application identifier;
[0027] If the current row contains the application identifier, the target keyword is determined according to the type of classification symbol, and the prefix word of the target keyword is compared to see whether it is the same as the preset first attribution keyword. If they are the same, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword. If they are not the same, it is determined whether the target keyword contains the second attribution keyword. If it is included, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword. Otherwise, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the main project.
[0028] If the current line does not contain the application identifier, determine whether the current line contains the second attribution keyword; if so, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword; if not, and the exception log to be attributed does not contain the last exception backtrace identifier, and the current line is the last line of the critical stack information, determine that the responsible party of the exception log to be attributed is the public crash corresponding team; otherwise, confirm whether the exception log to be attributed contains the application-specific information;
[0029] If the exception log to be attributed does not contain the application-specific information, extracting the target keyword according to the sixth extraction scheme, and determining that the responsible party of the exception log to be attributed is the public crash corresponding team;
[0030] If the exception log to be attributed contains the application-specific information, extract the next line of content as the target keyword, and determine whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, determine that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword. If they are not the same, determine whether the target keyword contains the second attribution keyword. If it does, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword. Otherwise, retrieve whether the next line of the application-specific information contains a cause identifier. If it contains the cause identifier, extract the target keyword according to the preset seventh extraction scheme, and determine that the responsible party of the exception log to be attributed is the public crash corresponding team. If it does not contain the cause identifier, extract the target keyword according to the preset eighth extraction scheme, and determine that the responsible party of the exception log to be attributed is the public crash corresponding team.
[0031] In one embodiment, the step of extracting a target keyword from the key stack content, comparing the target keyword with a preset attribution keyword, and determining the responsible party of the abnormal log to be attributed includes:
[0032] When the key stack information is extracted according to the main thread stack part content of the to-be-attributed exception log of the jam type, each line of the key stack information is retrieved;
[0033] If the current row contains the filtering keyword, then jump to search the next row; if not, then search whether the current row contains the application identifier;
[0034] If the current row contains the application identifier, the target keyword is determined according to the type of classification symbol, and the prefix word of the target keyword is compared with the preset first jamming keyword to see whether they are the same. If they are the same, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the first jamming keyword. If not, it is retrieved whether the target keyword contains the preset second jamming keyword. If it is included, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the second jamming keyword. If neither of them is satisfied, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the main project.
[0035] If the current line does not contain the application identifier, then the current line is retrieved to see whether it contains the preset second jamming keyword. If it does, then the responsible party for the exception log to be attributed is determined to be the team corresponding to the second jamming keyword. If it does not contain the application identifier and the second jamming keyword, then the responsible party for the exception log to be attributed is determined to be the team corresponding to the public jamming.
[0036] In one embodiment, after the step of extracting a target keyword of the key stack content, comparing the target keyword with a preset attribution keyword, and determining the responsible party of the abnormal log to be attributed, the step further includes:
[0037] Obtaining a key stack hash value corresponding to the key stack content;
[0038] According to the key stack hash value and the target keyword, searching the historical exception log for a target historical log having a hash value and a keyword identical to the key stack hash value and the target keyword;
[0039] If the target history log is different from the party responsible for the key stack content, then search for all attribution error history logs with the same hash value and keyword as the key stack content;
[0040] The responsible party for modifying the attribution error history log is the responsible party corresponding to the critical stack content.
[0041] In addition, to achieve the above purpose, the present application also proposes an abnormal log attribution device, the abnormal log attribution device comprising:
[0042] An acquisition module is used to acquire the abnormal log to be attributed after receiving the abnormal signal;
[0043] An extraction module, used to check the abnormal log to be attributed and extract the corresponding key stack content;
[0044] The determination module is used to extract the target keyword of the key stack content, compare the target keyword with the preset attribution keyword, and determine the responsible party of the abnormal log to be attributed.
[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes an abnormal log attribution device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the abnormal log attribution method as described above.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which 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, the steps of the abnormal log attribution method described above are implemented.
[0047] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the abnormal log attribution method described above are implemented.
[0048] One or more technical solutions proposed in this application have at least the following technical effects:
[0049] Compared with the related art, which relies on the developer's experience and familiarity with the code to determine the owner of the exception log, which is not only inefficient but also difficult to ensure accuracy, resulting in low maintenance efficiency of the application, the present application obtains the exception log to be attributed after receiving the exception signal; checks the exception log to be attributed, extracts the corresponding key stack content; extracts the target keyword of the key stack content, compares the target keyword with the preset attribution keyword, and determines the responsible party of the exception log to be attributed. It is understandable that the present application adopts the method of extracting the keywords of the exception log to be attributed. When the exception log to be attributed is obtained, the responsible party of the exception log to be attributed is determined by identifying the keywords of the exception log and the preset attribution keywords, and the automatic attribution of the exception log is realized, thereby improving the attribution efficiency of the exception log, and then improving the maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0052] Figure 1 A flowchart of the first embodiment of the abnormal log attribution method of the present application is provided;
[0053] Figure 2 A flowchart of the second embodiment of the abnormal log attribution method of the present application is provided;
[0054] Figure 3 A flowchart of the third embodiment of the abnormal log attribution method of the present application is provided;
[0055] Figure 4 This is a schematic diagram of the module structure of the abnormal log attribution device according to an embodiment of the present application;
[0056] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the abnormal log attribution method in the embodiment of the present application.
[0057] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0059] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0060] The main solutions of the embodiments of this application are:
[0061] After receiving the abnormal signal, obtain the abnormal log to be attributed;
[0062] Check the exception log to be attributed and extract the corresponding key stack content;
[0063] A target keyword of the key stack content is extracted, and the target keyword is compared with a preset attribution keyword to determine the responsible party of the abnormal log to be attributed.
[0064] In this embodiment, the application uses the abnormal log attribution device as the execution subject. For the convenience of description, it is specifically described below as "device".
[0065] Since the existing technology relies on the developer's experience and familiarity with the code to determine the ownership of the abnormal log, it is not only inefficient but also difficult to ensure accuracy, resulting in low maintenance efficiency of the application.
[0066] The present application provides a solution, which adopts the method of extracting keywords of the exception log to be attributed. When the exception log to be attributed is obtained, the responsible party for the exception log to be attributed is determined by identifying the keywords of the exception log and the preset attribution keywords, thereby realizing automatic attribution of the exception log, thereby improving the attribution efficiency of the exception log and further improving the maintenance efficiency.
[0067] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an abnormal log attribution device, etc. The following takes the abnormal log attribution device as an example to illustrate this embodiment and the following embodiments.
[0068] Based on this, the embodiment of the present application provides a method for attributing abnormal logs, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the abnormal log attribution method of the present application.
[0069] In this embodiment, the abnormal log attribution method includes steps S10 to S30:
[0070] Step S10, after receiving the abnormal signal, obtaining the abnormal log to be attributed;
[0071] It should be noted that the abnormal signal is an indication signal fed back when the application is abnormal, which is responsible for triggering the abnormal attribution process. The abnormal log to be attributed is the symbolized product of the original crash or freeze log generated by the application end.
[0072] Understandably, this step refers to collecting exception logs that have not yet been classified or assigned to a responsible team. These exception logs record errors or abnormal conditions encountered during the operation of the application and need further analysis to determine their attribution.
[0073] Step S20, checking the abnormal log to be attributed and extracting the corresponding key stack content;
[0074] It should be noted that the key stack content refers to the most important part of the call stack information of the program execution when an exception occurs, which usually includes the method call information that caused the exception, etc., and is crucial for understanding the cause of the exception.
[0075] It can be understood that, in a feasible implementation manner, step S20 may include:
[0076] Checking the category of the abnormal log to be attributed;
[0077] If the exception log to be attributed is a crash type log and contains a last exception backtrace identifier, extracting a stack portion corresponding to the last exception backtrace identifier as a key stack content;
[0078] If the exception log to be attributed is the crash type log and does not contain the last exception backtrace identifier, then checking whether the exception log to be attributed contains the crash thread identifier, and if it contains the crash thread identifier, extracting the stack portion corresponding to the crash thread identifier as the key stack content;
[0079] If the abnormal log to be attributed is a jamming type log, part of the main thread stack content is extracted as the key stack information.
[0080] It should be noted that the unclassified exception log is an exception log record that has not yet been classified or processed. It contains information about errors or abnormal situations encountered during system operation and needs to be analyzed and classified through a specific processing flow. The last exception backtrace 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 key stack content is the core information directly related to the exception extracted from the stack content, which usually contains the context and call link where the exception occurred, and is crucial for locating and solving the problem. The crash thread identifier is used to mark the thread that caused the system crash or exception. In a multi-threaded environment, the exception of a thread may cause instability in the entire system, so identifying and analyzing the crash thread is an important part of exception handling.
[0081] In addition, it should be noted that extracting the stack content corresponding to the crash thread identifier as the key stack content means finding the call stack information corresponding to the abnormal thread number from the abnormal log. By analyzing this part of the content, the specific location and cause of the abnormality can be further located.
[0082] For example, refer to Figure 2 , after the application crashes or freezes, the premise of extracting keywords from the exception log is to determine the key stack. The log formats collected when the exception occurs are not the same. Taking the crash log as an example, it can be summarized into two categories. If the log contains the Last Exception Backtrace related content, the stack content after this line has a higher priority. Otherwise, it is necessary to obtain the key stack content based on the crash thread information. If the log contains the Last Exception Backtrace, it is necessary to extract all the contents starting from the next line of the line and ending with the previous line of the first blank line encountered as the key stack content. Otherwise, extract the first line containing Crashed Thread in the log to get the exception thread number n. Then find the line where Thread n Crashed is located, starting from the next line of the line and ending with the previous line of the first blank line as the key stack content. The freeze detection is the main thread, so only the main thread related stack information needs to be looked at. Thread 0 represents the main thread, so only the relevant content of Thread 0 immediately following the exception log header needs to be extracted as the key stack information.
[0083] This implementation achieves the extraction of key stack information of different exceptions by classifying and judging the identification information.
[0084] Step S30, extracting a target keyword from the key stack content, comparing the target keyword with a preset attribution keyword, and determining the responsible party for the abnormal 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 help to quickly index and classify abnormal logs and facilitate subsequent analysis and attribution.
[0086] It can be understood that, in a feasible implementation manner, step S30 may include:
[0087] Retrieving the namespace of the key stack information to determine whether an application identifier exists;
[0088] If the namespace contains an application identifier, and the method call space of the log to be attributed contains a first classification symbol, extracting the target keyword according to a first extraction scheme corresponding to the first classification symbol;
[0089] If the namespace has an application identifier, and the method call space does not contain the first classification symbol, but has a second classification symbol, then the key stack information is extracted according to a second extraction scheme corresponding to the second classification symbol to obtain a first stack extraction content, and if the first stack extraction content does not contain a third classification symbol, then the first stack extraction content is the target keyword, otherwise the target keyword is extracted according to a third extraction scheme corresponding to the third classification symbol;
[0090] If the namespace contains an application identifier, and the method call space does not contain the first classification symbol and the second classification symbol, extracting the target keyword according to a preset fourth extraction scheme;
[0091] If the namespace does not contain an application identifier and contains a preset second attribution keyword, extracting the target keyword according to a preset fifth extraction scheme;
[0092] If the key stack information does not contain an application identifier, the exception log to be attributed does not contain the last exception backtrace identifier and does not contain an attribution keyword, extracting the target keyword according to a preset sixth extraction scheme;
[0093] If there is no application identifier in the key stack information, the exception log to be attributed includes the last exception backtrace identifier and does not include application-specific information, extracting the target keyword according to the sixth extraction scheme;
[0094] If there is no application identifier in the key stack information, the exception log to be attributed contains the last exception backtrace identifier and the application-specific information, then the next line of the application-specific information is retrieved to see whether 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] It is understandable that the second column of the key stack of the crash or freeze log is usually represented as a namespace. If the value is the current App (application) identifier, it indicates the execution of the App project code. Otherwise, it indicates a system or third-party library call. Therefore, when extracting keywords, it is necessary to distinguish whether the current line contains the App identifier. The fourth column in the key stack information indicates the method call information.
[0096] Objective-C is an object-oriented programming language that is a superset of the C language and adds Objective-C-specific features such as message passing and dynamic method dispatch. It is mainly used to develop applications on Apple's operating system. 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 Apple platform application development. Objective-C is an earlier programming language used for Apple platform development, and Swift is a newer programming language developed by Apple based on Objective-C, designed to provide a more modern, efficient and secure development experience. In the maintenance of applications, you will encounter situations where the two programming languages are mixed.
[0097] For the row containing the current App ID, Objective-C calls usually contain brackets indicating methods in column 4, while Swift calls do not have brackets before "offset+" but may contain "()" indicating a closure call.
[0098] Combined with the characteristics of mixed App method calls, refer to Figure 3 , extract the current row keywords according to the following 4 situations:
[0099] 1) If the 4th column of the row contains square brackets, extract the content in the brackets as keywords.
[0100] 2) If the fourth column of the line does not contain brackets, extract all the content before the "+" sign until the first space is encountered. If the extracted content is not "()", the keyword is the final keyword.
[0101] 3) If the fourth column of the line does not contain brackets, extract all the 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 keyword.
[0102] 4) If the 4th column of the line contains neither brackets nor a "+" sign, then starting from the 4th column, extract at most 6 words separated by spaces as the final keywords.
[0103] For example, if the exception occurs in the system or third-party library call, the current line does not contain the current App ID. Because the extraction of the crash key stack information distinguishes whether the Last Exception Backtrace is included, the current line keyword extraction is processed as follows:
[0104] 1) If the current row does not contain an App identifier and contains a second-category attribution keyword, the first word in the second column of the current row is extracted as the keyword.
[0105] 2) If the log does not contain the Last Exception Backtrace, all rows of the key stack information do not contain the App ID and do not contain any attribution keywords, then the entire content of the first row and second column of the stack information is extracted as the keyword.
[0106] 3) If the log contains the Last Exception Backtrace, all rows of the key stack information do not contain the App ID and do not contain Application Specific Information, then the entire content of the first row and second column of the stack information is taken as the keyword.
[0107] 4) If the log contains the Last Exception Backtrace, and all the key stack lines do not contain the App identifier, and the next line of Application Specific Information contains reason (reason identifier), extract up to 6 words starting with reason and separated by spaces as keywords.
[0108] 5) If the log contains the Last Exception Backtrace, and all lines of the key stack do not contain the App ID, and the next line of Application Specific Information does not contain reason, extract the first 6 words separated by spaces in the next line as keywords.
[0109] This implementation achieves accurate extraction of target keywords by classifying key stack information of different abnormal situations.
[0110] It is understandable that the responsible party refers to the department, team or individual responsible for handling and resolving a specific abnormal log. By analyzing and classifying the abnormal log, the abnormal log can be assigned to the corresponding party for processing, thereby improving the efficiency and accuracy of problem solving.
[0111] It can be understood that, in a feasible implementation manner, step S30 may include:
[0112] When the key stack information is extracted from the crash type to-be-attributed exception log, retrieving each line of the key stack information;
[0113] If the current row contains the preset filtering keyword, then jump to search the next row; if not, then search whether the current row contains the application identifier;
[0114] If the current row contains the application identifier, the target keyword is determined according to the type of classification symbol, and the prefix word of the target keyword is compared to see whether it is the same as the preset first attribution keyword. If they are the same, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword. If they are not the same, it is determined whether the target keyword contains the second attribution keyword. If it is included, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword. Otherwise, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the main project.
[0115] If the current line does not contain the application identifier, determine whether the current line contains the second attribution keyword; if so, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword; if not, and the exception log to be attributed does not contain the last exception backtrace identifier, and the current line is the last line of the critical stack information, determine that the responsible party of the exception log to be attributed is the public crash corresponding team; otherwise, confirm whether the exception log to be attributed contains the application-specific information;
[0116] If the exception log to be attributed does not contain the application-specific information, extracting the target keyword according to the sixth extraction scheme, and determining that the responsible party of the exception log to be attributed is the public crash corresponding team;
[0117] If the exception log to be attributed contains the application-specific information, extract the next line of content as the target keyword, and determine whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, determine that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword. If they are not the same, determine whether the target keyword contains the second attribution keyword. If it does, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword. Otherwise, retrieve whether the next line of the application-specific information contains a cause identifier. If it contains the cause identifier, extract the target keyword according to the preset seventh extraction scheme, and determine that the responsible party of the exception log to be attributed is the public crash corresponding team. If it does not contain the cause identifier, extract the target keyword according to the preset eighth extraction scheme, and determine that the responsible party of the exception log to be attributed is the public crash corresponding team.
[0118] It is understandable that before the crash or freeze attribution calculation, the first attribution keyword, second attribution keyword, first freeze keyword and second freeze keyword of each internal team are preset. The first attribution keyword is defined as the extracted keyword starting with this attribution keyword, that is, when the prefix word is the first attribution keyword, it is confirmed that the abnormal log to be attributed is the abnormal log that the corresponding team of the first attribution keyword is responsible for. The second attribution keyword is defined as the extracted keyword containing the attribution keyword, that is, when the target keyword contains the second attribution keyword, it is confirmed that the abnormal log to be attributed is the abnormal log that the corresponding team of the second attribution keyword is responsible for.
[0119] Different teams should try to 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 be distinguished, the method calls with the same name should be included in the filter keyword. 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 on which method call the application last had an exception is the most effective information for troubleshooting crashes or freezes. The lowest-level method call is usually at the top of the key stack information. Therefore, after extracting the key stack information from the exception log, it is necessary to scan each line from top to bottom to extract valid keywords. A component may be shared during internal collaboration. If a crash or freeze occurs on this common component, it is necessary to determine which team called the exception, so it is necessary to filter such common calls first. In addition, since the application is always in the main thread when it starts, the call content related to the main thread also needs to be filtered. Based on the above analysis, some filter keywords are preset before extracting keywords. In order to cope with the situation where the filter keywords change due to the addition or deletion of public calls, the filter keywords are adjusted as needed in the form of the management end.
[0121] Before calculating the attribution of crashes or freezes, preset the first and second attribution keywords for each internal team. The first attribution keyword is defined as the extracted keyword starting with this attribution keyword, and the second attribution keyword is defined as the extracted keyword containing this attribution keyword. Different teams should try to 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 be distinguished, the method call with the same name needs to be included in the filter keyword. There are differences in the extraction of key stack information for crashes and freezes, which leads to differences in the attribution calculation process.
[0122] The crash attribution calculation extracts the key stack information based on whether the Last Exception Backtrace is included. After scanning each line of the key stack from top to bottom, first determine whether the current line contains the filter keyword. If it does, discard the line directly. Otherwise, check whether the current line contains the App identifier. If the current line contains the App identifier, compare the extracted keywords in turn to see if they meet the first attribution keywords of the preset N internal teams. If they meet a certain team, it is attributed to the crash of that team. Otherwise, continue to compare the extracted keywords in turn to see if they meet the second attribution keywords of the preset N internal teams. If they meet a certain team, it is attributed to the crash of that team. If neither of the above two is met, it is attributed to the crash of the main project, and the entire team is jointly responsible for solving it.
[0123] If the current scanned row does not contain the App logo, the entire row is compared to see if it contains the N second attribution keywords preset by the internal team. If they meet the requirements, it is classified as a crash of the corresponding team. If none of them meet the requirements, it is checked to see if the current row is the last row.
[0124] If the current line is the last line of the stack information and the log does not contain Last Exception Backtrace, it is classified as a public crash. Otherwise, it is necessary to check whether the log contains Application Specific Information. If not, it is classified as a public crash. If it is, extract the next line of content, and then compare whether it meets the preset first-attribution keywords of the N internal teams. If it meets, it is classified as a crash of the relevant team. If not, continue to compare the extracted keywords in turn to see if they meet the preset second-attribution keywords of the N internal teams. If they meet, it is classified as a crash of the relevant team. Otherwise, it is classified as a public crash.
[0125] In another feasible implementation, step S30 may include:
[0126] When the key stack information is extracted according to the main thread stack part content of the to-be-attributed exception log of the jam type, each line of the key stack information is retrieved;
[0127] If the current row contains the filtering keyword, then jump to search the next row; if not, then search whether the current row contains the application identifier;
[0128] If the current row contains the application identifier, the target keyword is determined according to the type of classification symbol, and the prefix word of the target keyword is compared with the preset first jamming keyword to see whether they are the same. If they are the same, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the first jamming keyword. If not, it is retrieved whether the target keyword contains the preset second jamming keyword. If it is included, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the second jamming keyword. If neither of them is satisfied, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the main project.
[0129] If the current line does not contain the application identifier, then the current line is retrieved to see whether it contains the preset second jamming keyword. If it does, then the responsible party for the exception log to be attributed is determined to be the team corresponding to the second jamming keyword. If it does not contain the application identifier and the second jamming keyword, then the responsible party for the exception log to be attributed is determined to be the team corresponding to the public jamming.
[0130] Exemplarily, the jam key stack only contains the information of the main thread Thread 0. After extracting the jam key stack represented by Thread0, first remove the line containing the filter keyword. If the current line contains the App logo, compare the extracted keywords in turn to see if they meet the preset first jam keyword. If they do, the calculation is complete. If none of them meet, compare the extracted keywords to see if they meet the preset second jam attribution keyword. If they meet, they are classified as jams of the relevant team. If none of them meet, they are classified as main engineering jams, and the entire team is jointly responsible for solving them. If the current line does not contain the App logo, first check whether the current line contains the second jam attribution keyword. If it does, it is classified as the jam of the corresponding team. If all lines do not contain the App logo and the second jam attribution keyword, they are classified as public jams.
[0131] This embodiment provides a method for extracting keywords of the exception log to be attributed. When the exception log to be attributed is obtained, the responsible party of the exception log to be attributed is determined by identifying the keywords of the exception log and the preset attribution keywords, thereby realizing automatic attribution of the exception log, thereby improving the attribution efficiency of the exception log and further achieving a significant improvement in maintenance efficiency.
[0132] In a feasible implementation manner, step S30 may include:
[0133] Obtaining a key stack hash value corresponding to the key stack content;
[0134] According to the key stack hash value and the target keyword, searching the historical exception log for a target historical log having a hash value and a keyword identical to the key stack hash value and the target keyword;
[0135] If the target history log is different from the party responsible for the key stack content, then search for all attribution error history logs with the same hash value and keyword as the key stack content;
[0136] The responsible party for modifying the attribution error history log is the responsible party corresponding to the critical stack content.
[0137] Exemplarily, before calculating the attribution of a crash or freeze, it is necessary to calculate the key stack hash value, and the same hash value and extracted keywords are classified into the same category. If a new category of crash or freeze occurs, resulting in incorrect calculation of log attribution, historical log attribution can be corrected in time by modifying the public filtering keywords or a preset category of attribution keywords to improve the accuracy of attribution calculation. After the calculation of abnormal log attribution is completed, search for logs with the same hash value and keywords as the current one, then search for logs with different attributions, and finally modify the attribution of these incorrectly attributable logs.
[0138] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the abnormal log attribution method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0139] This application also provides an abnormal log attribution device, please refer to Figure 4 , the abnormal log attribution device includes:
[0140] An acquisition module 10 is used to acquire the abnormal log to be attributed after receiving the abnormal signal;
[0141] An extraction module 20 is used to check the abnormal log to be attributed and extract the corresponding key stack content;
[0142] The determination module 30 is used to extract the target keyword of the key stack content, compare the target keyword with the preset attribution keyword, and determine the responsible party of the abnormal log to be attributed.
[0143] And / or, the extraction module 20 includes:
[0144] A first checking module, used for checking the category of the abnormal log to be attributed;
[0145] A first extraction module is used for extracting the stack portion corresponding to the last exception backtrace identifier as the key stack content if the exception log to be attributed is a crash type log and contains the last exception backtrace identifier;
[0146] A second extraction module is used for checking whether the exception log to be attributed contains a crash thread identifier if the exception log to be attributed is the crash type log and does not contain the last exception backtrace identifier, and if it contains the crash thread identifier, extracting the stack portion corresponding to the crash thread identifier as the key stack content;
[0147] The third extraction module is used to extract part of the main thread stack as the key stack information if the abnormal log to be attributed is a jamming type log.
[0148] And / or, the determining module 30 includes:
[0149] A first retrieval module, used to retrieve the namespace of the key stack information to determine whether an application identifier exists;
[0150] a fourth extraction module, configured to extract target keywords according to a first extraction scheme corresponding to the first classification symbol if the namespace contains an application identifier and the method call space of the log to be attributed contains a first classification symbol;
[0151] a fifth extraction module, configured to extract the key stack information according to a second extraction scheme corresponding to the second classification symbol to obtain first stack extraction content if the namespace has an application identifier and the method call space does not contain the first classification symbol but has a second classification symbol, and if the first stack extraction content does not contain a third classification symbol, the first stack extraction content is the target keyword; otherwise, the target keyword is extracted according to a third extraction scheme corresponding to the third classification symbol;
[0152] a sixth extraction module, configured to extract the target keyword according to a preset fourth extraction scheme if the namespace contains an application identifier and the method call space does not contain the first classification symbol and the second classification symbol;
[0153] a seventh extraction module, configured to extract the target keyword according to a preset fifth extraction scheme if the namespace does not contain an application identifier and contains a preset second attribution keyword;
[0154] an eighth extraction module, configured to extract the target keyword according to a preset sixth extraction scheme if the key stack information does not contain an application identifier, the exception log to be attributed does not contain the last exception backtrace identifier, and does not contain an attribution keyword;
[0155] a ninth extraction module, configured 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 attributed contains the last exception backtrace 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 there is no application identifier in the key stack information, the exception log to be attributed contains the last exception backtrace identifier, and contains the application-specific information; if it contains the cause identifier, extract the target keyword according to the preset seventh extraction scheme; if it does not contain the cause identifier, extract the target keyword according to the preset eighth extraction scheme.
[0157] And / or, the determining module 30 includes:
[0158] A second retrieval module, when the key stack information is extracted from the crash type to-be-attributed exception log, retrieves each line of the key stack information;
[0159] A third search module is used for jumping to search the next row if the current row contains the preset filtering keyword, and for searching whether the current row contains the application identifier if the current row does not contain the preset filtering keyword;
[0160] A first attribution module is used to determine a target keyword according to the type of classification symbol if the current row contains the application identifier, compare the prefix word of the target keyword with the preset first attribution keyword to see if they are the same, if they are the same, determine that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword, if they are not the same, determine whether the target keyword contains the second attribution keyword, if it does, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword, otherwise, determine that the responsible party of the exception log to be attributed is the team corresponding to the main project;
[0161] A 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, and if so, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword; if not, and the exception log to be attributed does not contain the last exception backtrace identifier, and the current line is the last line of the critical stack information, determine that the responsible party of the exception log to be attributed is the public crash corresponding team; otherwise, confirm whether the exception log to be attributed contains the application-specific information;
[0162] a third attribution module, configured to extract the target keyword according to the sixth extraction scheme if the exception log to be attributed does not contain the application-specific information, and determine that the responsible party of the exception log to be attributed is a public crash corresponding team;
[0163] The fourth attribution module is used to extract the next line of content as the target keyword if the exception log to be attributed contains the application-specific information, and determine whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword; if they are not the same, it is determined whether the target keyword contains the second attribution keyword. If it is contained, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword; otherwise, it is retrieved whether the next line of the application-specific information contains a cause identification word. If it contains the cause identification word, the target keyword is extracted according to the preset seventh extraction scheme, and the responsible party of the exception log to be attributed is determined to be the public crash corresponding team; if it does not contain the cause identification word, the target keyword is extracted according to the preset eighth extraction scheme, and the responsible party of the exception log to be attributed is determined to be the public crash corresponding team.
[0164] And / or, the determining module 30 includes:
[0165] A fourth retrieval module is used to retrieve each line of the key stack information when the key stack information is extracted according to the main thread stack part content of the to-be-attributed exception log of the jam type;
[0166] A fifth search module, configured to jump to the next row for searching if the current row contains the filtering keyword, and to search whether the current row contains the application identifier if the current row does not contain the filtering keyword;
[0167] A fifth attribution module is used for determining a target keyword according to the type of classification symbol if the current row contains the application identifier, comparing the prefix vocabulary of the target keyword with the preset first jamming keyword to see whether they are the same, and if they are the same, determining that the responsible party of the exception log to be attributed is the team corresponding to the first jamming keyword; if not, retrieving whether the target keyword contains the preset second jamming keyword, and if so, determining that the responsible party of the exception log to be attributed is the team corresponding to the second jamming keyword; if neither of them is satisfied, determining that the responsible party of the exception log to be attributed is the team corresponding to the main project;
[0168] The sixth attribution module is used to retrieve whether the current line contains a preset second jamming keyword if the current line does not contain the application identifier; if it does, determine that the responsible party of the exception log to be attributed is the team corresponding to the second jamming keyword; if it does not contain the application identifier and the second jamming attribution keyword, determine that the responsible party of the exception log to be attributed is the team corresponding to the public jamming.
[0169] And / or, the abnormal log attribution device includes:
[0170] A first acquisition module, used to acquire a key stack hash value corresponding to the key stack content;
[0171] A sixth retrieval module, configured to retrieve, in the historical exception logs, a target historical log having a hash value and a keyword identical to the key stack hash value and the target keyword, according to the key stack hash value and the target keyword;
[0172] A first search module, configured to search for all attribution error history logs having the same hash value and keyword as the key stack content if the target history log is different from the responsible party of the key stack content;
[0173] The first modification module is used to modify the responsible party of the attribution error history log to be the responsible party corresponding to the key stack content.
[0174] The abnormal log attribution device provided by the present application adopts the abnormal log attribution method in the above embodiment, which can solve the technical problem of low maintenance efficiency of the application. Compared with the prior art, the beneficial effects of the abnormal log attribution device provided by the present application are the same as the beneficial effects of the abnormal log attribution method provided by the above embodiment, and other technical features in the abnormal log attribution device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0175] The present application provides an abnormal 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the abnormal log attribution method in the above-mentioned embodiment 1.
[0176] Reference below Figure 5, which shows a schematic diagram of the structure of an abnormal log attribution device suitable for implementing the embodiment of the present application. The abnormal log attribution device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, tablet computers, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The abnormal log attribution device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0177] like Figure 5 As shown, the abnormal log attribution device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the abnormal log attribution device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the abnormal log attribution device to communicate wirelessly or wired with other devices to exchange data. Although the abnormal log attribution device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided alternatively.
[0178] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0179] The abnormal log attribution device provided by the present application adopts the abnormal log attribution method in the above embodiment, which can solve the technical problem of low maintenance efficiency of the application program. Compared with the prior art, the beneficial effects of the abnormal log attribution device provided by the present application are the same as the beneficial effects of the abnormal log attribution method provided by the above embodiment, and the other technical features in the abnormal log attribution device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0180] It should be understood that the various parts disclosed in this application can be implemented by 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 one or more embodiments or examples in a suitable manner.
[0181] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0182] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the abnormal log attribution method in the above-mentioned embodiment.
[0183] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. 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 combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0184] The computer-readable storage medium may be included in the abnormal log attribution device; or may exist independently without being assembled into the abnormal log attribution device.
[0185] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the exception log attribution device, the exception log attribution device: after receiving the exception signal, obtains the exception log to be attributed; checks the exception log to be attributed and extracts the corresponding key stack content; extracts the target keyword of the key stack content, compares the target keyword with the preset attribution keyword, and determines the responsible party of the exception log to be attributed.
[0186] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0187] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0188] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0189] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned abnormal log attribution method, and can solve 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 by the present application are the same as the beneficial effects of the abnormal log attribution method provided by the above-mentioned embodiment, and will not be repeated here.
[0190] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned abnormal log attribution method when executed by a processor.
[0191] The computer program product provided by the present 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 by the present application are the same as the beneficial effects of the abnormal log attribution method provided by the above embodiment, which will not be repeated here.
[0192] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for attributing abnormal logs, characterized in that: The method includes: After receiving the abnormal signal, obtain the abnormal log to be attributed; Check the exception log to be attributed and extract the corresponding key stack content; A target keyword of the key stack content is extracted, and the target keyword is compared with a preset attribution keyword to determine the responsible party of the abnormal log to be attributed.
2. The method according to claim 1, characterized in that The step of checking the abnormal log to be attributed and extracting the corresponding key stack content includes: Checking the category of the abnormal log to be attributed; If the exception log to be attributed is a crash type log and contains a last exception backtrace identifier, extracting a stack portion corresponding to the last exception backtrace identifier as a key stack content; If the exception log to be attributed is the crash type log and does not contain the last exception backtrace identifier, then checking whether the exception log to be attributed contains the crash thread identifier, and if it contains the crash thread identifier, extracting the stack portion corresponding to the crash thread identifier as the key stack content; If the abnormal log to be attributed is a jamming type log, part of the main thread stack content is extracted as the key stack information.
3. The method according to claim 1, characterized in that The step of extracting target keywords from the key stack content includes: Retrieving the namespace of the key stack information to determine whether an application identifier exists; If the namespace contains an application identifier, and the method call space of the log to be attributed contains a first classification symbol, extracting the target keyword according to a first extraction scheme corresponding to the first classification symbol; If the namespace has an application identifier, and the method call space does not contain the first classification symbol, but has a second classification symbol, then the key stack information is extracted according to a second extraction scheme corresponding to the second classification symbol to obtain a first stack extraction content, and if the first stack extraction content does not contain a third classification symbol, then the first stack extraction content is the target keyword, otherwise the target keyword is extracted according to a third extraction scheme corresponding to the third classification symbol; If the namespace contains an application identifier, and the method call space does not contain the first classification symbol and the second classification symbol, extracting the target keyword according to a preset fourth extraction scheme; If the namespace does not contain an application identifier and contains a preset second attribution keyword, extracting the target keyword according to a preset fifth extraction scheme; If the key stack information does not contain an application identifier, the exception log to be attributed does not contain the last exception backtrace identifier and does not contain an attribution keyword, extracting the target keyword according to a preset sixth extraction scheme; If there is no application identifier in the key stack information, the exception log to be attributed includes the last exception backtrace identifier and does not include application-specific information, extracting the target keyword according to the sixth extraction scheme; If there is no application identifier in the key stack information, the exception log to be attributed contains the last exception backtrace identifier and the application-specific information, then the next line of the application-specific information is retrieved to see whether 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.
4. The method according to claim 1, characterized in that The step of extracting a target keyword from the key stack content, comparing the target keyword with a preset attribution keyword, and determining the responsible party of the abnormal log to be attributed includes: When the key stack information is extracted from the crash type to-be-attributed exception log, retrieving each line of the key stack information; If the current row contains the preset filtering keyword, then jump to search the next row; if not, then search whether the current row contains the application identifier; If the current row contains the application identifier, the target keyword is determined according to the type of classification symbol, and the prefix word of the target keyword is compared to see whether it is the same as the preset first attribution keyword. If they are the same, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword. If they are not the same, it is determined whether the target keyword contains the second attribution keyword. If it is included, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword. Otherwise, it is determined that the responsible party of the exception log to be attributed is the team corresponding to the main project. If the current line does not contain the application identifier, determine whether the current line contains the second attribution keyword; if so, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword; if not, and the exception log to be attributed does not contain the last exception backtrace identifier, and the current line is the last line of the critical stack information, determine that the responsible party of the exception log to be attributed is the public crash corresponding team; otherwise, confirm whether the exception log to be attributed contains the application-specific information; If the exception log to be attributed does not contain the application-specific information, extracting the target keyword according to the sixth extraction scheme, and determining that the responsible party of the exception log to be attributed is the public crash corresponding team; If the exception log to be attributed contains the application-specific information, extract the next line of content as the target keyword, and determine whether the starting word of the target keyword is the same as the first attribution keyword. If they are the same, determine that the responsible party of the exception log to be attributed is the team corresponding to the first attribution keyword. If they are not the same, determine whether the target keyword contains the second attribution keyword. If it does, determine that the responsible party of the exception log to be attributed is the team corresponding to the second attribution keyword. Otherwise, retrieve whether the next line of the application-specific information contains a cause identifier. If it contains the cause identifier, extract the target keyword according to the preset seventh extraction scheme, and determine that the responsible party of the exception log to be attributed is the public crash corresponding team. If it does not contain the cause identifier, extract the target keyword according to the preset eighth extraction scheme, and determine that the responsible party of the exception log to be attributed is the public crash corresponding team.
5. The method according to claim 1, characterized in that The step of extracting a target keyword from the key stack content, comparing the target keyword with a preset attribution keyword, and determining the responsible party of the abnormal log to be attributed includes: When the key stack information is extracted according to the main thread stack part content of the to-be-attributed exception log of the jam type, each line of the key stack information is retrieved; If the current row contains the filtering keyword, then jump to search the next row; if not, then search whether the current row contains the application identifier; If the current row contains the application identifier, the target keyword is determined according to the type of classification symbol, and the prefix word of the target keyword is compared with the preset first jamming keyword to see whether they are the same. If they are the same, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the first jamming keyword. If not, it is retrieved whether the target keyword contains the preset second jamming keyword. If it is included, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the second jamming keyword. If neither of them is satisfied, it is determined that the responsible party of the abnormal log to be attributed is the team corresponding to the main project. If the current line does not contain the application identifier, then the current line is retrieved to see whether it contains the preset second jamming keyword. If it does, then the responsible party for the exception log to be attributed is determined to be the team corresponding to the second jamming keyword. If it does not contain the application identifier and the second jamming keyword, then the responsible party for the exception log to be attributed is determined to be the team corresponding to the public jamming.
6. The method according to claim 1, characterized in that After the step of extracting the target keyword of the key stack content, comparing the target keyword with the preset attribution keyword, and determining the responsible party of the abnormal log to be attributed, the following steps are further included: Obtaining a key stack hash value corresponding to the key stack content; According to the key stack hash value and the target keyword, searching the historical exception log for a target historical log having a hash value and a keyword identical to the key stack hash value and the target keyword; If the target history log is different from the party responsible for the key stack content, then search for all attribution error history logs with the same hash value and keyword as the key stack content; The responsible party for modifying the attribution error history log is the responsible party corresponding to the critical stack content.
7. An abnormal log attribution device, characterized in that: The device comprises: An acquisition module is used to acquire the abnormal log to be attributed after receiving the abnormal signal; An extraction module, used to check the abnormal log to be attributed and extract the corresponding key stack content; The determination module is used to extract the target keyword of the key stack content, compare the target keyword with the preset attribution keyword, and determine the responsible party of the abnormal log to be attributed.
8. An abnormal log attribution device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the abnormal log attribution method according to any one of claims 1 to 6.
9. 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, the steps of the abnormal log attribution method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the abnormal log attribution method according to any one of claims 1 to 6 are implemented.
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
Abnormal log data processing method, system and equipment
CN114546700A
Exception handling method and system
CN117234762A
Method, Server and Computer Program for Crash Report Grouping
KR1020180138130A