Application software abnormal information processing method and device, electronic equipment and vehicle

By classifying and aggregating the exception information of the application software, aggregating exception files are formed, which solves the problems of cumbersome processing of exception files and waste of resources in the existing technology, and effectively eliminates errors.

CN119201533APending Publication Date: 2024-12-27GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411381914.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, the solution to a large number of exception files is determined separately, resulting in cumbersome operations and waste of resources.

Method used

By obtaining the file information of the original exception file generated by the application software, performing classification processing, aggregating exception files of the same type, forming an aggregated exception file, and then performing error exclusion processing based on the aggregated exception file.

Benefits of technology

This avoids the tedious operation of determining solutions in sequence for each exception file, reduces resource waste, and improves the efficiency of error elimination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201533A_ABST
    Figure CN119201533A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and provides an application software exception information processing method and device, electronic equipment and a vehicle. The method comprises the steps of obtaining file information of an original abnormal file after an error occurs in application software and the original abnormal file is generated; classifying the original abnormal files according to the file information to obtain classified abnormal files; performing aggregation processing on the same class of abnormal files in the classified abnormal files to obtain an aggregated abnormal file; and performing error elimination processing on errors occurring in the application software based on the aggregation exception file. Therefore, the errors occurring in the application software do not need to be eliminated by sequentially determining solutions on the basis of the original abnormal file, the errors occurring in the application software can be eliminated by directly adopting one solution on the basis of the aggregation abnormal file, and tedious operation can be avoided and resource waste can be reduced while the errors of the application software are eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, electronic device and vehicle for processing abnormal information of application software. Background Art

[0002] Different devices will generate and report abnormal files every time an application error occurs, which will generate a large number of abnormal files. However, in the process of troubleshooting errors in application software, it is cumbersome to determine solutions for a large number of abnormal files separately, which will waste resources.

[0003] In view of this, how to avoid determining solutions for a large number of abnormal files separately, which results in cumbersome operations and waste of resources, has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the purpose of the present disclosure is to propose a method, device, electronic device and vehicle for processing application software exception information, so as to solve the problem in the prior art of determining solutions for a large number of exception files separately, resulting in cumbersome operations and waste of resources.

[0005] Based on the above purpose, the first aspect of the present disclosure proposes a method for processing application software abnormal information, the method comprising:

[0006] After an error occurs in the application software and an original abnormal file is generated, obtaining file information of the original abnormal file;

[0007] Classify the original abnormal file according to the file information to obtain a classified abnormal file;

[0008] Aggregate the abnormal files of the same category in the classified abnormal files to obtain aggregated abnormal files;

[0009] Based on the aggregated exception file, error troubleshooting is performed on errors occurring in the application software.

[0010] Based on the same inventive concept, the second aspect of the present disclosure proposes a device for processing application software abnormal information, comprising:

[0011] An acquisition module is configured to acquire file information of the original abnormal file after an error occurs in the application software and the original abnormal file is generated;

[0012] A classification module is configured to classify the original abnormal file according to the file information to obtain a classified abnormal file;

[0013] An aggregation module is configured to aggregate the abnormal files of the same category in the classified abnormal files to obtain an aggregated abnormal file;

[0014] The error elimination processing module is configured to perform error elimination processing on errors occurring in the application software based on the aggregated exception file.

[0015] Based on the same inventive concept, the third aspect of the present disclosure proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.

[0016] Based on the same inventive concept, the fourth aspect of the present disclosure proposes a vehicle, which includes the device for processing application software abnormal information as described in the second aspect or the electronic device as described in the third aspect.

[0017] From the above, it can be seen that the present disclosure provides a method, device, electronic device and vehicle for processing application software exception information. After an error occurs in the application software and an original exception file is generated, the file information of the original exception file is obtained. The original exception file is classified and processed according to the file information to obtain a classified exception file. The same type of exception files in the classified exception file are aggregated to obtain an aggregated exception file. In this way, the aggregated exception files are all the same type of exception files, and a solution can be directly adopted to solve the errors of the same type of exception files. Errors that occur in the application software are eliminated based on the aggregated exception file. In this way, there is no need to determine solutions based on the original exception files in turn to eliminate the errors that occur in the application software. A solution can be directly adopted based on the aggregated exception file to eliminate the errors that occur in the application software, which can avoid cumbersome operations and reduce resource waste while eliminating application software errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flowchart of a method for processing abnormal information of application software according to an embodiment of the present disclosure;

[0020] Figure 2 A flowchart of a method for aggregating ANR information according to an embodiment of the present disclosure;

[0021] Figure 3 A schematic diagram of the structure of a device for processing abnormal information of application software according to an embodiment of the present disclosure;

[0022] Figure 4 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0024] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0025] The terms used in this disclosure are explained as follows:

[0026] ANR: Application Not Responding (ANR) is a common application error status in the Android system, indicating that the application cannot respond to user operations or system requests for a period of time. When an application has an ANR, the user will see a dialog box that says "Application Not Responding" and gives two options: wait or force close.

[0027] ANR file: ANR abnormal log file, usually refers to the log file generated by the system when no response occurs in the Android application, which is used to help developers diagnose problems. This file is generally named trace.txt and is located in the / data / anr / directory of the device (note that the specific file name and path may vary depending on different devices or Android versions).

[0028] Android application package name: Android application package name (Package Name) plays a vital role in Android application development. It is a string used to uniquely identify an Android application.

[0029] Main Thread: In Android development, the Main Thread plays a vital role and is often referred to as the UI Thread. Page drawing, click event response, etc. all run on this thread.

[0030] Exception Stack Trace: In programming languages ​​such as Java, the Exception Stack Trace is a collection of error messages automatically generated by the system when an exception occurs during program execution. This information is crucial for developers to locate and solve problems in the program.

[0031] Process Name: In an operating system, especially in Android or similar environments, a process name is an identifier used to uniquely identify or reference a specific running program or service.

[0032] Based on the description of the background technology, the reasons why different devices generate ANR may vary due to many factors such as device configuration, system version, specific implementation of the application, etc. Different devices will generate ANR information after each ANR occurs, and these ANR information will be reported, which will generate a large number of ANR records. However, many of these ANR problems belong to the same category of problems. For a category of problems, only one solution is needed to solve the problem. Therefore, how to scientifically aggregate these ANR records so that the aggregated records can be scientifically classified becomes a problem that needs to be solved.

[0033] As mentioned above, how to avoid determining solutions for a large number of abnormal files separately, which results in cumbersome operations and waste of resources, has become an important research issue.

[0034] Based on the above description, if Figure 1 As shown, the method for processing application software abnormal information proposed in this embodiment includes:

[0035] Step 101: After an error occurs in application software and an original abnormal file is generated, file information of the original abnormal file is obtained.

[0036] In specific implementation, after an error occurs in the application software, an abnormal log file (ANR file) of the application program not responding will be generated. Among them, the original abnormal file is an abnormal file directly generated after an error occurs in the application software.

[0037] The file information of the original exception file contains relevant exception information of the application software error. Among them, the file information of the original exception file includes: abnormal device identification information, application software type information, abnormal occurrence time information and basic information. The basic information includes: process name information, process control symbol information, application package name information, whether it is a foreground page information, abnormal page name information, abnormal type information and process stack information.

[0038] Step 102: classify the original abnormal file according to the file information to obtain a classified abnormal file.

[0039] In a specific implementation, the classified abnormal file is an abnormal file obtained by classifying the original abnormal file according to the file information.

[0040] According to the various file information, the original abnormal files are classified and processed in sequence according to a preset classification order to obtain classified abnormal files.

[0041] Step 103 , aggregating the abnormal files of the same type in the classified abnormal files to obtain aggregated abnormal files.

[0042] In a specific implementation, the aggregated exception file is an exception file obtained by aggregating exception files of the same type in the classified exception files.

[0043] Based on the classified abnormal files, the abnormal files of the same type are determined, and the abnormal files of the same type are aggregated to obtain aggregated abnormal files. In this way, the aggregated abnormal files are all abnormal files of the same type, and a solution can be directly used to solve the errors of the abnormal files of the same type.

[0044] Step 104: performing error troubleshooting on errors occurring in the application software based on the aggregated exception file.

[0045] In specific implementation, the aggregated exception files are all exception files of the same type. The cause of the exception is determined based on the exception files of the same type in the aggregated exception files, and a solution is determined based on the cause of the exception. Errors occurring in the application software are troubleshooted based on the solution.

[0046] In addition, developers can also troubleshoot errors that occur in application software based on aggregated exception files.

[0047] Through the above embodiments, the original abnormal files are classified and processed according to the file information to obtain the classified abnormal files. The abnormal files of the same type in the classified abnormal files are aggregated to obtain the aggregated abnormal files. In this way, the aggregated abnormal files are all abnormal files of the same type, and a solution can be directly adopted to solve the errors of the abnormal files of the same type. Error elimination processing is performed on the errors in the application software based on the aggregated abnormal files. In this way, there is no need to determine the solutions to eliminate the errors in the application software based on the original abnormal files in turn. A solution can be directly adopted to eliminate the errors in the application software based on the aggregated abnormal files, which can avoid cumbersome operations and reduce resource waste while eliminating the errors in the application software.

[0048] Get the file information of the original abnormal file. Extract the file information from the basic information of the original abnormal file. The specific process is as follows:

[0049] In some embodiments, step 101 includes:

[0050] Step 1011: Based on the application package name identifier, obtain the application package name information from the basic information of the original abnormal file.

[0051] Step 1012: based on the exception type identifier, obtain exception type information from the basic information of the original exception file.

[0052] Step 1013: Based on the process name identifier, obtain the process name information from the basic information of the original abnormal file.

[0053] Step 1014: Obtain process stack information according to the original exception file, and determine main thread stack information based on the process stack information.

[0054] Step 1015: Determine the time information of the abnormality occurrence according to the abnormality reporting time of the original abnormal file.

[0055] In specific implementation, the application package name information (Package Name) is a name used to uniquely identify an application. The exception type information (ANR type information) is the exception type of the application not responding. The process name information is usually determined by the executed function or the software to which it belongs. The process stack information refers to the space allocated in the memory of each process for storing function calls, local variables and temporary data. The exception occurrence time information is the exception reporting time when the application does not respond.

[0056] There are two types of APP: data_app_anr and system_app_anr. data_app_anr means that the abnormality is a common Android application, and system_app_anr means that the abnormality is a system-level Android application. In the Android system, the file information of the original abnormal file is stored in the form of "APP type + @ + time.txt.gz".

[0057] The received file information of the original abnormal file includes: abnormal device identification information, application software type information and abnormal occurrence time information. According to the abnormal reporting time of the original abnormal file, the abnormal occurrence time information in the file information of the original abnormal file is determined.

[0058] Based on these three fields, the address of the cloud file is queried from the database and the original abnormal file is downloaded. The basic information in the file information of the original abnormal file is extracted and processed to obtain the application package name information, abnormal type information, process name information and main thread stack information.

[0059] The original exception file contains a lot of file information, including: process control symbol information (process PID information), application package name information, process name information, whether it is the foreground page information, ANR page name information, exception type information and process stack information.

[0060] The read file information is parsed line by line. The specific extraction process is as follows:

[0061] Extract the Process keyword (process name identifier) ​​from the file information, and use the information of the line where the Process keyword is located as the process name information;

[0062] Extract the PID keyword (process control identifier) ​​from the file information, and use the information of the line where the PID keyword is located as the process PID information;

[0063] Extract the Package keyword (application package name identifier) ​​from the file information, and use the information of the line where the Package keyword is located as the application package name information;

[0064] Extract the Foreground keyword (foreground display status identifier) ​​from the file information, and use the information of the row where the Foreground keyword is located as the information of whether it is in the foreground display status;

[0065] Extract the Activity keyword (abnormal page name identifier) ​​from the file information, and use the information of the row where the Activity keyword is located as the ANR abnormal page name information;

[0066] Extract the Subject keyword (abnormal type identifier) ​​from the file information, and use the information of the row where the Subject keyword is located as the ANR abnormal type information.

[0067] By extracting the file information of the original exception file, we obtain six basic information including the application package name information (Package), exception type information (Subject), process name information (Process), process PID information (PID), whether it is displayed in the foreground (Foreground), and foreground page name information (Activity).

[0068] By extracting the file information of the original abnormal file, the process stack information can also be obtained, and the main thread stack information can be determined based on the process stack information.

[0069] Through the above scheme, based on the identification information, the file information can be accurately obtained from the basic information of the original exception file. Based on the application package name identification, the application package name information can be accurately obtained from the basic information of the original exception file. Based on the exception type identification, the exception type information can be accurately obtained from the basic information of the original exception file. Based on the process name identification, the process name information can be accurately obtained from the basic information of the original exception file. Based on the process stack information, the main thread stack information can be accurately determined. According to the exception reporting time of the original exception file, the exception occurrence time information can be accurately determined.

[0070] The original abnormal files are classified and processed according to the file information to obtain classified abnormal files. The specific process is as follows:

[0071] In some embodiments, the file information includes: application package name information, exception type information, process name information, main thread stack information and exception occurrence time information; step 102 includes:

[0072] Step 1021: Classify the original abnormal files according to the application package name information, and group the abnormal files with the same application package name in the original abnormal files into a group to obtain a first abnormal file.

[0073] In the specific implementation, in the Android system, the application package name information is used to identify the unique application, and different application software must have different application package name information. Therefore, the application package name information is first used for grouping, because different application software have different maintainers, and the abnormal files of different application software must belong to different types.

[0074] The application package name information is used to group and classify the abnormal files, and the abnormal files with the same application package name information in the original abnormal files are grouped into one group to obtain the first abnormal file.

[0075] Step 1022: Classify the first abnormal files according to the abnormal type information, and group the abnormal files with the same file type in the first abnormal files into one group to obtain second abnormal files.

[0076] In the specific implementation, in the Android system, the exception type information includes: input timeout information, broadcast timeout information, service timeout information and provider timeout information. Among them, the input timeout information can be further divided into 5 small scenarios. Different exception type information represents different application unresponsiveness scenarios, and the solutions to solve the problems must be different, so it is necessary to group them according to the dimension of exception type information.

[0077] Based on the exception type information, grouping and classification are performed, and the exception files with the same exception type information in the first exception files are merged into a group to obtain second exception files.

[0078] Step 1023: Classify the second abnormal files according to the process name information, and group the abnormal files with the same process name in the second abnormal files into one group to obtain third abnormal files.

[0079] In specific implementation, in the Android system, an Android application generally has a main process and may have multiple sub-processes. Even if the same ANR problem occurs between different processes, they need to be treated separately.

[0080] Based on the process name information, matching and classification are performed in a string method, and the abnormal files with the same process name information in the second abnormal file are merged into a group to obtain a third abnormal file.

[0081] Step 1024: Classify the third abnormal file according to the main thread stack information to obtain a fourth abnormal file.

[0082] In specific implementation, the exception stack represents the location where the code in the process is executed when the problem occurs. There are many processes in a process, and each process has unique stack information, so it is particularly important to select the stack information of which thread. Combined with the analysis of the Android system, it is confirmed that in the Android system, the main thread has the greatest impact on the ANR problem, so the main thread stack information is selected for grouping.

[0083] The main thread stack information is grouped and classified, and the abnormal files with the same main thread stack information in the third abnormal files are merged into one group to obtain a fourth abnormal file.

[0084] Step 1025: classify the fourth abnormal file according to the abnormal occurrence time information to obtain a classified abnormal file.

[0085] In specific implementation, when the time interval between the occurrence of exceptions is long, it means that the previous exceptions are ignored without modification or not completely repaired, which may make the ANR problem different.

[0086] The abnormal files in the fourth abnormal file whose abnormal occurrence time information is within a preset time range are grouped and classified based on the abnormal occurrence time information, so as to obtain classified abnormal files.

[0087] Through the above scheme, the original exception files are classified and processed in turn according to the application package name information, exception type information, process name information, main thread stack information and exception occurrence time information to obtain classified exception files. In this way, the original exception files can be classified from a larger dimension first, so that the original exception files can be distinguished as a whole, and those that are not completely the same type of exception problems can be distinguished first. Then the original exception files are classified from a smaller dimension, so that the original exception files are subdivided, so that the obtained classified exception files are more accurate, and the classified exception files are all the same type of exception problems, so that a solution can be used to solve the same type of classified exception files.

[0088] The third abnormal file is classified and processed according to the main thread stack information to obtain the fourth abnormal file. The specific process is as follows:

[0089] In some embodiments, step 1024 includes:

[0090] Step 1024A: extract an exception stack of a preset length from the main thread stack information.

[0091] Step 1024B: classify the third abnormal file according to the abnormal stack of the preset length.

[0092] Step 1024C: group the exception files with the same exception stack of a preset length in the third exception files into a group to obtain a fourth exception file.

[0093] In specific implementation, the content of the file information is matched line by line, and a line starting with ""main"prio=5tid=1" is found, which represents the beginning of the main thread stack information. Starting from this line, the matching continues line by line until the first empty line is found and ends. All the content in between is the main thread stack information.

[0094] The exception stack of the preset length may be the first 100 characters in the main thread stack information. The content of the main thread stack information is often relatively large, and a complete match consumes a large amount of resources. The first 100 characters in the main thread stack information can roughly determine the error situation. Therefore, the first 100 characters (if less than 100 characters, all characters) of the exception stack are selected for matching, and the exception files with the same exception stack in the third exception file are grouped into one group to obtain a fourth exception file.

[0095] Through the above solution, by extracting an exception stack of a preset length from the main thread stack information and classifying the third exception file according to the exception stack of the preset length, the third exception file can be accurately classified and matching resource consumption can be reduced.

[0096] The fourth abnormal file is classified and processed according to the abnormal occurrence time information to obtain a classified abnormal file. The specific process is as follows:

[0097] In some embodiments, step 1025 includes:

[0098] Step 1025A: classify the fourth abnormal file according to the abnormal occurrence time information.

[0099] Step 1025B: classify the abnormal files whose abnormal occurrence time information is less than a preset time length in the fourth abnormal files into a group to obtain classified abnormal files.

[0100] In specific implementation, when the time interval between the occurrence of anomalies is 30 days or more, it means that the previous anomalies are ignored without modification or not completely repaired.

[0101] The abnormality occurrence time information of the fourth abnormal file is sorted, and the files whose current abnormality occurrence time is less than 30 days from the first abnormality occurrence time are grouped together to obtain classified abnormality files.

[0102] Through the above scheme, based on the abnormality occurrence time information, the fourth abnormal file can be accurately classified, and the abnormal files with a short abnormality occurrence time interval can be grouped together, so that the obtained classified abnormal files are more accurate, and the classified abnormal files are all the same type of abnormal problems, so that one solution can be used to solve the same type of classified abnormal files.

[0103] The same type of abnormal files in the classified abnormal files are aggregated to obtain the aggregated abnormal files. The specific process is as follows:

[0104] In some embodiments, step 103 includes:

[0105] Step 1031, determining identification information of abnormal files of the same type in the classified abnormal files.

[0106] Step 1032: aggregate the abnormal files of the same type in the classified abnormal files to obtain aggregated abnormal files.

[0107] Step 1033: Record the aggregate exception file based on the identification information to obtain a recorded aggregate exception file.

[0108] In specific implementation, the abnormal files in the classified abnormal files all belong to a type of ANR problem and can be processed with the same solution.

[0109] Determine identification information (unique ID) of the same type of abnormal files in the classified abnormal files. Aggregate the same type of abnormal files in the classified abnormal files to obtain an aggregated abnormal file. Record the aggregated abnormal files based on the identification information to obtain a recorded aggregated abnormal file.

[0110] The recorded aggregate exception file can be expressed as: application package name information + exception type information + process name information + main thread exception stack information + first exception occurrence time information = summary content.

[0111] Through the above scheme, by aggregating the same type of abnormal files in the classified abnormal files, the aggregated abnormal files all contain the same type of abnormal problems, so that a solution can be used to solve the aggregated abnormal files. The aggregated abnormal files are recorded based on the identification information to obtain the recorded aggregated abnormal files, so that it is convenient for developers to understand the abnormal problems based on the identification information, and thus provide solutions to solve the aggregated abnormal files based on the abnormal problems.

[0112] The original abnormal files are classified and processed according to the file information to obtain the classified abnormal files. The original abnormal files can be classified and processed in sequence according to the multiple file information with the highest priority to the lowest priority. The specific process is as follows:

[0113] In some embodiments, the file information is multiple; step 102 includes:

[0114] Step 102A, based on the preset priorities, sort the multiple file information in descending order of priority to obtain multiple file information in descending order of priority.

[0115] Step 102B: classify the original abnormal files in sequence according to the plurality of file information with priorities from high to low, to obtain classified abnormal files.

[0116] In specific implementation, the pre-set priorities are set according to the grouping dimension from large to small.

[0117] For example, the pre-set priorities are, in descending order of priority: application package name information, exception type information, process name information, main thread stack information, and exception occurrence time information. The original exception file is classified and processed according to the application package name information to obtain a first exception file. The first exception file is classified and processed according to the exception type information to obtain a second exception file. The second exception file is classified and processed according to the process name information to obtain a third exception file. The third exception file is classified and processed according to the main thread stack information to obtain a fourth exception file. The fourth exception file is classified and processed according to the exception occurrence time information to obtain a classified exception file.

[0118] Through the above scheme, based on the preset priorities, the original abnormal files can be classified and processed in turn according to the multiple file information with the priorities from high to low to obtain the classified abnormal files. In this way, the original abnormal files can be classified from a larger dimension first, so that the original abnormal files can be distinguished as a whole, and the abnormal problems that are not completely of the same type can be distinguished first. Then the original abnormal files are classified from a smaller dimension, so that the original abnormal files are subdivided, so that the obtained classified abnormal files are more accurate, and the classified abnormal files are all the same type of abnormal problems, so that a solution can be used to solve the classified abnormal files of the same type.

[0119] Through the above embodiments, the original abnormal files are classified and processed according to the file information to obtain the classified abnormal files. The abnormal files of the same type in the classified abnormal files are aggregated to obtain the aggregated abnormal files. In this way, the aggregated abnormal files are all abnormal files of the same type, and a solution can be directly adopted to solve the errors of the abnormal files of the same type. Error elimination processing is performed on the errors in the application software based on the aggregated abnormal files. In this way, there is no need to determine the solutions to eliminate the errors in the application software based on the original abnormal files in turn. A solution can be directly adopted to eliminate the errors in the application software based on the aggregated abnormal files, which can avoid cumbersome operations and reduce resource waste while eliminating the errors in the application software.

[0120] It should be noted that the embodiments of the present disclosure may be further described in the following manner:

[0121] Figure 2 FIG. 1 is a flow chart of the method for aggregating ANR information according to an embodiment of the present disclosure. Figure 2 As shown, the method for aggregating ANR information includes:

[0122] Step 201: Input ANR file

[0123] Identification of ANR files: APP types include data_app_anr and system_app_anr. Among them, data_app_anr means that the abnormality is a common Android application, and system_app_anr means that the abnormality is a system-level Android application. In the Android system, ANR abnormal information is stored in the form of "APP type + @ + time.txt.gz".

[0124] The received information contains three fields: abnormal device ID, APP type, and abnormal time. Based on these three fields, the address of the cloud file is queried from the database and the ANR file is downloaded.

[0125] Step 202: Extract basic information from ANR files

[0126] The ANR file contains a lot of file information, such as process control symbol (process PID), application package name, process name, whether it is the foreground page, ANR page name, exception type, process stack and other information, so the second step is to extract these basic information from the file.

[0127] First, read the file content and parse it line by line. The specific extraction process is as follows:

[0128] If a line of text begins with "Process", the subsequent information is the process name information;

[0129] If a line of text begins with PID, the subsequent information is the process PID information;

[0130] If a line of text begins with Package, the subsequent information is the application package name;

[0131] If a line of text begins with Foreground, the subsequent information indicates whether it is in the foreground display state;

[0132] If a line of text begins with Activity, the subsequent information is the ANR exception page name information;

[0133] If a line of text begins with Subject, the subsequent information is ANR exception type information;

[0134] Through this basic information extraction, we can obtain 6 basic information including the process name information (Process), process PID information (PID), application package name information (Package), whether it is displayed in the foreground (Foreground), foreground page name information (Activity), and exception type information (Subject).

[0135] Step 203: Grouping based on the dimension of application package name information

[0136] In the Android system, the application package name is used to identify a unique application, and different applications must have different application package names. Therefore, we first group them by the dimension of application package name information, because different applications have different maintainers, and ANRs between different applications must belong to different types.

[0137] The application package name information (Package) extracted in step 2 is used for grouping and classification, and the abnormal files with the same application package name information in the original abnormal files are merged into one group to obtain the first abnormal file.

[0138] Step 204: Grouping based on the dimension of abnormal type information

[0139] In the Android system, there are four major types of ANRs: input timeout, broadcast timeout, service timeout, and provider timeout. The input timeout type can be further divided into five small scenarios. Different ANR types represent different application unresponsiveness scenarios, and the solutions to the problems must be different, so they need to be grouped according to the dimension of ANR type.

[0140] The abnormal type information (Subject) extracted in step 2 is used for grouping and classification, and the abnormal files with the same abnormal type information in the first abnormal files are merged into one group to obtain the second abnormal files.

[0141] Step 205: Grouping based on process name information

[0142] In the Android system, an Android application generally has a main process and may have multiple sub-processes. Even if the same ANR problem occurs between different processes, they need to be treated separately.

[0143] The process name information (Process) obtained in step 2 is used to match and classify using a string method, and the abnormal files with the same process name information in the second abnormal file are merged into a group to obtain a third abnormal file.

[0144] Step 206: Grouping based on the dimension of main thread stack information

[0145] The exception stack represents the location where the code in the process is executed when the problem occurs. There are many processes in a process, and each process has unique stack information, so it is particularly important to select the stack information of a thread. Combined with the analysis of the Android system, it is confirmed that in the Android system, the main thread has the greatest impact on the ANR problem, so the main thread stack information is selected for grouping.

[0146] Match the ANR content line by line, and find the line starting with "main" prio=5tid=1", which represents the beginning of the main thread stack. Because it starts with this line, continue to match line by line, and end with the first empty line. All the content in between is the main thread stack information. The content of the main thread stack information is often relatively large, and a complete match consumes a lot of resources. Choose to use the first 100 characters (if less than 100 characters, use all) of the exception stack for matching, and merge the exception files with the same exception stack in the third exception file into one group to obtain the fourth exception file.

[0147] Step 207: Grouping based on the dimension of abnormality occurrence time information

[0148] When the time interval between anomalies is 30 days or more, it means that the previous anomaly was ignored and not modified or not completely repaired.

[0149] The anomaly occurrence time is sorted, and the anomaly files whose current occurrence time is less than 30 days from the first occurrence time are grouped together to obtain classified anomaly files.

[0150] Step 208: Aggregate based on the grouping of the minimum dimension

[0151] The classified exception files grouped together belong to a type of ANR problem and can be solved using the same solution. For the same type of ANR problem, aggregate calculations are performed through steps 3 to 7 to generate identification information (unique ID) for recording, identifying it as a unique type of ANR problem. The generation algorithm is: application package name information + exception type information + process name information + main thread exception stack information + first exception occurrence time information = summary content, and then the summary content is compressed using the MD5 algorithm to generate a unique ID for recording, thereby obtaining the aggregated exception file after recording.

[0152] Through the above-mentioned embodiment, by aggregating a large number of ANR files and determining a unique type of ANR exception, the problem of repeatedly solving the same type of ANR, which causes cumbersome operations and waste of resources, is avoided.

[0153] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0154] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0155] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a device for processing application software exception information.

[0156] refer to Figure 3 , the device for processing application software abnormal information comprises:

[0157] The acquisition module 301 is configured to acquire file information of the original abnormal file after an error occurs in the application software and the original abnormal file is generated;

[0158] The classification module 302 is configured to classify the original abnormal file according to the file information to obtain a classified abnormal file;

[0159] Aggregation module 303, configured to aggregate the abnormal files of the same category in the classified abnormal files to obtain aggregated abnormal files;

[0160] The error elimination processing module 304 is configured to perform error elimination processing on errors occurring in the application software based on the aggregated exception file.

[0161] In some embodiments, the acquisition module 301 includes:

[0162] an application package name information acquisition unit, configured to acquire the application package name information from the basic information of the original abnormal file based on the application package name identifier;

[0163] an exception type information acquisition unit, configured to acquire the exception type information from the basic information of the original exception file based on the exception type identifier;

[0164] A process name information acquisition unit is configured to acquire the process name information from the basic information of the original abnormal file based on the process name identifier;

[0165] A main thread stack information acquisition unit is configured to acquire process stack information according to the original exception file, and determine the main thread stack information based on the process stack information;

[0166] The abnormality occurrence time information acquisition unit is configured to determine the abnormality occurrence time information according to the abnormality reporting time of the original abnormal file.

[0167] In some embodiments, the file information includes: application package name information, exception type information, process name information, main thread stack information, and exception occurrence time information;

[0168] The classification module 302 includes:

[0169] A first classification unit is configured to classify the original abnormal files according to the application package name information, and classify the abnormal files with the same application package name in the original abnormal files into a group to obtain first abnormal files;

[0170] A second classification unit is configured to classify the first abnormal files according to the abnormal type information, and classify abnormal files with the same file type in the first abnormal files into a group to obtain second abnormal files;

[0171] A third classification unit is configured to classify the second abnormal files according to the process name information, and classify the abnormal files with the same process name in the second abnormal files into a group to obtain third abnormal files;

[0172] a fourth classification unit, configured to classify the third abnormal file according to the main thread stack information to obtain a fourth abnormal file;

[0173] The fifth classification unit is configured to classify the fourth abnormal file according to the abnormality occurrence time information to obtain a classified abnormal file.

[0174] In some embodiments, the fourth classification unit comprises:

[0175] An extraction subunit is configured to extract an exception stack of a preset length from the main thread stack information;

[0176] a fourth classification subunit, configured to classify the third abnormal file according to the abnormal stack of the preset length;

[0177] The fourth abnormal file determining subunit is configured to group the abnormal files with the same abnormal stack of preset length in the third abnormal files into a group to obtain fourth abnormal files.

[0178] In some embodiments, the fifth classification unit comprises:

[0179] a fifth classification subunit, configured to classify the fourth abnormal file according to the abnormality occurrence time information;

[0180] The fifth abnormal file determining subunit is configured to group the abnormal files whose abnormal occurrence time information is less than a preset time length among the fourth abnormal files into a group to obtain classified abnormal files.

[0181] In some embodiments, the aggregation module 303 includes:

[0182] An identification information determining unit is configured to determine identification information of abnormal files of the same category in the classified abnormal files;

[0183] An aggregation unit is configured to aggregate the abnormal files of the same type in the classified abnormal files to obtain an aggregated abnormal file;

[0184] The recording unit is configured to record the aggregate exception file based on the identification information to obtain the recorded aggregate exception file.

[0185] In some embodiments, the file information is of multiple types;

[0186] The classification module 302 includes:

[0187] A sorting unit is configured to sort the multiple file information in descending order of priority based on a preset priority, to obtain multiple file information in descending order of priority;

[0188] The classification unit is configured to classify the original abnormal files in sequence according to the plurality of file information with priorities from high to low, to obtain classified abnormal files.

[0189] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0190] The device of the above embodiment is used to implement the corresponding method for processing application software abnormal information in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0191] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for processing application software exception information described in any of the above embodiments is implemented.

[0192] Figure 4A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0193] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0194] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0195] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0196] The communication interface 1040 is used to connect a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB (Universal Serial Bus), network cable, etc.), or through a wireless mode (such as mobile network, WIFI (Wireless Fidelity), Bluetooth, etc.).

[0197] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0198] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0199] The electronic device of the above embodiment is used to implement the corresponding method for processing application software abnormal information in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0200] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for processing application software exception information as described in any of the above embodiments.

[0201] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0202] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for processing application software abnormal information as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0203] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides a vehicle, including a device for processing application software exception information, or an electronic device, or a storage medium in the above-mentioned embodiments, and the vehicle equipment implements the method for processing application software exception information described in any of the above embodiments.

[0204] The vehicle of the above-mentioned embodiment is used to implement the method for processing application software abnormal information described in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0205] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0206] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0207] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0208] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present disclosure. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A method for processing abnormal information of application software, characterized in that: The method comprises: After an error occurs in the application software and an original abnormal file is generated, obtaining file information of the original abnormal file; Classify the original abnormal file according to the file information to obtain a classified abnormal file; Aggregate the abnormal files of the same category in the classified abnormal files to obtain aggregated abnormal files; Based on the aggregated exception file, error troubleshooting is performed on errors occurring in the application software.

2. The method according to claim 1, characterized in that The obtaining of file information of the original abnormal file includes: Based on the application package name identifier, obtaining the application package name information from the basic information of the original abnormal file; Based on the exception type identifier, obtaining exception type information from the basic information of the original exception file; Based on the process name identifier, obtaining process name information from the basic information of the original abnormal file; Acquire process stack information according to the original exception file, and determine main thread stack information based on the process stack information; The time information of the abnormality occurrence is determined according to the abnormality reporting time of the original abnormal file.

3. The method according to claim 1 or 2, characterized in that: The file information includes: application package name information, exception type information, process name information, main thread stack information and exception occurrence time information; The classifying and processing the original abnormal file according to the file information to obtain the classified abnormal file includes: Classify the original abnormal files according to the application package name information, and group the abnormal files with the same application package name in the original abnormal files into one group to obtain a first abnormal file; Classify the first abnormal files according to the abnormal type information, and group abnormal files with the same file type in the first abnormal files into a group to obtain second abnormal files; Classify the second abnormal files according to the process name information, and group abnormal files having the same process name in the second abnormal files into one group to obtain a third abnormal file; Classify the third abnormal file according to the main thread stack information to obtain a fourth abnormal file; The fourth abnormal file is classified according to the abnormal occurrence time information to obtain a classified abnormal file.

4. The method according to claim 3, characterized in that The classifying and processing the third abnormal file according to the main thread stack information to obtain a fourth abnormal file includes: Extracting an exception stack of a preset length from the main thread stack information; Classify and process the third abnormal file according to the abnormal stack of the preset length; The exception files with the same exception stack of preset length in the third exception files are grouped into one group to obtain a fourth exception file.

5. The method according to claim 3, characterized in that: The classifying the fourth abnormal file according to the abnormal occurrence time information to obtain the classified abnormal file includes: Classify and process the fourth abnormal file according to the abnormal occurrence time information; The abnormal files whose abnormal occurrence time information is less than a preset time length in the fourth abnormal files are grouped into one group to obtain classified abnormal files.

6. The method according to claim 1, characterized in that The aggregating the abnormal files of the same category in the classified abnormal files to obtain the aggregated abnormal files includes: Determine identification information of abnormal files of the same type in the classified abnormal files; Aggregate the abnormal files of the same category in the classified abnormal files to obtain aggregated abnormal files; The aggregate exception file is recorded based on the identification information to obtain a recorded aggregate exception file.

7. The method according to claim 1, characterized in that The file information is of various types; The classifying and processing the original abnormal file according to the file information to obtain the classified abnormal file includes: Based on the preset priorities, the plurality of file information are sorted in descending order of priority to obtain a plurality of file information in descending order of priority; According to the plurality of file information with priorities from high to low, the original abnormal files are classified and processed in sequence to obtain classified abnormal files.

8. A device for processing abnormal information of application software, characterized in that: include: An acquisition module is configured to acquire file information of the original abnormal file after an error occurs in the application software and the original abnormal file is generated; A classification module is configured to classify the original abnormal file according to the file information to obtain a classified abnormal file; An aggregation module is configured to aggregate the abnormal files of the same category in the classified abnormal files to obtain an aggregated abnormal file; The error elimination processing module is configured to perform error elimination processing on errors occurring in the application software based on the aggregated exception file.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A vehicle, characterized in that: Includes the device for processing application software abnormal information as described in claim 8 or the electronic device as described in claim 9.