Method and device for obtaining SDK abnormal information in application program
By analyzing the exception stack information of application crashes, marking and uploading SDK related information, it solves the problems of difficulty in locating SDK exception information and large amount of information in the existing technology, realizes timely and accurate screening and uploading of SDK exception information, and improves development Efficiency and quality monitoring.
Patent Information
- Application Number
- CN202110382345.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-09
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-04-09
AI Technical Summary
Existing technology has difficulty in accurately locating and filtering SDK abnormal information when an application crashes, resulting in developers being unable to repair problems in a timely manner. Large-scale reporting of crash information consumes traffic, poses the risk of infringement, and causes high maintenance costs.
By obtaining the exception stack information of the application crash, analyze whether it contains the characteristic characters of the SDK or confusing keywords, mark and store the relevant information, realize the precise positioning and screening of the SDK exception information, and upload the marked information to the exception analysis through the network system.
It achieves timely and accurate positioning of SDK abnormal information when the application crashes, shortens the developer's bug troubleshooting time, improves the efficiency of uploading abnormal information, avoids traffic consumption and potential infringement risks, and optimizes the quality monitoring and feedback process of the SDK. .
Smart Images

Figure CN113110952B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for obtaining SDK abnormal information in an application. Background Art
[0002] SDK (Software Development Kit) refers to a collection of development tools for building application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
[0003] After developing, maintaining, releasing, and connecting the SDK to external applications, it is necessary to proactively and timely learn about the operation and robustness of the SDK in the actual application (SDK host program). One of the key indicators is the crash rate. How to accurately locate and distinguish whether each program crash occurs in the SDK or the SDK host program becomes a problem that needs to be solved.
[0004] There are two main ways to obtain SDK crash data:
[0005] (1) Rely on manual testing by testers to ensure the robustness of the SDK. After the host program is released, rely on the host program's own crash monitoring and development feedback to obtain the SDK's operating status and crash data.
[0006] (ii) For mobile terminals using the Android system, the provided abnormal crash interface obtains all crash information of the host program, and then reports all the crash information to the docking system, which queries the crash data about the SDK in all the crash information.
[0007] Among them, in method (1), developers cannot get the running status of the SDK and accurate information about the crash in the first place, cannot fix the problem in time, and the response cycle to the host program is long. In method (2), the amount of crash information is large, and reporting all of it will consume a lot of traffic, which violates the lightweight principle of the Android system SDK, resulting in serious traffic consumption of the SDK; in addition, reporting all crash information of the host program, if it contains sensitive information, will pose a risk of infringement; reporting all crash information will cause high pressure and maintenance costs on backend services (such as SDK crash data analysis services); in addition, a large amount of redundant crash information will also cause great interference to the later analysis and location of the problem.
[0008] Therefore, how to accurately locate and filter SDK exception information when an application crashes has become an urgent problem to be solved. Summary of the invention
[0009] In view of this, the present invention provides a method and device for obtaining SDK exception information in an application, so that when the application crashes, the SDK exception information can be accurately located and screened in a timely manner from the crash information, thereby timely and accurately discovering the crash information related to the SDK, shortening the developer's bug (vulnerability) troubleshooting time for the application, and improving the efficiency of uploading exception information.
[0010] The technical solution of the present invention is achieved in this way:
[0011] A method for obtaining SDK exception information in an application, comprising:
[0012] Obtaining exception stack information about an application crash, wherein the application is a host program of the SDK;
[0013] Analyze the exception stack information to determine whether the exception stack information contains characteristic characters of the SDK;
[0014] The exception stack information containing the characteristic characters of the SDK is marked as SDK-related exception information for storage.
[0015] Further, the characteristic characters of the SDK include obfuscated keywords corresponding to the SDK;
[0016] The step of determining whether the exception stack information contains characteristic characters of the SDK includes:
[0017] Determining whether the exception stack information contains obfuscation keywords corresponding to the SDK;
[0018] The step of marking the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage includes:
[0019] Marking the exception stack information containing the obfuscated keywords corresponding to the SDK as the SDK-related exception information for storage;
[0020] The obfuscation keywords corresponding to the SDK are recorded in an obfuscation dictionary, and the obfuscation dictionary is used for code obfuscation of the application during the development phase.
[0021] Furthermore, the characteristic characters of the SDK include the name of the SDK;
[0022] The step of determining whether the exception stack information contains characteristic characters of the SDK includes:
[0023] Determine whether the exception stack information contains the name of the SDK;
[0024] The step of marking the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage includes:
[0025] The exception stack information including the name of the SDK is marked as the SDK-related exception information for storage.
[0026] Furthermore, the method further comprises:
[0027] Analyzing the exception stack information to determine whether the exception stack information contains the name of the application;
[0028] The exception stack information is classified according to whether the exception stack information contains the name of the application and whether the exception stack information contains characteristic characters of the SDK.
[0029] Further, the classification of the exception stack information according to whether the exception stack information contains the name of the application and whether it contains characteristic characters of the SDK includes:
[0030] If the exception stack information does not contain the name of the application but contains characteristic characters of the SDK, the exception stack information is classified as an SDK crash;
[0031] If the exception stack information contains both the name of the application and the characteristic characters of the SDK, the exception stack information is classified as an SDK-related crash;
[0032] If the exception stack information contains the name of the application program but does not contain the characteristic characters of the SDK, the exception stack information is classified as a host program crash;
[0033] If the exception stack information contains neither the name of the application nor the characteristic characters of the SDK, the exception stack information is classified as other types of crashes;
[0034] The SDK-related exception information includes exception stack information classified as the SDK crash and the SDK-associated crash.
[0035] Furthermore, the method further comprises:
[0036] The SDK related exception information is uploaded to the exception analysis system via the network.
[0037] Further, uploading the SDK related abnormal information to the abnormal analysis system via the network includes:
[0038] When the application is started again, the application uploads the SDK related exception information to the exception analysis system.
[0039] A device for obtaining SDK abnormal information in an application, comprising:
[0040] An exception stack information acquisition module is used to acquire exception stack information about an application crash, wherein the application is a host program of the SDK;
[0041] An exception stack information analysis module, used for analyzing the exception stack information to determine whether the exception stack information contains characteristic characters of the SDK;
[0042] The SDK abnormal information mark storage module is used to mark the abnormal stack information containing the characteristic characters of the SDK as SDK-related abnormal information for storage.
[0043] A non-volatile computer-readable storage medium stores instructions, which, when executed by a processor, cause the processor to execute the steps in the method for obtaining SDK exception information in an application as described in any one of the above items.
[0044] An electronic device, comprising:
[0045] at least one processor; and,
[0046] a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps in the method for obtaining SDK exception information in an application as described in any one of the above items.
[0048] It can be seen from the above scheme that the method and device for obtaining SDK abnormal information in the application of the present invention realizes the timely and automatic accurate positioning and screening of SDK abnormal information from the abnormal stack information recording the crash information when the application crashes, thereby shortening the time for developers to perform bug troubleshooting on the application. Among them, when using obfuscated keywords to obtain SDK abnormal information, the reported SDK-related abnormal information contains the content of obfuscated keywords. On the one hand, these obfuscated keywords have no specific meaning. Even if the SDK-related abnormal information in the reporting process is intercepted, the application cannot be deciphered. On the other hand, it can also avoid the unknown infringement risk that may be caused by uploading the relevant variable names and method names in the SDK without code obfuscation. The technical solution of the present invention realizes the timely and accurate automatic acquisition of SDK-related abnormal information, so that the developer of the SDK can timely know the running status and crash rate of the SDK, so as to quickly fix the problem and release a new version. The method and device for obtaining SDK abnormal information in the application of the present invention optimizes the quality monitoring and feedback process of the SDK in the application, and improves the overall efficiency of SDK abnormal troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of a method for obtaining SDK exception information in an application according to an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of an example process of determining and classifying SDK anomalies using an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of a device for obtaining SDK abnormal information in an application according to an embodiment of the present invention;
[0052] Figure 4 A flowchart of program development and SDK exception acquisition in combination with the method of an embodiment of the present invention;
[0053] Figure 5 Schematic diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0055] like Figure 1 As shown, the method for obtaining SDK exception information in an application provided by an embodiment of the present invention mainly includes the following steps:
[0056] Step a1, obtaining exception stack information about the application crash, wherein the application is a host program of the SDK;
[0057] Step a2, analyzing the exception stack information to determine whether the exception stack information contains characteristic characters of the SDK;
[0058] Step a3: Mark the exception stack information containing the characteristic characters of SDK as SDK-related exception information for storage.
[0059] The host program refers to the software environment where the SDK is located. That is, if an SDK needs to run in an application, then this application is the host program of the SDK. It should be noted that the same host program can contain multiple SDKs.
[0060] By adopting the method for obtaining SDK exception information in an application according to an embodiment of the present invention, in the exception stack information, the characteristic characters of the SDK are searched or matched to filter out the exception information related to the SDK, thereby achieving timely and accurate positioning and filtering of the SDK exception information from the exception stack information recording the crash information when the application crashes, thereby shortening the time for developers to perform bug troubleshooting on the application.
[0061] For applications under the Android system, Java is generally used for development. Java is a cross-platform, interpreted language. Java source code is compiled into intermediate "bytecode" and stored in class files. Due to the need for cross-platform, Java bytecode includes a lot of source code information, such as variable names and method names, and these names are used to access variables and methods. These symbols carry a lot of semantic information and can be easily decompiled into Java source code. Therefore, for programs developed in Java, in order to avoid the risks brought by decompilation, code obfuscation is generally used to convert Java code into meaningless letters and symbol combinations to increase the difficulty of code understanding. Even if the program after code obfuscation is decompiled, the decompiled code is difficult to understand.
[0062] Under the premise of the above code obfuscation means, in an optional embodiment, the characteristic characters of the SDK include obfuscation keywords corresponding to the SDK;
[0063] Determining whether the abnormal stack information contains the characteristic characters of the SDK in step a2 specifically includes: determining whether the abnormal stack information contains obfuscated keywords corresponding to the SDK;
[0064] Step a3 of marking the exception stack information containing the characteristic characters of SDK as SDK-related exception information for storage specifically includes: marking the exception stack information containing the obfuscated keywords corresponding to SDK as SDK-related exception information for storage;
[0065] Among them, the obfuscation keywords corresponding to the SDK are recorded in the obfuscation dictionary, and the obfuscation dictionary is used for code obfuscation during the development stage of the application.
[0066] In addition, in some special cases, code obfuscation is not required during software development, so that when the application crashes, the content in the exception stack information will directly reflect the meaningful or known information in the application (such as variable names, method names, etc.). Under this premise, in an optional embodiment, the characteristic characters of the SDK include the name of the SDK;
[0067] Determining whether the abnormal stack information contains the characteristic characters of the SDK in step a2 specifically includes: determining whether the abnormal stack information contains the name of the SDK;
[0068] Step a3 of marking the exception stack information containing the characteristic characters of SDK as SDK-related exception information for storage specifically includes: marking the exception stack information containing the name of SDK as SDK-related exception information for storage.
[0069] There are several possibilities for application crashes: first, a crash caused by the application (SDK's host program), and this crash is related to the SDK therein, and this crash is called an SDK-associated crash in the embodiment of the present invention; second, a crash caused by the application (SDK's host program), but this crash is not related to the SDK therein, and this crash is called a host program crash in the embodiment of the present invention; third, a crash caused by the SDK itself, and this crash is not related to the host program, and this crash is called an SDK crash in the embodiment of the present invention; fourth, the crash is neither caused by the application (SDK's host program) nor by the SDK therein, and this crash is called other types of crashes in the embodiment of the present invention. It should be noted that a system running an application (SDK's host program) may crash due to reasons other than the application. When such a crash occurs, exception stack information may also be generated, but the exception stack information at this time is not related to the running application and the SDK therein, so there is no information related to the application and the SDK therein in the exception stack information. In an optional embodiment, in order to confirm whether the crash is caused by the application (SDK's host program) or the SDK therein, it is necessary to execute the method for obtaining SDK exception information in the application according to an embodiment of the present invention once each time exception stack information is generated to determine whether the crash is related to the SDK's host program and / or the SDK therein.
[0070] Based on this, the method for obtaining SDK exception information in an application program according to an embodiment of the present invention may further include:
[0071] Step b1, analyzing the exception stack information to determine whether the exception stack information contains the name of the application;
[0072] Step b2: classify the exception stack information according to whether the exception stack information contains the name of the application and whether it contains characteristic characters of the SDK.
[0073] The above-mentioned step of determining whether the name of the application is included in the abnormal stack information (step b1) and the step of classifying the abnormal stack information (step b2) are performed after step a1. Specifically, the step of determining whether the name of the application is included in the abnormal stack information (step b1) can be performed between step a1 and step a2, between step a2 and step a3, or after step a3, and the step of classifying the abnormal stack information (step b2) can be performed between step a2 and step a3, or after step a3. Since the step of classifying the abnormal stack information (step b2) can only be performed on the premise of obtaining whether the name of the application is included in the abnormal stack information and whether the characteristic characters of the SDK are included, it is necessary to ensure that the step of classifying the abnormal stack information (step b2) is performed after the step of determining whether the name of the application is included in the abnormal stack information (step b1) and step a2.
[0074] In an optional implementation, step b2 specifically includes:
[0075] Step b21: if the exception stack information does not contain the name of the application but contains characteristic characters of the SDK, the exception stack information is classified as an SDK crash;
[0076] Step b22: if the exception stack information contains both the name of the application and the characteristic characters of the SDK, the exception stack information is classified as an SDK-related crash;
[0077] Step b23: if the exception stack information contains the name of the application program but does not contain the characteristic characters of the SDK, the exception stack information is classified as a host program crash;
[0078] Step b24: If the exception stack information contains neither the name of the application nor the characteristic characters of the SDK, the exception stack information is classified as other types of crashes.
[0079] The SDK-related exception information includes exception stack information classified as SDK crash and SDK-related crash.
[0080] There is no restriction on the execution order between the above steps b21 to b24. For the purpose of the embodiment of the present invention, it is necessary to focus on the SDK-related exception information of the application, so it is only necessary to mark the SDK crash and SDK-related crash screened out by steps b21 and b22. Based on the spirit of the embodiment of the present invention, if it is necessary to obtain the host program crash and / or other types of crash information of steps b23 and / or b24, it is necessary to mark the host program crash and / or other types of crash screened out by steps b23 and / or b24.
[0081] After filtering out SDK-related exception information, developers need to analyze the SDK-related exception information. However, the system that executes the application is often not a platform for performing exception analysis. Therefore, in a preferred embodiment, the SDK-related exception information needs to be transferred to the exception analysis platform. Based on this, the embodiment of the present invention may further include:
[0082] Upload SDK related exception information to the exception analysis system via the network, where the exception analysis system is the above-mentioned exception analysis platform.
[0083] In a preferred embodiment, uploading SDK related exception information to the exception analysis system via the network includes:
[0084] When the application is started again, the application uploads SDK-related exception information to the exception analysis system.
[0085] Since it is difficult to discover all the bugs in the application program during the program development stage, an exception may occur at any time, causing the application program to crash, whether during the development stage, the testing stage, or the later application stage. The method for obtaining SDK exception information in the application program according to the embodiment of the present invention can be applied to any of the development stage, the testing stage, and the application stage.
[0086] For example, during the development phase or the testing phase, when an application program installed in the test device crashes, the test device executes the method of the embodiment of the present invention, and the test device uploads SDK-related exception information to the exception analysis system through the network (the Internet or the local area network within the development and testing). Developers and maintenance personnel can analyze the SDK-related exception information through the exception analysis system and modify the program code in time to eliminate bugs.
[0087] For example, during the application stage, when an application installed in a user device crashes, the user device executes the method of an embodiment of the present invention, and the user device uploads SDK-related exception information to an exception analysis system through a network (Internet). Developers and maintenance personnel can analyze the SDK-related exception information through the exception analysis system to resolve the crash problem in the next program version.
[0088] In a preferred embodiment, the reporting of crash information is performed by the application itself, which does not require the development of related functions for the system running the application. When developing the application itself, the relevant crash information reporting function can be integrated into the application itself. However, when a crash occurs and the application is unexpectedly exited, the application cannot execute the currently generated crash information. Therefore, preferably, when the application is restarted, the application uploads the SDK-related abnormal information to the abnormal analysis system, so that the SDK-related abnormal information can be reported in time when the program is restarted. And in this way, in the development stage or the testing stage, the development and testing personnel only need to run the program again to report the SDK-related abnormal information, and no extra work is required. In the application stage, combined with the user's usage habits, when the application crashes and is unexpectedly exited, the user will open the application again, so it will not bring too many operation steps to the user and cause discomfort.
[0089] It should be further explained that, in the embodiment where the exception stack information includes obfuscated keywords corresponding to the SDK, the exception analysis system stores the obfuscation dictionary of the application. Based on the records in the obfuscation dictionary, the exception analysis system obtains corresponding meaningful variable names, method names and other information from the SDK-related exception information to assist development and maintenance personnel in analyzing the SDK-related exception information.
[0090] Figure 2 A process example of determining and classifying SDK anomalies using an embodiment of the present invention is shown, and the process example mainly includes the following steps.
[0091] Step c1, analyze the exception stack information, and then go to step c2.
[0092] In an optional embodiment, the abnormal stack information is analyzed line by line.
[0093] Step c2: determine whether the analysis result contains the name of the host program, if yes, execute step c3, otherwise execute step c4.
[0094] Step c3: determine whether the analysis result contains the name of the SDK and / or obfuscated keywords corresponding to the SDK. If yes, proceed to step c5; otherwise, proceed to step c6.
[0095] Step c4: determine whether the analysis result contains the name of the SDK and / or obfuscated keywords corresponding to the SDK. If yes, proceed to step c7; otherwise, proceed to step c8.
[0096] Step c5: classify the exception stack information as SDK-related crash, and then end the process of determining and classifying SDK exceptions.
[0097] Step c6: classify the exception stack information as a host program crash, and then end the SDK exception determination and classification process.
[0098] Step c7: classify the exception stack information as SDK crash, and then end the process of determining and classifying SDK exceptions.
[0099] Step c8: Classify the exception stack information as other types of crashes, and then end the SDK exception determination and classification process.
[0100] Wherein, step c8 is an optional step. When step c8 is not added, if the judgment result in step c4 is no, no subsequent related steps are executed (ie, the exception stack information is not classified).
[0101] In combination with the above method for obtaining SDK exception information in an application, an embodiment of the present invention further provides a device for obtaining SDK exception information in an application, such as Figure 3 As shown, including:
[0102] The exception stack information acquisition module 1 is used to acquire the exception stack information about the application crash, wherein the application is the host program of the SDK;
[0103] The exception stack information analysis module 2 is used to analyze the exception stack information to determine whether the exception stack information contains characteristic characters of the SDK;
[0104] The SDK abnormal information marking storage module 3 is used to mark the abnormal stack information containing the characteristic characters of SDK as SDK-related abnormal information for storage.
[0105] Hereinafter, taking an Android system application as an example, the method for obtaining SDK exception information in an application of the present invention is further described.
[0106] like Figure 4As shown, in the program development stage, the SDK source code (SDK Source Code) is used for compilation, and after the bytecode (Java Bytecode) is generated, the bytecode is obfuscated (using the ProGuard tool) using the custom obfuscation dictionary provided by the back-end system (a system that assists program development and / or provides related resources and / or performs exception analysis) to generate optimized bytecode (Optimized Java Bytecode), and then the optimized bytecode is compiled again (Dex compiler) to obtain the compiled bytecode, and finally the executable machine code (Machine Code) is generated. When the application (i.e., the executable machine code) is running and crashes, the only exception capture class Thread.UncaughtExceptionHandler provided by the Android system is relied on to obtain the detailed stack information of the crash. According to the policy issued by the back-end system (the back-end system includes the configuration policy management function), the captured exception stack information is used to obtain the SDK-related exception information. This process adopts the steps of the method for obtaining SDK exception information in the application described in the above implementation. Among them, in an optional embodiment, the name of the application (SDK host program) and the characteristic characters of the SDK (obfuscated keywords corresponding to the SDK) contained therein are parsed by performing a line-by-line scanning on the exception stack information; in an optional embodiment, first determine whether the exception stack information contains an application (SDK host program): if it contains, then continue to interpret whether the exception stack information contains obfuscated keywords corresponding to the SDK, if it contains obfuscated keywords corresponding to the SDK, then classify the exception stack information as SDK-related crash, if it does not contain obfuscated keywords corresponding to the SDK, then classify the exception stack information as host program crash; if it does not contain, then continue to interpret whether the exception stack information contains obfuscated keywords corresponding to the SDK, if it contains obfuscated keywords corresponding to the SDK, then classify the exception stack information as SDK crash, if it does not contain obfuscated keywords corresponding to the SDK, then classify the exception stack information as other types of crashes. The embodiment of the present invention is to obtain SDK abnormal information, in which the demand is SDK-related crash and SDK crash, so in the embodiment of the present invention, the abnormal stack information classified as SDK-related crash and SDK crash is marked and persisted in the SDK abnormal information database. When the application is started again, it is reported to the backend system through the network and stored by the data management module of the backend system, so that the abnormal analysis module in the backend system can analyze the reported SDK-related abnormal information. After the report is successful, the backend system can classify and summarize the crash information of different SDKs by the previously assigned keywords and notify the developers of different SDKs.
[0107] Based on the requirements, the policies issued by the backend system may include: whether to report all crash information, whether to enable SDK crash reporting, whether to enable SDK-associated crash reporting, whether to enable deduplication optimization, and reporting frequency limit.
[0108] An embodiment of the present invention also provides a non-volatile computer-readable storage medium, which stores instructions. When the instructions are executed by a processor, the processor executes each step of the method for obtaining SDK exception information in an application as described above.
[0109] The embodiment of the present invention also provides an electronic device for executing the method for obtaining SDK abnormal information in an application program, such as Figure 5 As shown, the electronic device includes: at least one processor 10 and a memory 20. The memory 20 is communicatively connected to the at least one processor 10, for example, the memory 20 and the at least one processor 10 are connected via a bus. The memory 20 stores instructions that can be executed by the at least one processor 10, and the instructions are executed by the at least one processor 10 so that the at least one processor 10 performs the various steps in the method for obtaining SDK exception information in the application as described above.
[0110] The method and device for obtaining SDK abnormal information in an application according to an embodiment of the present invention realizes timely and automatic accurate positioning and screening of SDK abnormal information from the abnormal stack information recording the crash information when the application crashes, thereby shortening the time for developers to troubleshoot bugs in the application. Among them, when using obfuscated keywords to obtain SDK abnormal information, the reported SDK-related abnormal information contains the content of obfuscated keywords. On the one hand, these obfuscated keywords have no specific meaning, and even if the SDK-related abnormal information in the reporting process is intercepted, the application cannot be deciphered. On the other hand, it can also avoid the unknown infringement risk that may be caused by uploading the relevant variable names and method names in the SDK without code obfuscation. The technical solution of the embodiment of the present invention realizes the timely and accurate automatic acquisition of SDK-related abnormal information, so that the developer of the SDK can timely know the running status and crash rate of the SDK, so as to quickly fix the problem and release a new version. The method and device for obtaining SDK abnormal information in an application according to an embodiment of the present invention optimizes the quality monitoring and feedback process of the SDK in the application, and improves the overall efficiency of SDK abnormal troubleshooting.
[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for obtaining SDK exception information in an application, comprising: Obtaining exception stack information about an application crash, wherein the application is a host program of the SDK; Analyze the exception stack information to determine whether the exception stack information contains characteristic characters of the SDK; Marking the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage; The characteristic characters of the SDK include obfuscated keywords corresponding to the SDK; The step of determining whether the exception stack information contains characteristic characters of the SDK includes: Determining whether the exception stack information contains obfuscation keywords corresponding to the SDK; The step of marking the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage includes: Marking the exception stack information containing the obfuscated keywords corresponding to the SDK as the SDK-related exception information for storage; The obfuscation keywords corresponding to the SDK are recorded in an obfuscation dictionary, and the obfuscation dictionary is used for code obfuscation of the application during the development phase.
2. The method for obtaining SDK abnormal information in an application according to claim 1, characterized in that: The characteristic characters of the SDK include the name of the SDK; The step of determining whether the exception stack information contains characteristic characters of the SDK includes: Determine whether the exception stack information contains the name of the SDK; The step of marking the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage includes: The exception stack information including the name of the SDK is marked as the SDK-related exception information for storage.
3. The method for obtaining SDK abnormal information in an application according to claim 1, characterized in that: The method further comprises: Analyzing the exception stack information to determine whether the exception stack information contains the name of the application; The exception stack information is classified according to whether the exception stack information contains the name of the application and whether the exception stack information contains characteristic characters of the SDK.
4. The method for obtaining SDK abnormal information in an application according to claim 3, characterized in that: The classifying of the exception stack information according to whether the exception stack information contains the name of the application and whether it contains characteristic characters of the SDK includes: If the exception stack information does not contain the name of the application but contains characteristic characters of the SDK, the exception stack information is classified as an SDK crash; If the exception stack information contains both the name of the application and the characteristic characters of the SDK, the exception stack information is classified as an SDK-related crash; If the exception stack information contains the name of the application program but does not contain the characteristic characters of the SDK, the exception stack information is classified as a host program crash; If the exception stack information contains neither the name of the application nor the characteristic characters of the SDK, the exception stack information is classified as other types of crashes; The SDK-related exception information includes exception stack information classified as the SDK crash and the SDK-associated crash.
5. The method for detecting SDK abnormal information in an application according to claim 1, characterized in that: The method further comprises: The SDK related exception information is uploaded to the exception analysis system via the network.
6. The method for detecting SDK abnormal information in an application according to claim 5, characterized in that: The step of uploading the SDK related abnormal information to the abnormal analysis system via the network includes: When the application is started again, the application uploads the SDK related exception information to the exception analysis system.
7. A device for obtaining SDK abnormal information in an application, characterized in that: include: An exception stack information acquisition module is used to acquire exception stack information about an application crash, wherein the application is a host program of the SDK; An exception stack information analysis module, used for analyzing the exception stack information to determine whether the exception stack information contains characteristic characters of the SDK; An SDK exception information mark storage module is used to mark the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage; The characteristic characters of the SDK include obfuscated keywords corresponding to the SDK; The step of determining whether the exception stack information contains characteristic characters of the SDK includes: Determining whether the exception stack information contains obfuscation keywords corresponding to the SDK; The step of marking the exception stack information containing the characteristic characters of the SDK as SDK-related exception information for storage includes: Marking the exception stack information containing the obfuscated keywords corresponding to the SDK as the SDK-related exception information for storage; The obfuscation keywords corresponding to the SDK are recorded in an obfuscation dictionary, and the obfuscation dictionary is used for code obfuscation of the application during the development phase.
8. A non-volatile computer-readable storage medium storing instructions, characterized in that: When the instruction is executed by a processor, the processor executes the steps in the method for obtaining SDK abnormal information in an application according to any one of claims 1 to 6.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps in the method for obtaining SDK exception information in an application as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Scrambling and obfuscating method for Lua language and decryption method
CN105354449A
Terminal program exception closing information processing method and device, and terminal
CN108052406A
Software security reinforcing method based on APP specification of Android system
CN108932436A
Crash aggregation method and device, medium and equipment
CN110489345A
Crash information statistical method and device, computer equipment and storage medium
CN110647472A
