Crash stack information processing method, device, equipment and storage medium

By judging and downloading the required dynamic libraries on the terminal device and symbolizing them, the problem of crash stack information that cannot be parsed due to the mismatch of dynamic library versions of IOS applications is solved, and the analysis efficiency and success rate are improved , and reduces storage costs.

CN114816816BActive Publication Date: 2025-02-07RUITING NETWORK TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210383836.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2025-02-07
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

During the operation of the IOS application, since the dynamic library version corresponds to the IOS firmware version, the dynamic library dependence of different firmware versions is different, resulting in the server device being unable to store all versions of the dynamic library, thus unable to properly parse the dynamic library due to calling the dynamic library The crash stack information generated.

Method used

By obtaining the system information of the terminal device, determine whether the target dynamic library exists locally. If it does not exist, download the firmware installation package corresponding to the target application and extract the target dynamic library, symbolize the target dynamic library, generate a symbolic information table, and locate it. The readability code information corresponding to the crash stack information.

Benefits of technology

Improves the parsing efficiency and success rate of crash stack information, saves storage space and reduces storage costs, and avoids parsing failures caused by the inability to store all dynamic library versions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816816B_ABST
    Figure CN114816816B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a crash stack information processing method, device, equipment and storage medium. In the embodiment of the present application, it can be determined whether the target dynamic library exists locally according to the system information of the terminal device; if not, the firmware installation package containing the target dynamic library corresponding to the target application can be downloaded, and the target dynamic library can be extracted from the installation package; then the target dynamic library is symbolized to obtain a symbolized information table containing the memory address range and readability code information corresponding to the binary code in the target dynamic library, and then the memory address range and readability code information contained in the symbolized information table are referred to to determine the readability code information corresponding to the memory address contained in the crash stack information, and use it as the problem code information, so as to solve the problem that the crash stack information generated by calling the target dynamic library cannot be parsed normally, thereby improving the parsing efficiency and success rate of the crash stack information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a crash stack information processing method, device, equipment and storage medium. Background Art

[0002] Applications developed based on IOS (referred to as IOS applications) may crash during operation, resulting in the inability to use the IOS application normally. For example, a terminal device may crash during the process of calling a dynamic library, and report the crash stack information generated by calling the dynamic library to the server device, which will parse the crash stack information generated by calling the dynamic library, and then prompt the developer to further improve the code of the IOS application based on the parsing results.

[0003] Among them, the server-side device needs to rely on the corresponding version of the dynamic library information to parse the crash stack information generated by calling the dynamic library. The dynamic library version corresponds to the IOS firmware version, and different firmware versions rely on different dynamic libraries. However, there are many IOS firmware versions, from IOS10 to IOS14, the number of firmware versions is more than 50, and many users use beta (test) versions, which involve more firmware versions. In actual applications, the server-side device may not be able to store all versions of dynamic libraries, resulting in the inability to properly parse the crash stack information generated by calling the dynamic library. Summary of the invention

[0004] Multiple aspects of the present application provide a crash stack information processing method, apparatus, device and storage medium to solve the problem that crash stack information generated by calling a dynamic library cannot be properly parsed, and improve the parsing efficiency and success rate of the crash stack information.

[0005] An embodiment of the present application provides a crash stack information processing method, comprising: obtaining crash stack information generated by a terminal device during the operation of a target application and system information of the terminal device, the system information pointing to a target dynamic library, the crash stack information being generated in the process of the target application loading binary code in the target dynamic library, and comprising a memory address pointing to the loaded binary code; if it is determined according to the system information that the target dynamic library does not exist locally, downloading a firmware installation package corresponding to the target application and comprising the target dynamic library, and extracting the target dynamic library from the firmware installation package; symbolizing the target dynamic library to obtain a symbolized information table, the symbolized information table comprising a memory address range and readability code information corresponding to the binary code in the target dynamic library; locating the readability code information corresponding to the crash stack information as problem code information according to the memory address range and readability code information contained in the symbolized information table and in combination with the memory address contained in the crash stack information.

[0006] The embodiment of the present application also provides a crash stack information processing device, including: an acquisition module, used to acquire crash stack information generated by a terminal device during the operation of a target application and system information of the terminal device, the system information pointing to a target dynamic library, the crash stack information is generated in the process of the target application loading the binary code in the target dynamic library, and includes a memory address pointing to the loaded binary code; an extraction module, used to download a firmware installation package corresponding to the target application and including the target dynamic library if it is determined according to the system information that the target dynamic library does not exist locally, and extract the target dynamic library from the firmware installation package; a symbolic processing module, used to symbolize the target dynamic library to obtain a symbolic information table, the symbolic information table including a memory address range and readability code information corresponding to the binary code in the target dynamic library; a positioning module, used to locate the readability code information corresponding to the crash stack information as problem code information based on the memory address range and readability code information included in the symbolic information table and the memory address included in the crash stack information.

[0007] An embodiment of the present application also provides a computer device, comprising: a memory and a processor; wherein the memory is used to store a computer program; and the processor is coupled to the memory and is used to execute the computer program to perform the steps in the above-described method.

[0008] The technical solutions provided by the embodiments of the present application are as follows: for crash stack information generated by a terminal device during the operation of a target application due to a call to a dynamic library, it can be determined whether the target dynamic library exists locally according to the system information of the terminal device; if not, a firmware installation package corresponding to the target application and containing the target dynamic library can be downloaded, and the target dynamic library can be extracted from the installation package; then, the target dynamic library is symbolized to obtain a symbolized information table containing a memory address range and readability code information corresponding to the binary code in the target dynamic library; then, the memory address range and readability code information contained in the symbolized information table are referred to to determine the readability code information corresponding to the memory address contained in the crash stack information, and use it as the problem code information, thereby solving the problem that the crash stack information generated by calling the target dynamic library cannot be parsed normally at present, thereby improving the parsing efficiency and success rate of the crash stack information.

[0009] Furthermore, in the embodiment of the present application, since all versions of dynamic libraries are no longer pre-downloaded and stored locally on the device used to parse the crash stack information, but are downloaded on demand when needed, disk storage space is saved and storage costs are reduced. Furthermore, in the embodiment of the present application, a method of symbolizing the target dynamic library is adopted, and then the readability code information corresponding to the memory address contained in the crash stack information is determined based on the memory address range and readability code information contained in the symbolized information table. Based on the symbolization method, the efficiency and accuracy of determining the problem code information can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0011] Figure 1 A schematic diagram of the structure of a crash stack information processing system provided by an exemplary embodiment of the present application;

[0012] Figure 2 A flowchart of a crash stack information processing method provided by an exemplary embodiment of the present application;

[0013] Figure 3 A schematic diagram of the structure of a crash stack information processing device provided by an exemplary embodiment of the present application;

[0014] Figure 4 A schematic diagram of the structure of a computer device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0016] The embodiment of the present application provides a solution. For crash stack information generated by a crash caused by calling a target dynamic library during the operation of a target application on a terminal device, it is determined whether the target dynamic library exists locally according to the system information of the terminal device. If not, a firmware installation package containing the target dynamic library corresponding to the target application is downloaded, and the target dynamic library is extracted from the firmware installation package, and the target dynamic library is symbolized to obtain a symbolized information table. If it exists, the locally existing target dynamic library is symbolized to obtain a symbolized information table. Thereafter, the readable code information corresponding to the crash stack information is located as the problem code information according to the information contained in the symbolized information table, thereby solving the technical problem that the existing crash stack information generated by calling the target dynamic library cannot be parsed, thereby improving the efficiency and success rate of parsing the crash stack information.

[0017] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0018] like Figure 1 The crash stack information processing system shown in the figure includes: a terminal device 11, a server device 12 and a development device 13; the target application is run on the terminal device 11, and if the target application crashes during operation, crash stack information will be generated. The terminal device 11 sends the crash stack information to the server device 12 corresponding to the target application, and the server device 12 executes the following Figure 2 The crash stack information processing method described in the illustrated embodiment locates the readable code information corresponding to the crash stack information as the problem code information. Since there are many reasons for the target application to crash during operation, for example, it may be due to the call of a problematic dynamic library code (for example, a dynamic library code with a vulnerability), or because of system reasons that cause an abnormal operating environment, etc. Among them, the problem with the dynamic library code is related to the writing process of the dynamic library code, so the crash stack information generated by calling the dynamic library code can be parsed to locate the problem code information in the dynamic library code, and the located problem code information can be sent to the development end device 13, and the developer on the development end device 13 side corrects the problem in the dynamic library code. After the problem in the dynamic library code is corrected, the development end device 13 updates the corrected dynamic library code to the target application on the terminal device 11, so that the target application can call the normalized dynamic library code in the subsequent operation process, thereby improving the operation quality of the target application.

[0019] It should be noted that the revised dynamic library code can be directly updated to the target application on each terminal device by the development end device 13, or the server end device 12 can be used as an update medium to update the revised dynamic library code to the target application on each terminal device through the server end device 12. For example, the development end device 13 can publish the revised dynamic library code to the official website or the server end device 12 in a patch mode, a plug-in mode, or a version update mode, and the terminal device downloads the revised dynamic library code from the official website or the server end device 12, and replaces the local existing dynamic library code to complete the update process of the dynamic library code. In the above example, the update of the dynamic library code is taken as an example, but it is not limited to this. For example, the revised dynamic library code can also be updated to the latest version of the firmware installation package, and the latest version of the firmware installation package is published on the official website or the server end device 12, and the terminal device downloads the latest version of the firmware installation package from the official website or the server end device 12, and uses the latest version of the firmware installation package to overwrite the existing version of the firmware installation package, complete the update iteration of the target application, and at the same time complete the update of the dynamic library code.

[0020] exist Figure 1 In the embodiment, the execution subject of the crash stack information processing method is the server device 12 corresponding to the target application, but the execution subject of the crash stack information processing method can also be other computer devices different from the server device 12, for example, it can also be a third-party server. Figure 2 The method flow shown is a detailed description of the crash stack information processing method provided in the embodiment of the present application.

[0021] Figure 2 The following is a flow chart of a crash stack information processing method provided by an exemplary embodiment of the present application. Figure 2 As shown, the method includes:

[0022] 101. Obtain crash stack information generated by the terminal device during the operation of the target application and system information of the terminal device, wherein the system information points to the target dynamic library, and the crash stack information is generated during the process of the target application loading the binary code in the target dynamic library, and includes a memory address pointing to the loaded binary code;

[0023] 102. If it is determined according to the system information that the target dynamic library does not exist locally, download a firmware installation package corresponding to the target application and including the target dynamic library, and extract the target dynamic library from the firmware installation package;

[0024] 103. Perform symbolic processing on the target dynamic library to obtain a symbolic information table, where the symbolic information table includes a memory address range and readable code information corresponding to the binary code in the target dynamic library;

[0025] 104. According to the memory address range and the readability code information included in the symbolized information table and in combination with the memory address included in the crash stack information, the readability code information corresponding to the crash stack information is located as the problem code information.

[0026] The target application can be run on the terminal device, and during the running process, a crash may occur due to various reasons. Regardless of the cause of the crash, a stack crash information will be generated. The embodiment of the present application does not limit the type of terminal device, for example, a smart phone, a laptop or a desktop computer. In addition, the type of target application is not limited, for example, game applications, financial applications, real estate applications, and real estate applications can be rental and sale applications, house viewing applications, etc.

[0027] After the crash problem occurs, it is necessary to locate the cause of the crash in order to further improve the code implementation and functional logic of the target application. Among them, one crash situation is caused by loading a dynamic library, which is also called a dynamic link library (Dynamic Link Library, referred to as DLL). DLL is a library containing code and data that can be used by multiple programs at the same time. DLL is not an executable file. DLL provides a method for a process to call functions that do not belong to its executable code. The DLL contains one or more functions that have been compiled, linked and stored separately from the processes that use them. DLL also helps to share data and resources, and multiple applications can access the contents of a single DLL copy in memory at the same time. The embodiments of the present application do not limit the types of dynamic libraries, for example, Mach-O Dynamic Library (DYLIB) and Framework. The functions or codes in these dynamic libraries are pre-written, and the dynamic libraries will vary depending on the system version of the terminal device.

[0028] The embodiment of the present application provides a method for processing crash stack information for a terminal device that crashes due to loading a dynamic library during the operation of a target application. The method is applied to other computer devices different from the terminal device, such as Figure 1The server device 12 in the system shown. During the operation of the target application, the binary code in the target dynamic library needs to be loaded. If a crash occurs during the process of loading the binary code in the target dynamic library, crash stack information will be generated. That is to say, the crash stack information in the embodiment of the present application refers to the crash stack information generated during the process of the target application loading the binary code in the target dynamic library, and the crash stack information contains the memory address pointing to the loaded binary code. In this embodiment, the terminal device where the target application is located will report the generated crash stack information and the system information of the terminal device to the execution subject of the method, that is, other computer devices different from the terminal device, such as the server device corresponding to the target application. Among them, the system information of the terminal device will point to the target dynamic library that causes the terminal device to generate the crash stack information. The system information of the terminal can be the version information of the operating system used by it, or the version information of the IOS firmware used by it, wherein the version of the operating system and the IOS firmware version have a certain corresponding relationship, and to a certain extent, it will determine the information of the IOS firmware version that can be used. Of course, in addition to the above information, the system information of the terminal device can also include hardware environment information, such as CPU hardware model, memory model, etc. It should be noted that the system information of the terminal device is different. For example, when using different versions of the operating system, the required version of the dynamic library will also be different. In other words, the version information of the dynamic library used by the terminal device is determined by the system information of the terminal device. Different versions of the operating system instruct the terminal device to use different versions of the dynamic library.

[0029] In this embodiment, in order to determine the problem that caused the target application to crash, the memory address of the loaded binary code can be determined based on the crash stack information, and the binary code with the problem can be determined according to the memory address of the loaded binary code. Specifically, on the one hand, the crash stack information generated by the terminal device during the operation of the target application is obtained, and on the other hand, the system information of the terminal device is obtained. First, it is determined whether the target dynamic library exists locally according to the system information of the terminal device.

[0030] In this embodiment, it can be determined whether the target dynamic library exists locally in the following manner: determine the target version information corresponding to the target dynamic library according to the system information of the terminal device; match the target version information with the version information of each dynamic library already in the local area; if the dynamic library corresponding to the target version information is not matched, determine that the target dynamic library does not exist locally; if the dynamic library corresponding to the target version information is matched, determine that the target dynamic library exists locally. Among them, the target dynamic library is the dynamic library corresponding to the target version information.

[0031] Optionally, the target version information corresponding to the target dynamic library is determined based on the system information, which can be achieved in the following way: according to the system information of the terminal device, query the mapping relationship table between the pre-maintained system information and the dynamic library version, determine the dynamic library version information corresponding to the system information, and use the dynamic library version information as the target version information. After the target version information is determined, the target version information is matched with the version information of each local dynamic library. For ease of understanding, the version information of each dynamic library is represented by uppercase English letters. For example, if the target version information is A, it is necessary to find out whether the version information A is included in the version information of each local dynamic library. If it is included, the version information of each local dynamic library can be matched with the same version information as the target version information. If it is not included, the version information of each local dynamic library cannot be matched with the same version information as the target version information.

[0032] Furthermore, if it is determined according to the system information that the target dynamic library does not exist locally, a firmware installation package corresponding to the target application and containing the target dynamic library is downloaded as needed, and the target dynamic library is extracted from the firmware installation package.

[0033] In an optional embodiment, downloading the firmware installation package containing the target dynamic library corresponding to the target application can be achieved in the following manner: obtaining the download address of the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application; downloading the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application according to the download address. Optionally, obtaining the download address of the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application can be achieved in the following manner: sending a data request to the official website or application server corresponding to the target application, wherein the data request carries the identification information of the target application, the identification information may include the name of the target application, and may further include the version information of the target application; determining the corresponding firmware installation package according to the identification information of the target application, the firmware installation includes the target dynamic library on which the target application depends; obtaining the download address of the firmware installation package corresponding to the target application from the download addresses of each firmware installation package maintained by the system, and returning it to the execution subject of the method, such as the server device. Taking obtaining the download address of the "a house viewing" installation package as an example, first send a data request containing the name and version information of the application to the official website or application server corresponding to the "a house viewing" application, then determine the corresponding installation package according to the name or version information of the "a house viewing" application, and then obtain the download address corresponding to the "a house viewing" application installation package from the download addresses of the numerous installation packages maintained by the system. After obtaining the download address, the firmware installation package containing the target dynamic library corresponding to the target application can be downloaded according to the download address.

[0034] In an optional embodiment, the firmware installation package is usually compressed and contains multiple compressed image files. Based on this, extracting the target dynamic library from the firmware installation package can be achieved in the following way: decompress the firmware installation package to obtain multiple compressed image files. The compressed image file is a single compressed file made of a specific series of files in a certain format, which can be recognized by specific software and can be directly burned to a CD to facilitate user download and use, and the compressed image file can be run on the terminal device without decompression. For example, the dmg compressed image file on the MAC device can be directly loaded and run on the MAC device. Multiple compressed image files are stored in a designated storage device. This embodiment does not limit the type of the designated storage device, for example, it can be a MongoDB database. Multiple compressed image files have different attribute information, and the attribute information at least includes information such as the name, type, and size of the storage space occupied by the file and its corresponding sub-file. After obtaining multiple compressed image files, the target compressed image file where the target dynamic library is located can be selected from the multiple compressed image files according to the attribute information, and the target compressed image file on the designated storage device is loaded, and the target dynamic library is extracted from the loaded target compressed image file. Among them, MongoDB is a database based on distributed file storage, which aims to provide a scalable, high-performance data storage solution for WEB applications. MongoDB is a database product between relational databases and non-relational databases, and is the most feature-rich database among non-relational databases. It supports a wide range of data structures, so it can store relatively complex data types. It can not only implement most of the functions of single-table queries in relational databases, but also support indexing of data.

[0035] In an optional embodiment, when the attribute information is the size of the storage space occupied by the compressed image file, the target compressed image file where the target dynamic library is located is selected according to the attribute information of multiple compressed image files, which can be achieved in the following way: from multiple compressed image files, the compressed image file that occupies the largest storage space is selected as the target compressed image file where the target dynamic library is located. In some application scenarios, such as the jpg scenario, the compressed image file of the dynamic library occupies the largest space. Therefore, in this scenario, the compressed image file that occupies the largest space is the compressed image file of the dynamic library, and there is no need to parse the compressed image file, and the selection speed is faster. However, the method of selecting the target compressed image file where the target dynamic library is located is not limited to this. For example, each compressed image file can also be parsed to obtain the name, type and other information of each compressed image file after parsing, and the target compressed image file where the target dynamic library is located is selected based on this information.

[0036] In this embodiment, although the firmware installation package contains the target dynamic library, the crash stack information cannot be directly parsed according to the target dynamic library. Therefore, after obtaining the target dynamic library, it is necessary to further solve the problem of how to parse the crash stack information based on the target dynamic library. In this embodiment, after extracting the target dynamic library from the firmware installation package, continue step 103, symbolize the target dynamic library, and obtain a symbolic information table, which contains the memory address range and readability code information corresponding to the binary code in the target dynamic library. Symbolic processing is a program analysis technology, which can obtain input for executing a specific code area by analyzing the program. When using symbolic processing to analyze a program, the program will use symbolic values ​​as input, rather than the specific values ​​used when executing the program in general. When obtaining the target code, the analyzer can obtain the corresponding path constraints, and then obtain the specific values ​​that can trigger the target code through the constraint solver. In the embodiment of the present application, there are many tools for symbolic processing of the target dynamic library, such as the symbolic processing tool symbolicatecrash that comes with Xcode. Xcode is an integrated development tool (IDE) that runs on the MAC OS X operating system. It is the fastest way to develop MACOS and IOS applications. It has a unified user interface design, and coding, testing, and debugging can all be done in a simple window.

[0037] In an optional embodiment, since the binary code is not readable and its specific meaning cannot be understood, it is necessary to symbolize the binary code to make it readable. Specifically, the target dynamic library is symbolized to obtain a symbolized information table, which can be achieved in the following way: reverse slicing the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form a symbolized information table. By symbolizing the target dynamic library, the problem of generating a large amount of useless information by extracting the dynamic library through firmware in the prior art can be avoided, thereby saving the disk storage space of the server and reducing storage costs. Among them, slicing is used to intercept part of arrays and strings. Slicing includes forward slicing and reverse slicing. Take Python as an example. The string name [start: end: step] (generally the step is 1) can output the content from the start to the previous step of the end, which can be expressed as Str = ['a', 'b', 'c']. When the start is 0, all the contents from the first element to the element before the end element will be output according to the step; when the start and end are both 0, all string elements will be output according to the step; when the end is 0, all the contents from the start element to the end of the string will be output according to the step; when the step < 0, an abnormal empty set will be output; after exchanging the start and end numbers, the correct result can be output. The slicing direction is determined by the positive and negative sign of the starting value. If the starting value is positive, it is called forward slicing, and the slicing direction is from front to back. If the starting value is negative, it is called reverse slicing, and the slicing direction is from back to front, and vice versa.

[0038] In an optional embodiment, the binary code contained in the target compressed image file is reversely sliced ​​to obtain the memory address range and readability code information corresponding to the binary code to form a symbolic information table. This can be achieved in the following way: according to the executable file format, the target compressed image file is structurally parsed to obtain the header information, multiple segment information and multiple area information contained in each segment information contained in the target compressed image file. The header information and each area information respectively contain part of the binary code in the target compressed image file. In this embodiment, there can be multiple executable file formats, such as the Mach-O file format. The Mach-O executable file includes header information, multiple segment information and multiple area information contained in each segment information. It merges one or more segments with similar attributes into one fragment. When loading, multiple segments with similar attributes can be mapped (paged) as a whole, thereby reducing page fragmentation. Then, the header information, each segment information and each area information are reverse sliced ​​by using a symbolic tool to obtain the memory start address and address offset corresponding to the header information, each segment information and each area information, each memory start address and address offset form a memory address range, and the method name and / or class name contained in the target compressed image file are parsed from the header information, each segment information and each area information as the readability code information. In this embodiment, the method name and class name contained in the target image file can be used as the readability code information separately, or a method name and the corresponding class name can be used as the readability code information at the same time. Then, according to the memory address range corresponding to the header information, each segment information and each area information, and the method name and / or class name parsed from the header information, each segment information and each area information, a symbolic information table is generated. By symbolizing the target dynamic library, the problem of generating a large amount of useless information by extracting the dynamic library through firmware in the prior art can be avoided, thereby saving the disk storage space of the server and reducing the storage cost.

[0039] In the above embodiment, the focus is on describing how to download the target dynamic library on demand and perform symbolic processing on the downloaded target dynamic library when the target dynamic library does not exist locally. Of course, if it is determined that the target dynamic library exists locally according to the system information of the terminal device, there is no need to download the target dynamic library, and the target dynamic library existing locally can be directly symbolized to obtain a symbolic information table. The process of directly symbolizing the target dynamic library existing locally is the same as the process of symbolizing in the above embodiment, and will not be repeated here.

[0040] In this embodiment, after obtaining the symbolized information table, the readability problem code information corresponding to the crash stack information can be located based on the memory address range and readability code information contained in the symbolized information table and the memory address contained in the crash stack information. The type of system crash and the problematic code in the dynamic library can be determined based on the problem code information, so as to correct the problematic code in the dynamic library. Considering that the dynamic library is part of the IOS application, the purpose of further improving the IOS application can be achieved.

[0041] In this embodiment, the problem code information is code information used to describe the problem that occurred. Based on the different reasons for the crash of the target application during operation, the types of problem code information are also different. For example, when the target application crashes due to problems in the dynamic library code during operation, the problem code information is the dynamic library code with problems; when the target application crashes due to system reasons causing an abnormal operating environment during operation, the problem code information is a code describing the system problem. The above reasons for the crash of the target application during operation and the corresponding types of problem code information are only exemplary and are not limited to this.

[0042] Further, after locating the problem code information, the problem can be corrected based on the problem code information. The correction method can be as follows: when the problem code information is a dynamic library code with a problem, the server-side device sends the dynamic library code with a problem to the development-side device, and the developer on the development-side device corrects the problem in the dynamic code library. After the problem in the dynamic code library is corrected, the development-side device re-updates the corrected dynamic code to the target application on the terminal device, so that the target application can call the normalized dynamic library code during subsequent operation, thereby improving the operation quality of the target application. When the problem code information is a code that describes a system problem, the server-side device sends the code that describes the system problem to the development-side device, and the developer on the development-side device corrects the problem in the system based on the code information that describes the system problem. After the problem in the system is corrected, the development end re-updates the corrected system to the terminal device, so that the target application can run normally in a sound system environment, thereby improving the operation quality of the system.

[0043] The technical solution provided by each embodiment of the present application is for crash stack information generated by calling a dynamic library during the operation of a target application by a terminal device. It can be determined whether the target dynamic library exists locally according to the system information of the terminal device; if not, a firmware installation package containing the target dynamic library corresponding to the target application can be downloaded, and the target dynamic library can be extracted from the installation package; then, the target dynamic library is symbolized to obtain a symbolized information table containing a memory address range and readability code information corresponding to the binary code in the target dynamic library, and then the memory address range and readability code information contained in the symbolized information table are referred to to determine the readability code information corresponding to the memory address contained in the crash stack information, and use it as the problem code information, so as to solve the problem that the crash stack information generated by calling the target dynamic library cannot be normally parsed in the prior art, thereby improving the parsing efficiency and success rate of the crash stack information.

[0044] Furthermore, in the embodiment of the present application, since all versions of dynamic libraries are no longer downloaded and stored locally on the device used to parse the crash stack information, but are downloaded on demand when needed, this saves the device disk storage space used to parse the crash stack information and reduces storage costs. Furthermore, in the embodiment of the present application, a method of symbolizing the target dynamic library is adopted, and then the readability code information corresponding to the memory address contained in the crash stack information is determined based on the memory address range and readability code information contained in the symbolized information table. Based on the symbolization method, the efficiency and accuracy of determining the problem code information can be improved.

[0045] Figure 3 A schematic diagram of the structure of a crash stack information processing device provided by an exemplary embodiment of the present application. Figure 3 As shown, the device comprises:

[0046] An acquisition module 31 is used to acquire crash stack information generated by a terminal device during the operation of a target application and system information of the terminal device, wherein the system information points to a target dynamic library, and the crash stack information is generated during the process of the target application loading a binary code in the target dynamic library, and includes a memory address pointing to the loaded binary code;

[0047] The extraction module 32 is used for downloading the firmware installation package corresponding to the target application and containing the target dynamic library, and extracting the target dynamic library from the firmware installation package if it is determined according to the system information that the target dynamic library does not exist locally;

[0048] A symbolic processing module 33, used for symbolic processing the target dynamic library to obtain a symbolic information table, wherein the symbolic information table contains a memory address range and readability code information corresponding to the binary code in the target dynamic library;

[0049] The positioning module 34 is used to locate the readability code information corresponding to the crash stack information as the problem code information according to the memory address range and readability code information included in the symbolized information table and the memory address included in the crash stack information.

[0050] Furthermore, when the extraction module 32 is used to extract the target dynamic library from the firmware installation package, it is specifically used to: decompress the firmware installation package to obtain multiple compressed image files, the multiple compressed image files are stored on a designated storage device, and the multiple compressed image files have different attribute information; according to the attribute information of the multiple compressed image files, select the target compressed image file where the target dynamic library is located, and load the target compressed image file on the designated storage device.

[0051] Furthermore, the attribute information is the size of the storage space occupied by the compressed image file. The extraction module 32, when used to select the target compressed image file where the target dynamic library is located according to the attribute information of the multiple compressed image files, is specifically used to: select the compressed image file that occupies the largest storage space from the multiple compressed image files as the target compressed image file where the target dynamic library is located.

[0052] Furthermore, when the symbolization processing module 33 is used to symbolize the target dynamic library and obtain the symbolization information table, it is specifically used to: perform reverse slicing processing on the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form the symbolization information table.

[0053] Furthermore, when the symbolization processing module 33 is used to perform reverse slicing processing on the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form the symbolization information table, it is specifically used to: perform structural analysis on the target compressed image file according to the executable file format to obtain the header information, multiple segment information and multiple area information contained in each segment information contained in the target compressed image file, wherein the header information and each area information respectively contain part of the binary code in the target compressed image file; use the symbolization tool to analyze the header information; The header information, each segment information and each region information are respectively subjected to reverse slicing processing to obtain the memory start address and address offset corresponding to the header information, each segment information and each region information, each memory start address and address offset forming a memory address range, and the method name and / or class name contained in the target compressed image file are parsed from the header information, each segment information and each region information as readable code information; the symbolized information table is generated according to the memory address range corresponding to the header information, each segment information and each region information, and the method name and / or class name parsed from the header information, each segment information and each region information.

[0054] Furthermore, the symbolization processing module 33 is further configured to: if it is determined according to the system information that the target dynamic library exists locally, perform symbolization processing on the target dynamic library existing locally to obtain a symbolization information table.

[0055] Furthermore, the extraction module 32 is also used to: determine the target version information corresponding to the target dynamic library based on the system information; match the target version information with the version information of each dynamic library already present locally; if the target version information is not matched, determine that the target dynamic library does not exist locally; if the target version information is matched, determine that the target dynamic library exists locally.

[0056] Furthermore, when the extraction module 32 is used to download the firmware installation package containing the target dynamic library corresponding to the target application, it is specifically used to: obtain the download address of the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application; and download the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application according to the download address.

[0057] For the specific implementation principles of the above-mentioned modules or units in the embodiments of the present application and the detailed implementation methods of each step, please refer to the description of the same or corresponding steps above, which will not be repeated here.

[0058] Figure 4 The schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown in FIG. Figure 4As shown, the computer device includes: a memory 40a and a processor 40b; wherein the memory 40a is used to store a computer program; the processor 40b is coupled to the memory 40a, and is used to execute the computer program to perform the following steps:

[0059] Acquire crash stack information generated by a terminal device during the running of a target application and system information of the terminal device, wherein the system information points to a target dynamic library, and the crash stack information is generated during the process of the target application loading a binary code in the target dynamic library, and includes a memory address pointing to the loaded binary code;

[0060] If it is determined according to the system information that the target dynamic library does not exist locally, downloading a firmware installation package corresponding to the target application and containing the target dynamic library, and extracting the target dynamic library from the firmware installation package;

[0061] Performing symbolic processing on the target dynamic library to obtain a symbolic information table, wherein the symbolic information table contains a memory address range and readability code information corresponding to the binary code in the target dynamic library;

[0062] According to the memory address range and readability code information included in the symbolized information table, in combination with the memory address included in the crash stack information, readability code information corresponding to the crash stack information is located as problem code information.

[0063] Furthermore, when the processor 40b is used to extract the target dynamic library from the firmware installation package, it is specifically used to: decompress the firmware installation package to obtain multiple compressed image files, the multiple compressed image files are stored on a designated storage device, and the multiple compressed image files have different attribute information; according to the attribute information of the multiple compressed image files, select the target compressed image file where the target dynamic library is located, and load the target compressed image file on the designated storage device.

[0064] Furthermore, the attribute information is the size of the storage space occupied by the compressed image file. When the processor 40b is used to select the target compressed image file where the target dynamic library is located according to the attribute information of the multiple compressed image files, it is specifically used to: select the compressed image file that occupies the largest storage space from the multiple compressed image files as the target compressed image file where the target dynamic library is located.

[0065] Furthermore, when the processor 40b is used to symbolize the target dynamic library and obtain the symbolized information table, it is specifically used to: perform reverse slicing processing on the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form the symbolized information table.

[0066] Further, when the processor 40b is used to perform reverse slicing processing on the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form the symbolized information table, it is specifically used to: perform structural analysis on the target compressed image file according to the executable file format to obtain the header information, multiple segment information and multiple area information contained in each segment information contained in the target compressed image file, wherein the header information and each area information respectively contain part of the binary code in the target compressed image file; and use a symbolization tool to analyze the header information, Each segment information and each region information is respectively subjected to reverse slicing processing to obtain the memory start address and address offset corresponding to the header information, each segment information and each region information, each memory start address and address offset form a memory address range, and parse the method name and / or class name contained in the target compressed image file from the header information, each segment information and each region information as readable code information; the symbolized information table is generated according to the memory address range corresponding to the header information, each segment information and each region information, and the method name and / or class name parsed from the header information, each segment information and each region information.

[0067] Furthermore, the processor 40b is further configured to: if it is determined according to the system information that the target dynamic library exists locally, perform symbolic processing on the target dynamic library existing locally to obtain a symbolic information table.

[0068] Furthermore, the processor 40b is also used to: determine the target version information corresponding to the target dynamic library based on the system information; match the target version information with the version information of each dynamic library already present locally; if the target version information is not matched, determine that the target dynamic library does not exist locally; if the target version information is matched, determine that the target dynamic library exists locally.

[0069] Furthermore, when the processor 40b is used to download the firmware installation package containing the target dynamic library corresponding to the target application, it is specifically used to: obtain the download address of the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application; and download the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application according to the download address.

[0070] Further, if Figure 4 As shown, the computer device also includes: a display 40c, a communication component 40d, a power component 40e, an audio component 40f and other components. Figure 4 Only some components are shown schematically, which does not mean that the electronic terminal only includes Figure 4 The electronic terminal of this embodiment can be implemented as a terminal device such as a desktop computer, a notebook computer, a smart phone or an IOT device.

[0071] For the specific implementation principles of the above-mentioned modules or units in the embodiments of the present application and the detailed implementation methods of each step, please refer to the description of the same or corresponding steps above, which will not be repeated here.

[0072] An exemplary embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the following steps:

[0073] Acquire crash stack information generated by a terminal device during the running of a target application and system information of the terminal device, wherein the system information points to a target dynamic library, and the crash stack information is generated during the process of the target application loading a binary code in the target dynamic library, and includes a memory address pointing to the loaded binary code;

[0074] If it is determined according to the system information that the target dynamic library does not exist locally, downloading a firmware installation package corresponding to the target application and containing the target dynamic library, and extracting the target dynamic library from the firmware installation package;

[0075] Performing symbolic processing on the target dynamic library to obtain a symbolic information table, wherein the symbolic information table contains a memory address range and readability code information corresponding to the binary code in the target dynamic library;

[0076] According to the memory address range and readability code information included in the symbolized information table, in combination with the memory address included in the crash stack information, readability code information corresponding to the crash stack information is located as problem code information.

[0077] Furthermore, when the processor is used to extract the target dynamic library from the firmware installation package, it is specifically used to: decompress the firmware installation package to obtain multiple compressed image files, the multiple compressed image files are stored on a designated storage device, and the multiple compressed image files have different attribute information; according to the attribute information of the multiple compressed image files, select the target compressed image file where the target dynamic library is located, and load the target compressed image file on the designated storage device.

[0078] Furthermore, the attribute information is the size of the storage space occupied by the compressed image file. When the processor is used to select the target compressed image file where the target dynamic library is located based on the attribute information of the multiple compressed image files, it is specifically used to: select the compressed image file that occupies the largest storage space from the multiple compressed image files as the target compressed image file where the target dynamic library is located.

[0079] Furthermore, when the processor is used to symbolize the target dynamic library and obtain the symbolized information table, it is specifically used to: perform reverse slicing processing on the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form the symbolized information table.

[0080] Further, when the processor is used to perform reverse slicing processing on the binary code contained in the target compressed image file to obtain the memory address range and readability code information corresponding to the binary code to form the symbolized information table, it is specifically used to: perform structural analysis on the target compressed image file according to the executable file format to obtain the header information, multiple segment information and multiple area information contained in each segment information, the header information and each area information respectively contain part of the binary code in the target compressed image file; use a symbolization tool to perform reverse slicing processing on the header information, each segment information and each area information respectively to obtain the memory start address and address offset corresponding to the header information, each segment information and each area information respectively, each memory start address and address offset form a memory address range, and parse the method name and / or class name contained in the target compressed image file from the header information, each segment information and each area information as the readability code information; generate the symbolized information table according to the memory address range corresponding to the header information, each segment information and each area information, and the method name and / or class name parsed from the header information, each segment information and each area information.

[0081] Furthermore, the processor is also used for: if it is determined according to the system information that the target dynamic library exists locally, symbolizing the target dynamic library existing locally to obtain a symbolized information table.

[0082] Furthermore, the processor is also used to: determine the target version information corresponding to the target dynamic library based on the system information; match the target version information with the version information of each dynamic library already present locally; if the target version information is not matched, determine that the target dynamic library does not exist locally; if the target version information is matched, determine that the target dynamic library exists locally.

[0083] Furthermore, when the processor is used to download the firmware installation package containing the target dynamic library corresponding to the target application, it is specifically used to: obtain the download address of the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application; and download the firmware installation package containing the target dynamic library from the official website or application server corresponding to the target application according to the download address.

[0084] For the specific implementation principles of the above modules or units and the detailed implementation methods of each step in the embodiment of the present application, please refer to the description of the same or corresponding steps above, and no further details will be given here.

[0085] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0086] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0089] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0090] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0091] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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, 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. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0092] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0093] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A crash stack information processing method, characterized in that: include: Acquire crash stack information generated by a terminal device during the running of a target application and system information of the terminal device, wherein the system information points to a target dynamic library, and the crash stack information is generated during the process of the target application loading a binary code in the target dynamic library, and includes a memory address pointing to the loaded binary code; Determine the target version information corresponding to the target dynamic library according to the system information, and match the target version information with the version information of each local dynamic library; If the target version information is not matched and it is determined that the target dynamic library does not exist locally, then downloading a firmware installation package corresponding to the target application and containing the target dynamic library, and decompressing the firmware installation package to obtain a plurality of compressed image files, wherein the plurality of compressed image files have different attribute information; and selecting a target compressed image file where the target dynamic library is located from the plurality of compressed image files according to the attribute information of the plurality of compressed image files, and loading the target compressed image file; Performing reverse slicing processing on the binary code contained in the target compressed image file to obtain a memory address range and readability code information corresponding to the binary code to form a symbolized information table, wherein the symbolized information table contains the memory address range and readability code information corresponding to the binary code in the target dynamic library; According to the memory address range and readability code information included in the symbolized information table, in combination with the memory address included in the crash stack information, readability code information corresponding to the crash stack information is located as problem code information.

2. The method according to claim 1, characterized in that The attribute information is the size of the storage space occupied by the compressed image file, and selecting the target compressed image file where the target dynamic library is located from the plurality of compressed image files according to the attribute information of the plurality of compressed image files includes: From the multiple compressed image files, a compressed image file occupying the largest storage space is selected as the target compressed image file where the target dynamic library is located.

3. The method according to claim 1, characterized in that The binary code contained in the target compressed image file is reversely sliced ​​to obtain the memory address range and readability code information corresponding to the binary code to form the symbolized information table, including: According to the executable file format, the target compressed image file is structurally parsed to obtain header information, multiple segment information, and multiple region information contained in each segment information, wherein the header information and each region information respectively contain part of the binary code in the target compressed image file; Using a symbolization tool to perform reverse slicing processing on the header information, each segment information and each region information, respectively, to obtain the memory start address and address offset corresponding to the header information, each segment information and each region information, each memory start address and address offset forming a memory address range, and parsing the method name and / or class name contained in the target compressed image file from the header information, each segment information and each region information as readable code information; The symbolized information table is generated according to the memory address ranges corresponding to the header information, each segment information and each area information, and the method name and / or class name parsed from the header information, each segment information and each area information.

4. The method according to claim 1, characterized in that Also includes: If the target version information is matched, it is determined that the target dynamic library exists locally.

5. The method according to any one of claims 1 to 4, characterized in that: Downloading a firmware installation package corresponding to the target application and containing the target dynamic library includes: Obtaining a download address of a firmware installation package containing the target dynamic library from an official website or application server corresponding to the target application; According to the download address, a firmware installation package including the target dynamic library is downloaded from an official website or an application server corresponding to the target application.

6. A crash stack information processing device, characterized in that: include: An acquisition module, used to acquire crash stack information generated by a terminal device during the operation of a target application and system information of the terminal device, wherein the system information points to a target dynamic library, and the crash stack information is generated during the process of the target application loading a binary code in the target dynamic library, and contains a memory address pointing to the loaded binary code; an extraction module, configured to determine target version information corresponding to the target dynamic library according to the system information, and match the target version information with the version information of each dynamic library already present locally; if the target version information is not matched, it is determined that the target dynamic library does not exist locally, then download a firmware installation package corresponding to the target application and containing the target dynamic library, and decompress the firmware installation package to obtain a plurality of compressed image files, wherein the plurality of compressed image files have different attribute information; and select a target compressed image file where the target dynamic library is located according to the attribute information of the plurality of compressed image files, and load the target compressed image file; A symbolization processing module, used for performing reverse slicing processing on the binary code contained in the target compressed image file to obtain a memory address range and readability code information corresponding to the binary code to form a symbolization information table, wherein the symbolization information table contains the memory address range and readability code information corresponding to the binary code in the target dynamic library; A positioning module is used to locate the readability code information corresponding to the crash stack information as the problem code information according to the memory address range and readability code information contained in the symbolized information table and the memory address contained in the crash stack information.

7. A computer device, characterized in that: include: A memory and a processor; wherein the memory is used to store a computer program; The processor is coupled to the memory and is configured to execute the computer program for performing the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps in the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method, device and system for processing stack address in crash file

    CN108334515A

  • Stack backtracking method and device, medium and equipment

    CN110502357A