Crash processing method and device, electronic equipment and storage medium
By obtaining the application's crash stack and merge association information, the merge request for the application crash can be automatically located, solving the problem of time-consuming manual location and improving the efficiency of crash handling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, manually locating the problem after an application crashes is time-consuming, resulting in low efficiency in problem-solving.
By obtaining the application's crash stack, extracting the crash location information, and searching for the merge request corresponding to the crash location information from the merge association information, the merge request that caused the crash can be automatically located.
It improves the efficiency of crash handling, enables automatic location of merge requests associated with application crashes, and reduces manual intervention time.
Smart Images

Figure CN121658264A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to computer technology, and more particularly to a crash handling method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of the internet, the demands on applications are increasing. After development, vulnerabilities may cause problems in the application. Given limited testing resources and rapid application releases, many issues inevitably get introduced into the production environment.
[0003] Currently, developers manually troubleshoot crashes using the code. However, this manual method is time-consuming and reduces efficiency. Therefore, automatically locating the root cause of problems is a pressing issue that needs to be addressed. Summary of the Invention
[0004] This disclosure provides a crash handling method, apparatus, electronic device, and storage medium to automatically locate merge requests associated with application crashes.
[0005] In a first aspect, embodiments of this disclosure provide a crash handling method, including:
[0006] Obtain the application's crash stack, which includes information about when the application crashed;
[0007] Extract the crash location information of the application from the crash stack;
[0008] From the merge association information corresponding to the application, find the merge request corresponding to the crash location information, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the application crash.
[0009] Secondly, embodiments of this disclosure also provide a crash handling apparatus, including:
[0010] The acquisition module is used to acquire the application's crash stack, which includes information about when the application crashed;
[0011] An extraction module is used to extract the crash location information of the application from the crash stack;
[0012] The lookup module is used to find the merge request corresponding to the crash location information from the merge association information corresponding to the application, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the crash of the application.
[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0014] One or more processing devices;
[0015] Storage device for storing one or more programs.
[0016] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the crash handling method provided in this disclosure.
[0017] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a crash handling method as provided in this disclosure.
[0018] In this embodiment, a crash stack is obtained when an application crashes, and then the crash location information is extracted from the crash stack. The crash location information is used to locate the corresponding merge request from the application's merge association information. The merge association information is then used to reverse-lookup the crash location information to pinpoint the merge request associated with the application crash. This achieves automatic location of the merge request that caused the crash, improving the efficiency of crash handling. Attached Figure Description
[0019] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 This is a schematic flowchart of a crash handling method provided in an embodiment of this disclosure;
[0021] Figure 2 This is a flowchart illustrating yet another crash handling method provided in this disclosure embodiment;
[0022] Figure 3 This is a schematic diagram illustrating the construction of merged and associated information provided in an embodiment of this disclosure;
[0023] Figure 4This is a schematic diagram illustrating the association between components, files, and symbols provided in an embodiment of this disclosure;
[0024] Figure 5 This is a schematic diagram of a reverse query process provided in an embodiment of this disclosure;
[0025] Figure 6 This is a schematic diagram of a crash handling device provided in an embodiment of this disclosure;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0029] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0032] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0033] Figure 1 This is a flowchart illustrating a crash handling method provided in an embodiment of this disclosure. This embodiment is applicable to situations where application crashes occur. The method can be executed by a crash handling device, which can be implemented in software and / or hardware, or optionally, by an electronic device, such as a server.
[0034] like Figure 1 As shown, the method includes:
[0035] S110, Get the application's crash stack.
[0036] A crash stack contains information about when the application crashes; it is a record of information generated when an application crashes, used for debugging and diagnosing program errors. A crash stack is generated when an application crashes. This operation can retrieve the application's crash stack from the client-side where the application resides.
[0037] After obtaining the crash stack transmitted from the application's endpoint, this operation can analyze the crash stack to pinpoint the source of the application crash.
[0038] S120. Extract the crash location information of the application from the crash stack.
[0039] Crash location information refers to information used to determine the specific location where an application crashes. Crash location information can include classes and methods within the application. It can also include specific lines of code within methods.
[0040] After obtaining the crash stack, this operation can parse the crash stack and retrieve the line that caused the application crash. From this line, the crash location information is extracted.
[0041] This section does not specify how to obtain the line that caused the application crash; for example, you can analyze the methods in the crash stack to find the functions associated with the crash.
[0042] After identifying the line that caused the application crash, you can retrieve the crash location information contained in that line, such as the class and method included in that line. If the crash location information includes lines, you can retrieve the lines associated with the crash from the crash stack trace, such as the specific lines under the methods in the crash location information.
[0043] After extracting the crash location information from the crash stack, this operation can be used to query the crash location information to locate the merge request that caused the crash in the application merge request, or to locate the specific line in the merge request that caused the crash.
[0044] S130. From the merge association information corresponding to the application, find the merge request corresponding to the crash location information.
[0045] Merge association information can be considered as a collection of information associated with a merge request. Merge association information includes content associated with at least one merge request of the application.
[0046] Once a portion of the functionality has been developed or the code has been modified, a merge request can be created. A merge request is a mechanism used to merge changes from one code branch (also known as the source branch, the branch containing the changes) into another branch (also known as the target branch, the branch to be merged into).
[0047] Each merge request involves code changes. During the development phase, merge association information can be generated for each merge request to include the content associated with the application's merge request.
[0048] The merge association information can include the content associated with each merge request from the application. The associated content can include the content modified in the merge request and the content that the modification may affect, so that when the application crashes, the merge request associated with the crash location information can be found from the merge association information to locate the merge request.
[0049] The merge requests corresponding to the crash location information include merge requests associated with the application crash, such as merge requests that may cause the application crash.
[0050] During the query process, this operation can match the corresponding content in the crash location information and the merge association information, and determine the merge request corresponding to the matched content as the merge request corresponding to the crash location information.
[0051] The storage structure for each piece of information in the merge association information can be classes and methods. For example, for each merge request, the storage includes the classes and methods that were changed by that merge request. The merge association information stores the relationships between the merge request and the changed classes and methods. During the query process, queries can be performed at the class and / or method dimensions to determine whether there are classes and / or methods in the merge association information that match the crash location information. If they do, the merge request corresponding to the matching content is identified as the merge request corresponding to the crash location information.
[0052] The merge association information can also store the rows modified by the merge request. During the query process, matching can be performed at the class, method, and row dimensions. For example, if the crash location information is the third row under method b in class a, the query can check if the third row under method b in class a exists in the merge association information. If it exists, the merge request corresponding to the third row under method b in class a is determined to be the merge request corresponding to the crash location information.
[0053] In one embodiment, the merge association information includes the differentiated content of each merge request change in at least one merge request and the upstream and downstream content affected by each differentiated content.
[0054] In a merge request, the differences can refer to the variations in the source branch compared to the target branch. For example, the differences between the merged application installation package and the original application installation package.
[0055] After merging the code in the merge request, the bytecode of the application installer generated by the merge request can be analyzed. By comparing the bytecode of the application installer generated by the merge request with the bytecode of the application installer before the merge, the differences can be identified, such as all classes, methods, and lines changed in the merge request.
[0056] This embodiment can use the differentiated content of each merge request in the application as merge association information.
[0057] Upstream and downstream content can be considered as content upstream or downstream of differentiated content. For example, content that is called by differentiated content or calls differentiated content. When the differentiated content is a method, upstream and downstream content can be methods that call the differentiated content and methods that are called by the differentiated content.
[0058] After identifying the differentiated content, the call chain for each differentiated content can be analyzed. This involves understanding the context in which the code was modified. The call chain of differentiated content can be considered a chain formed by the call relationships between the differentiated content. When the differentiated content is a method, the call chain can be a method call chain, such as the chain formed by the call relationships between a series of methods during application execution.
[0059] For example, the differentiated content is method b under class a. During the execution of the application, method a...
[0060] A method might be called by method c in class d, and method b in class a can also call method h in class f. The call chain can be a reference chain containing the call relationships between methods b, c, and h. Method c in class d and method h in class f can be considered upstream and downstream components of differentiated content.
[0061] When an application crashes, the crash can be directly caused by differentiated content, or it can be caused by differentiated content leading to crashes in upstream and downstream processes. For example, introducing method b under class a might cause method c of class d to fail during application execution, thus leading to a crash. Therefore, this embodiment can treat differentiated content and upstream and downstream content together as merged related information.
[0062] In this embodiment, when searching for merge-related information based on crash location information, queries can be performed simultaneously from differentiated content and upstream / downstream content. Alternatively, queries can be performed first from differentiated content, and then from upstream / downstream content. During the query process, all merge-related information can be traversed to find the merge request corresponding to the crash location information.
[0063] The technical solution of this disclosure involves obtaining the crash stack when an application crashes, and then extracting the crash location information from the crash stack. Using the crash location information, the merge request corresponding to the crash location is searched from the application's merge association information. By reverse-searching the merge association information using the crash location information, the merge request associated with the application crash is located, thus automatically locating the merge request that caused the crash and improving the efficiency of crash handling.
[0064] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0065] In one embodiment, the construction operation of merging associated information includes:
[0066] After any of the at least one merge request is merged, the differentiated content corresponding to the merge request and the upstream and downstream content corresponding to the merge request are determined.
[0067] Associate the differentiated content corresponding to the merge request with the upstream and downstream content corresponding to the merge request;
[0068] Add the associated content to the merged associated information.
[0069] After the merge request is merged, this embodiment can determine the differentiated content of the merge request. For example, by comparing the bytecode of the merged application installation package with the bytecode of the application installation package before the merge, the content changed in this merge request, i.e., the differentiated content, can be determined.
[0070] After identifying the differentiated content, we can determine the upstream and downstream content of the differentiated content, such as the call chain of the differentiated content, and use the content on the call chain as the upstream and downstream content of the differentiated content.
[0071] After determining the upstream and downstream content, the differentiated content of the merge request can be associated with, for example, bound to, the upstream and downstream content requests. This differentiated content and the upstream and downstream content can be used as metadata. Binding this metadata to the merge request facilitates subsequent reverse lookups by querying within the metadata. Once the metadata is matched, the merge request corresponding to the matched metadata is identified as the merge request corresponding to the crash location information. The metadata can be descriptive data; its specific content is not limited here, as long as it indicates the differentiated content and upstream and downstream content corresponding to the merge request.
[0072] After associating merge requests with differentiated content and upstream / downstream content, this association can be added to the merge association information, thereby making the merge association information include the content associated with multiple merge requests of the application.
[0073] In one embodiment, the crash location information includes the target class and the target method of the target class.
[0074] A target class can be considered as the class associated with the crash extracted from the crash stack trace. A target method can be considered as the method associated with the crash extracted from the crash stack trace. Both the target class and target method can be extracted from the lines in the crash stack trace that caused the root cause of the application crash.
[0075] This embodiment can query and merge requests from crash location information at the class and method levels.
[0076] First, query the merged association information based on the method to see if there is a matching method. If no matching method is found, then query the merged association information based on the class to see if there is a matching class.
[0077] In one embodiment, the crash location information further includes the target line under the target method.
[0078] The target line can be a line within the target method. This embodiment can pinpoint the crash location information to the line dimension, achieving more precise location.
[0079] During the query process based on the crash location information, it is possible to merge the related information of the target method under the target class to see if there is any content that matches it.
[0080] In one embodiment, the crash location information is hierarchical information representing the crash location, and the step of searching for the merge request corresponding to the crash location information from the merge association information corresponding to the application includes:
[0081] Starting from the lowest level in the hierarchical structure of the crash location information, the levels of the crash location information are selected sequentially according to the hierarchical relationship of the crash location information. For each selected level, a merge request corresponding to the crash location information of the level is searched from the merge association information corresponding to the application, until a merge request corresponding to the crash location information of the level is found.
[0082] Crash location information can be information that represents the location of a code crash in an application. This information can have a hierarchical relationship, such as a hierarchy from target class and target method to target line, where the target line can be considered the lowest level.
[0083] In this embodiment, when searching from merged related information based on crash location information, the search can proceed sequentially according to hierarchical relationships until a matching content is found. The crash location information selected each time can be the crash location information within the current level; for example, the lowest level crash location information can be the target line under the target method within the target class. The highest level crash location information can be the target class itself.
[0084] During the query process, operations are performed sequentially according to the hierarchical relationship, processing the lowest level first and then progressively moving upwards to higher levels. For each level processed, the merge request corresponding to the crash location information of the current level is retrieved from the application's merge association information. This search process continues, constantly querying the crash location information and merge association information of different levels until a merge request corresponding to the crash location information of the currently being processed level is found.
[0085] For example, suppose the hierarchical structure of the crash location information is target class - target method - target line. Starting from the lowest level, the target line, the search is performed within the merge association information to find the differentiating content or upstream / downstream content corresponding to the target line under the target method of the target class. If not found, the search moves up to the method level, continuing within the merge association information to find the differentiating content or upstream / downstream content corresponding to the target method of the target class. If still not found, the search moves up to the class level, and so on, until the corresponding merge request is found.
[0086] Figure 2 This is a flowchart illustrating yet another crash handling method provided in this disclosure embodiment, which details the operation of searching and merging requests. For example... Figure 2 As shown, the crash handling method includes the following operations:
[0087] S210, Get the application's crash stack.
[0088] S220. Extract the crash location information of the application from the crash stack.
[0089] S230. From the differentiated content corresponding to the application, find the differentiated content that matches the crash location information.
[0090] In this embodiment, the search process can begin by querying all differentiated content corresponding to the application. The search will then determine if any differentiated content matches the crash location information.
[0091] When identical differentiated content exists, the application crash can be considered to be directly caused by the differentiated content of the merge request.
[0092] During the query process, this operation can perform content matching to determine if the content is the same. For example, if the differentiated content is a method, it will search the differentiated information to see if the method exists. If the differentiated content is a row, it will search the differentiated information to see if the row exists. If the differentiated content is a class, it will search the differentiated information to see if the class exists.
[0093] S240. Determine whether there is any differentiated content that matches the crash location information. If yes, proceed to S250; otherwise, proceed to S260.
[0094] During the process of querying based on differentiated content, it can be determined whether differentiated content matching the crash location information is found. If it exists, it can be considered that the merge request has been located; if it does not exist, it means that this crash was not directly introduced by differentiated content.
[0095] S250. The merge request corresponding to the found differential content is determined to be the merge request corresponding to the crash location information, and the operation ends.
[0096] After finding the differentiated content that matches the crash location information, the merge request of the found differentiated content can be identified as the merge request corresponding to the crash location information, thus locating the merge request that caused the application crash.
[0097] S260. From the upstream and downstream content corresponding to the application, find the upstream and downstream content that matches the crash location information.
[0098] If no crash location information is found in the differentiated content, you can continue to query upstream and downstream information that matches the crash location information from the application's upstream and downstream content.
[0099] This operation sequentially checks upstream and downstream content for content matching the crash location information. The starting point of the query is not limited; it can be any position within the upstream and downstream content, or it can begin iterating from content adjacent to the corresponding differentiated content. This includes content directly called by the differentiated content or content that directly calls the differentiated content.
[0100] S270. Determine whether there is upstream or downstream content that matches the crash location information. If so, execute S280.
[0101] During the process of matching crash location information with upstream and downstream content, it can be determined whether there is upstream or downstream content in the merged related information that matches the crash location information. If it exists, the corresponding merge request can be identified; if it does not exist, manual location can be triggered.
[0102] S280. The merge request corresponding to the found upstream and downstream content is determined as the merge request corresponding to the crash location information.
[0103] When locating the content corresponding to the crash location information from upstream and downstream content, the merge request corresponding to the found upstream and downstream content can be identified as the merge request corresponding to the crash location information to complete the location. If matching upstream and downstream content exists, the application crash can be considered to be indirectly caused by the merge request.
[0104] This embodiment refines the operation of querying and merging related information. During the query process, it first searches from differentiated content, and then from upstream and downstream information, improving query efficiency. It allows for starting with the most likely location and then gradually delving into more complex situations, helping to ensure the comprehensiveness and accuracy of problem investigation.
[0105] The following is an exemplary description of this disclosure. The crash handling method provided in this disclosure can be considered as a method for automatically attributing crash problems. For example, in an Android scenario, it can quickly locate the problem and query the merge request that caused the problem, thereby improving the efficiency of problem solving and facilitating timely problem repair.
[0106] Figure 3 This is a schematic diagram illustrating the construction of merged and associated information according to an embodiment of this disclosure. See also... Figure 3For merge requests, after merging, the changes are broken down, such as into the differentiated content of the merge request changes: classes and methods. That is, the classes and methods changed by the merge request are extracted. Then, the context content is determined using the classes and methods as input parameters, identifying the differentiated content: the classes and methods called upstream and downstream of the classes and methods (i.e., the upstream and downstream content affected by the differentiated content). For example, the classes called upstream and downstream of a class are determined, and the methods called upstream and downstream of a method are determined, thus obtaining the upstream and downstream content. Then, the classes and methods after change decomposition are stored in the storage layer as differentiated content, and the classes and methods obtained after splitting into contexts are stored as upstream and downstream content.
[0107] The differential content involves comparing the bytecode of the base package before the merge request and the comparison package after the merge request to obtain all the bytecode information added in the merge request. The base package typically refers to the version before the merge request. The comparison package contains the changes to be merged. The comparison package is usually formed after a series of modifications on a development branch. For example, the binary file of the base package (Class files are binary files) is serialized into a string, the binary file of the comparison package is serialized into a string, and then the serialized content is subjected to differential analysis to obtain the differential content. The differential content can include the additions, deletions, and modifications made to the comparison package compared to the base package.
[0108] Figure 3 One way to determine the context content is to query the context associated with differentiated content (which can be in bytecode form), such as the method call chain of upstream and downstream code.
[0109] Figure 4 This is a schematic diagram illustrating the association between components, files, and symbols provided in an embodiment of this disclosure. See also... Figure 4 The components include component A, component B, and component C. Components A, B, and C have dependencies on each other. Component A contains file a, component B contains file b, and component C contains file c. File a contains symbols a1 and a2, file b contains symbols b1 and b2, and file c contains symbol c. Symbol a1 calls symbol b1, and symbol a2 calls symbol c.
[0110] Files can store code, including definitions and implementations of classes, methods, variables, etc. Classes defined in a file may have dependencies on each other. A class might call a method of another class or access its variables, thus establishing an internal dependency. Classes in a file may also depend on classes in other files. Dependencies can be established based on imports to allow the use of functionality from other classes in the code.
[0111] A component typically consists of multiple files and classes. A component can be considered a module with specific functionality or business logic. Files and classes are the concrete carriers that implement the component's functionality. Each file can contain one or more classes, which work together to accomplish the specific tasks undertaken by the component.
[0112] Classes within a file can define various symbols, such as variables, methods, and constants. These symbols are the concrete components of the class, used to implement the class's functionality. Components indirectly use these symbols through the included files and classes. The functionality of a component depends on the various symbols defined in the files and classes.
[0113] By importing another file, you can use code defined in the imported file in the current file. For example, if a file b imports another file c, and file b defines some methods or classes, then file c can directly use those methods or classes without having to rewrite the same code.
[0114] Figure 4 The document shows the calling relationships between symbols included in the file. Symbols can be methods, and these calling relationships make it easier to analyze upstream and downstream content.
[0115] Figure 5 This is a schematic diagram of a reverse lookup process provided in an embodiment of this disclosure. See also... Figure 5 When an application crashes, information about the crash location, such as the class and method, can be obtained from the crash stack trace. Figure 5 The target method Ab() queries the differentiated information (also known as differentiated content) of the merge request MapReduce (MR) to see if there is a method that matches the target method. If a match is found, the merge request corresponding to the matching method is identified as the merge request corresponding to the crash location information. In other words, a method matching the target method is found, and the corresponding merge request is determined. If no match is found in the differentiated information, the upstream and downstream content is searched to search the upstream and downstream links. If a match is found, the merge request corresponding to the matching upstream and downstream content is identified as the merge request corresponding to the crash location information. This achieves the goal of finding a method matching the crash location information from the upstream and downstream content and identifying the merge request corresponding to the method matching the crash location information as the merge request corresponding to the crash location information. If no match is found in the context content, the query is considered to have failed, triggering manual location. This achieves the goal of first querying the directly modified differentiated content and then searching the context. During the reverse query process, if the crash location information includes the target row, the row matching the target row can be located through the reverse query, facilitating more precise location.
[0116] Figure 6 This is a schematic diagram of a crash handling device provided in an embodiment of this disclosure, as shown below. Figure 6 As shown, a crash handling device includes:
[0117] The acquisition module 610 is used to acquire the crash stack of the application, the crash stack including information when the application crashed;
[0118] Extraction module 620 is used to extract the crash location information of the application from the crash stack;
[0119] The lookup module 630 is used to look up the merge request corresponding to the crash location information from the merge association information corresponding to the application, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the crash of the application.
[0120] The technical solution provided in this disclosure involves an acquisition module obtaining the crash stack when an application crashes, and an extraction module extracting the crash location information from the crash stack. A search module uses the crash location information to find the corresponding merge request from the application's merge association information. By reverse-searching the merge association information using the crash location information, the merge request associated with the application crash is located, thus automatically locating the merge request that caused the crash and improving the efficiency of crash handling.
[0121] In one embodiment, the merge association information includes the differentiated content of each merge request change in at least one merge request and the upstream and downstream content affected by each differentiated content.
[0122] In one embodiment, the lookup module 630 is specifically used for:
[0123] From the differentiated content corresponding to the application, find the differentiated content that matches the crash location information;
[0124] If there is differentiated content that matches the crash location information, the merge request corresponding to the found differentiated content is determined as the merge request corresponding to the crash location information; otherwise, the upstream and downstream content that matches the crash location information is searched from the upstream and downstream content corresponding to the application.
[0125] If there are upstream and downstream contents that match the crash location information, then the merge request corresponding to the found upstream and downstream contents will be determined as the merge request corresponding to the crash location information.
[0126] In one embodiment, the construction operation of merging associated information includes:
[0127] After any of the at least one merge request is merged, the differentiated content corresponding to the merge request and the upstream and downstream content corresponding to the merge request are determined.
[0128] Associate the differentiated content corresponding to the merge request with the upstream and downstream content corresponding to the merge request;
[0129] Add the associated content to the merged associated information.
[0130] In one embodiment, the crash location information includes the target class and the target method of the target class.
[0131] In one embodiment, the crash location information further includes the target line under the target method.
[0132] In one embodiment, the crash location information is hierarchical information representing the crash location, and the lookup module 630 is specifically used for:
[0133] Starting from the lowest level in the hierarchical structure of the crash location information, the levels of the crash location information are selected sequentially according to the hierarchical relationship of the crash location information. For each selected level, a merge request corresponding to the crash location information of the level is searched from the merge association information corresponding to the application, until a merge request corresponding to the crash location information of the level is found.
[0134] The crash handling apparatus provided in this disclosure can execute the crash handling method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0136] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Refer to the following... Figure 7 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 7 A structural diagram of the terminal device or server in the 500.
[0137] Electronic devices 500 include:
[0138] One or more processing devices 501;
[0139] Storage device 508, for storing one or more programs,
[0140] When the one or more programs are executed by the one or more processing devices 501, the one or more processing devices 501 implement the crash handling method provided in this disclosure.
[0141] The terminal devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0142] like Figure 7 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.
[0143] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0144] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0145] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0146] The electronic device provided in this embodiment and the crash handling method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0147] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the crash handling method provided in the above embodiments.
[0148] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof.
[0149] The computer storage medium may be a storage medium for computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in this disclosure.
[0150] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0151] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0152] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0153] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: obtain a crash stack of an application, the crash stack including information about when the application crashed;
[0154] Extract the crash location information of the application from the crash stack;
[0155] From the merge association information corresponding to the application, find the merge request corresponding to the crash location information, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the application crash.
[0156] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0158] The modules or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of modules or units do not necessarily limit the specific unit; for example, a module for obtaining data can also be described as a "crash stack acquisition module".
[0159] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0160] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0161] According to one or more embodiments of this disclosure, [Example 1] provides a crash handling method, including:
[0162] Obtain the application's crash stack, which includes information about when the application crashed;
[0163] Extract the crash location information of the application from the crash stack;
[0164] From the merge association information corresponding to the application, find the merge request corresponding to the crash location information, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the application crash.
[0165] According to one or more embodiments of this disclosure, Example 2 provides the method described in Example 1, wherein the merge association information includes differentiated content of each merge request change in at least one merge request and the upstream and downstream content affected by each differentiated content.
[0166] According to one or more embodiments of this disclosure, [Example 3] provides the method described in Example 2, wherein searching for the merge request corresponding to the crash location information from the merge association information corresponding to the application includes:
[0167] From the differentiated content corresponding to the application, find the differentiated content that matches the crash location information;
[0168] If there is differentiated content that matches the crash location information, the merge request corresponding to the found differentiated content is determined as the merge request corresponding to the crash location information; otherwise, the upstream and downstream content that matches the crash location information is searched from the upstream and downstream content corresponding to the application.
[0169] If there are upstream and downstream contents that match the crash location information, then the merge request corresponding to the found upstream and downstream contents will be determined as the merge request corresponding to the crash location information.
[0170] According to one or more embodiments of this disclosure, [Example 4] provides the method described in Example 2, wherein the construction operation of merging associated information includes:
[0171] After any of the at least one merge request is merged, the differentiated content corresponding to the merge request and the upstream and downstream content corresponding to the merge request are determined.
[0172] Associate the differentiated content corresponding to the merge request with the upstream and downstream content corresponding to the merge request;
[0173] Add the associated content to the merged associated information.
[0174] According to one or more embodiments of this disclosure, Example 5 provides the method described in Example 1, wherein the crash location information includes a target class and a target method of the target class.
[0175] According to one or more embodiments of this disclosure, Example 6 provides the method described in Example 5, wherein the crash location information further includes the target line under the target method.
[0176] According to one or more embodiments of this disclosure, [Example 7] provides the method of Example 5 or 6, wherein the crash location information is hierarchical information representing the crash location, and the step of searching for the merge request corresponding to the crash location information from the merge association information corresponding to the application includes:
[0177] Starting from the lowest level in the hierarchical structure of the crash location information, the levels of the crash location information are selected sequentially according to the hierarchical relationship of the crash location information. For each selected level, a merge request corresponding to the crash location information of the level is searched from the merge association information corresponding to the application, until a merge request corresponding to the crash location information of the level is found.
[0178] According to one or more embodiments of this disclosure, [Example 8] provides a crash handling apparatus, including:
[0179] The acquisition module is used to acquire the application's crash stack, which includes information about when the application crashed;
[0180] An extraction module is used to extract the crash location information of the application from the crash stack;
[0181] The lookup module is used to find the merge request corresponding to the crash location information from the merge association information corresponding to the application, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the crash of the application.
[0182] According to one or more embodiments of this disclosure, [Example 9] an electronic device is provided, the electronic device comprising:
[0183] One or more processing devices;
[0184] Storage device for storing one or more programs.
[0185] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the crash handling method as described in any of Examples 1-7.
[0186] According to one or more embodiments of this disclosure, [Example 10] provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a crash handling method as described in any of Examples 1-7.
[0187] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0188] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0189] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A crash handling method, characterized in that, include: Obtain the application's crash stack, which includes information about when the application crashed; Extract the crash location information of the application from the crash stack; From the merge association information corresponding to the application, find the merge request corresponding to the crash location information, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the application crash.
2. The method according to claim 1, characterized in that, The merge association information includes the differentiated content of each merge request change in at least one merge request and the upstream and downstream content affected by each differentiated content.
3. The method according to claim 2, characterized in that, The step of searching for the merge request corresponding to the crash location information from the merge association information corresponding to the application includes: From the differentiated content corresponding to the application, find the differentiated content that matches the crash location information; If there is differentiated content that matches the crash location information, the merge request corresponding to the found differentiated content is determined as the merge request corresponding to the crash location information; otherwise, the upstream and downstream content that matches the crash location information is searched from the upstream and downstream content corresponding to the application. If there are upstream and downstream contents that match the crash location information, then the merge request corresponding to the found upstream and downstream contents will be determined as the merge request corresponding to the crash location information.
4. The method according to claim 2, characterized in that, The operation for constructing the merged association information includes: After any of the at least one merge request is merged, the differentiated content corresponding to the merge request and the upstream and downstream content corresponding to the merge request are determined. Associate the differentiated content corresponding to the merge request with the upstream and downstream content corresponding to the merge request; Add the associated content to the merged associated information.
5. The method according to claim 1, characterized in that, The crash location information includes the target class and the target method of the target class.
6. The method according to claim 5, characterized in that, The crash location information also includes the target line under the target method.
7. The method according to claim 5 or 6, characterized in that, The crash location information is hierarchical information representing the crash location. The step of searching for the merge request corresponding to the crash location information from the merge association information corresponding to the application includes: Starting from the lowest level in the hierarchical structure of the crash location information, the levels of the crash location information are selected sequentially according to the hierarchical relationship of the crash location information. For each selected level, a merge request corresponding to the crash location information of the level is searched from the merge association information corresponding to the application, until a merge request corresponding to the crash location information of the level is found.
8. A crash handling device, characterized in that, include: The acquisition module is used to acquire the application's crash stack, which includes information about when the application crashed; An extraction module is used to extract the crash location information of the application from the crash stack; The lookup module is used to find the merge request corresponding to the crash location information from the merge association information corresponding to the application, wherein the merge association information includes content associated with at least one merge request of the application, and the merge request corresponding to the crash location information includes merge requests associated with the crash of the application.
9. An electronic device, characterized in that, The electronic device includes: One or more processing devices; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the crash handling method as described in any one of claims 1-7.
10. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the crash handling method as described in any one of claims 1-7.