Multi-platform mobile phone system application log reading and analyzing method and device
By introducing automated log reading and analysis technology into multi-platform mobile systems, the problems of consistency of multi-platform log reading and inconsistent log data formats are solved, efficient log analysis and exception alarm notification are realized, and the efficiency of application maintenance and user experience are improved.
Patent Information
- Application Number
- CN202411709432.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art has poor compatibility, inconsistent log formats and insufficient analysis functions when performing log reading and analysis in multi-platform mobile systems, which makes it difficult for developers and testers to provide consistent log reading and analysis in multiple platform environments, increasing the cost and risk of application maintenance.
It provides a multi-platform mobile system application log reading and analysis method. Through automated log reading technology and analysis capabilities, it obtains and records the device information, system information and system version of mobile phone equipment, reads the log and converts it into a unified JSON format, and performs advanced analysis and exception alarm notifications.
It realizes consistency of multi-platform log reading, solves the problem of inconsistent log data format, enhances log analysis function, reduces the work of manual analysis by developers, improves the efficiency of problem diagnosis and performance optimization, and reduces the risk of system failure.
Smart Images

Figure CN119621667A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile phone application log analysis, and in particular to a method and device for reading and analyzing application logs of a multi-platform mobile phone system. Background Art
[0002] As mobile phones become more and more popular, mobile phone operating systems have also shown significant diversification with the increase in mobile phone manufacturers. At present, the main mobile phone systems in China are Apple (IOS) and Android systems. Among them, the Android systems of domestic mobile phone manufacturers are different, such as: Huawei's Hongmeng operating system (HarmonyOS), Xiaomi's MIUI system, OPPO's ColorOS system, vivo's OriginOS system, Meizu's Flyme OS system, Honor's MagicOS system, etc. To ensure the compatibility of various systems is also the top priority at present, so in the development and testing stages, it is necessary to be able to intercept and process system warnings and error logs in advance, so as to ensure that online applications can be accessed smoothly on the current system to the greatest extent, improve user experience and satisfaction, and increase the number of users and user stickiness of the APP.
[0003] At present, log reading mainly relies on the log reading methods provided by various manufacturers or operating systems. For example, Apple (IOS) log reading requires the help of the Xcode editor in the Apple computer (Mac), the Android system generally uses the Android Studio development tool, and the Hongmeng operating system of Huawei phones needs to use the HUAWEI DevEco Studio development tool, etc. However, testing and regression are required in the development, testing and pre-release stages. Due to limited resources, developers and testers cannot frequently switch different software and mobile devices for sufficient testing and verification, which may cause some potential problems to be discovered after release, thereby increasing the cost and risk of application maintenance. At the same time, the existing technology also has the following disadvantages:
[0004] First, the compatibility of multiple platforms is poor. When developing on multiple platforms, due to the different platform operating systems, the differences in system architecture and log mechanisms make it difficult for developers to provide consistent log reading and analysis on multiple platforms. At the same time, due to limited human and time resources, it is impossible to develop and test different devices of multiple systems at the same time during development, which leads to the complexity of cross-platform log management.
[0005] Second, the log data format is not unified; the log formats generated by different platforms and devices are different, and the existing technology lacks a unified standard. Developers often need to develop different parsing and analysis methods for each platform, which increases the complexity of data processing and makes the data processing process complicated and difficult to maintain.
[0006] Third, the log analysis function is insufficient. The log analysis function in existing development tools is often relatively basic and limited to simple text search or filtering. When faced with massive amounts of log data, there is a lack of advanced automated analysis and statistical functions. It is difficult for relevant personnel to quickly extract valuable information from a large amount of log data, which affects the efficiency of problem diagnosis and performance optimization.
[0007] Therefore, how to invent a multi-platform mobile phone system application log reading and analysis method to solve the consistency problem of multi-terminal log reading and the problem of inconsistent log data format and enhance the log analysis function has become an urgent problem to be solved. Summary of the invention
[0008] To this end, the present invention provides a multi-platform mobile phone system application log reading and analysis method and device, which solves the consistency problem of multi-terminal log reading and the problem of inconsistent log data format by introducing automated log reading technology and analysis capabilities, and enhances the log analysis function.
[0009] In order to achieve the above object, the present invention provides the following technical solution: a method for reading and analyzing application logs of a multi-platform mobile phone system, comprising:
[0010] Obtain and record device information, system information and system version of a mobile device, wherein the mobile device is connected to a designated computer via USB;
[0011] Get the name of the application package to be captured entered by the user through the specified UI interface;
[0012] According to the application package name, traverse the recorded device information and read the log to obtain the log information;
[0013] Convert the log information into a uniform format according to the set log format.
[0014] Analyze the log information in a unified format by setting an analysis strategy to obtain analysis results;
[0015] Based on the analysis results, an alarm is triggered according to the set alarm rules and the developer is notified to handle it.
[0016] As a preferred solution of a multi-platform mobile phone system application log reading and analysis method, in the process of obtaining and recording the device information, the system information and the system version of the mobile phone device:
[0017] By executing adb devices and ideviceinfo at the same time, the device information of the mobile device is obtained;
[0018] According to the system model of the mobile phone device, the device information and UUID are combined to generate a unique ID, and the device information is recorded; the device information includes the serial number, system version and device system.
[0019] As a preferred solution of a multi-platform mobile phone system application log reading and analysis method, in the process of converting the log information according to the set log format:
[0020] The setting log format is JSON format; the JSON format is: UUID, device information, system type, application package name, log time, process / thread ID, log level and log content.
[0021] As a preferred solution of a multi-platform mobile phone system application log reading and analysis method, in the process of analyzing the log information in a unified format by setting the analysis strategy:
[0022] The setting analysis strategy filters and analyzes the log information from multiple dimensions;
[0023] When analyzing the crash log information, context information of the process and thread is obtained by performing serial process processing on the crash log information;
[0024] By analyzing the context information, locating and restoring the execution path that caused the crash;
[0025] By parsing the function call stack in the crash log information, the call path, function input and output, and exception information when the crash occurs are obtained;
[0026] The state of the crash log information before the crash is restored according to the calling path, the function input and output, and the exception information.
[0027] As a preferred solution of a multi-platform mobile phone system application log reading and analysis method, in the process of triggering an alarm according to the analysis results and setting the alarm rules and notifying the developer to handle it:
[0028] When an abnormal log event is detected, an alarm is triggered according to the set alarm rules; the alarm is notified to the developer through system notification for processing; if frequent errors and alarms are not processed for a long time, they are processed through the chat tool robot @ relevant responsible personnel.
[0029] The present invention also provides a multi-platform mobile phone system application log reading and analysis device, based on the above multi-platform mobile phone system application log reading and analysis method, comprising:
[0030] The device information acquisition module is used to acquire and record the device information, system information and system version of the mobile device, and the mobile device is connected to the designated computer via USB;
[0031] The capture package name input module is used to obtain the application package name to be captured input by the user through the specified UI interface;
[0032] A log information acquisition module, used to traverse the recorded device information and read the log according to the application package name to obtain the log information;
[0033] A log information format conversion module, used to convert the log information according to a set log format to obtain the log information in a unified format;
[0034] A log information analysis module, used to analyze the log information in a unified format by setting an analysis strategy and obtain analysis results;
[0035] The abnormal alarm module is used to trigger an alarm according to the set alarm rules based on the analysis results and notify the developer to handle it.
[0036] As a preferred solution for a multi-platform mobile phone system application log reading and analysis device, in the device information acquisition module, in the process of acquiring and recording the device information, the system information and the system version of the mobile phone device, the device information of the mobile phone device is acquired by simultaneously executing adb devices and ideviceinfo; according to the system model of the mobile phone device, the device information and UUID are combined to generate a unique ID, and the device information is recorded; the device information includes a serial number, a system version and a device system.
[0037] As a preferred solution for a multi-platform mobile phone system application log reading and analysis device, in the log information format conversion module, in the process of converting the log information according to the set log format, the set log format is a JSON format; the JSON format is: UUID, device information, system type, application package name, log time, process / thread ID, log level and log content.
[0038] As a preferred solution for a multi-platform mobile phone system application log reading and analysis device, in the log information analysis module, in the process of analyzing the log information in a unified format through the set analysis strategy, the set analysis strategy screens and analyzes the log information from multiple dimensions; when analyzing crash log information, the context information of the process and thread is obtained by serializing the crash log information; the execution path that caused the crash is located and restored by analyzing the context information; the call path, function input and output, and exception information when the crash occurs are obtained by parsing the function call stack in the crash log information; and the state of the crash log information before the crash is restored according to the call path, the function input and output, and the exception information.
[0039] As a preferred solution for a multi-platform mobile phone system application log reading and analysis device, in the abnormal alarm module, in the process of triggering an alarm according to the analysis results and notifying the developer to handle it according to the set alarm rules, when an abnormal log event is detected, an alarm is triggered according to the set alarm rules; the alarm is notified to the developer for handling through system notification; if frequent errors and alarms are not handled for a long time, they are handled through the chat tool robot @relevant responsible personnel.
[0040] The present invention has the following advantages: obtaining and recording device information, system information and system version of a mobile device, wherein the mobile device is connected to a designated computer terminal via USB; obtaining the application package name to be captured input by the user through a designated UI interface; traversing the recorded device information and reading the log according to the application package name to obtain the log information; converting the log information according to the set log format to obtain the log information in a unified format; analyzing the log information in a unified format by setting an analysis strategy to obtain the analysis result; triggering an alarm according to the set alarm rule and notifying the developer to process according to the analysis result. The present invention supports log collection of multi-platform devices such as Android, iOS, and Hongmeng through an abstract interface layer, and users can operate through a unified API without having to care about the differences between different operating systems. This design simplifies the development process, enables the system to quickly adapt to different operating platforms, and provides great flexibility and scalability. Considering that more new systems will appear in the future, the present invention has good scalability and modular architecture in the scheme design, and supports adding new log sources and log analysis modules. Users can continuously expand the capabilities and scope of application of the system according to needs. The present invention solves the problem of parsing difficulties caused by the diversity of log formats by converting the original logs of different systems into a standardized JSON format. The unified format lays the foundation for subsequent data processing, screening and analysis, and improves the efficiency of the system in processing different types of logs. Based on data mining technology, the present invention can automatically identify abnormal patterns and potential problems in logs, reducing the manual analysis of logs by developers. Machine learning algorithms can establish baseline behavior models based on historical log data to help discover abnormal patterns in the system. When the present invention detects abnormal log events, the system can notify relevant personnel in real time through a variety of system notifications and instant messaging tools to ensure that the problem is handled in a timely manner. The real-time alarm mechanism greatly reduces the risk of system downtime or failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0042] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0043] Figure 1 A schematic diagram of a flow chart of a multi-platform mobile phone system application log reading and analysis method provided in Embodiment 1 of the present invention;
[0044] Figure 2 This is a schematic diagram of a specific implementation process of a multi-platform mobile phone system application log reading and analysis method provided in Example 1 of the present invention;
[0045] Figure 3 This is a schematic diagram of the architecture of a multi-platform mobile phone system application log reading and analysis device provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0046] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Example 1
[0048] See also Figure 1 and Figure 2 Embodiment 1 of the present invention provides a full disk encryption storage method transparent to an upper layer, comprising the following steps:
[0049] S1. Obtain and record device information, system information and system version of a mobile device, wherein the mobile device is connected to a designated computer via USB;
[0050] S2. Obtain the name of the application package to be captured input by the user through a specified UI interface;
[0051] S3. According to the application package name, traverse the recorded device information and read the log to obtain log information;
[0052] S4, converting the log information according to the set log format to obtain the log information in a unified format;
[0053] S5. Analyze the log information in a unified format by setting an analysis strategy to obtain analysis results;
[0054] S6. According to the analysis result, trigger an alarm according to the set alarm rules and notify the developer to handle it.
[0055] In this embodiment, in step S1, the device information, system information and system version of the mobile device are obtained and recorded, and the mobile device is connected to the designated computer via USB;
[0056] Specifically, first connect the mobile phone to the computer via USB, the program detects the connected mobile device in real time, obtains the basic information of the device through the device debugging interface and records it to prevent repeated reading of log information. This information will serve as the key input for log capture to ensure that the subsequent steps can select the corresponding log interface according to the system type of different devices.
[0057] The program periodically executes adb devices and ideviceinfo. Because we don't know what systems the connected devices have, we use both execution methods to obtain device information. The obtained device information generates a unique ID based on the system (IOS and Android) and UUID combination, and records the device information (serial number, system version, system).
[0058] In this embodiment, in step S2, the name of the application package to be captured input by the user through the specified UI interface is obtained;
[0059] Specifically, fill in the application package name (com.le123.ysdq) in the program's UI interface. There will be a lot of system-level and other application logs in the system log. Prioritize filtering to obtain only the log information of the development application.
[0060] In this embodiment, in step S3, according to the application package name, the recorded device information is traversed and the log is read to obtain the log information;
[0061] Specifically, traverse the stored device information and execute the read log interface. Determine the system type and execute the corresponding command to grab the corresponding interface:
[0062] IOS system executes `idevicesyslog -u <uuid>|grip<Bundle ID> ` <uuid>Fill in the unique ID of the device,<Bundle ID> Fill in the package name of the captured application.
[0063] For Android-based systems, execute `adb -s <uuid>logcat|grep<Bundle ID> `
[0064] <uuid>Fill in the unique ID of the device,<Bundle ID> Fill in the package name of the captured application.
[0065] The interface returns the acquired log information to the format conversion module for processing.
[0066] In this embodiment, in step S4, the log information is converted according to the set log format to obtain the log information in a unified format;
[0067] Specifically, different operating systems have different log formats, which leads to the complexity of log analysis and processing. This solution provides an intermediate standard format to convert the original logs of various platforms into a unified standardized format.
[0068] Define the log format: The root bureau compares the log information of iOS and Android, summarizes it, finds out the important information to keep and removes the unnecessary information. As follows:
[0069] IOS log content: 2024-10-09 12:34:57.234567+0800com.le123.ysdq[1234:56789][error]database:connection Failed to open database. This log content consists of time, application package name, [thread ID], [log level], subsystem: category, and log content format.
[0070] Android log content:
[0071] 10-09 12:34:57.234 1234-5678 / com.example.myapp E / Database: Failed to open database. This log content consists of time, process ID-thread ID, application package name, log level, and log content format.
[0072] A unified JSON format is designed based on the log information of the two systems. The format is as follows: UUID, device information, system type, application package name, log time, process / thread ID, log level, and log content format for storage.
[0073] In this embodiment, in step S5, the log information in the unified format is analyzed by setting an analysis strategy to obtain an analysis result;
[0074] Specifically, the present invention can filter and analyze log data through multiple dimensions, among which the most important is the crash log information mining technology. This technology is based on the filtering and analysis of log levels (fatal errors and crash levels), and gradually restores the event chain that leads to the crash by connecting the behaviors of the processes in series.
[0075] Specifically, when an application is running, multiple processes and threads usually work together to complete a specific task. When a crash occurs, it affects the collaborative operation of multiple processes. Therefore, crash log information mining needs to connect the behaviors of multiple processes in series and locate and restore the execution path that caused the crash by analyzing the context information of processes and threads (such as PID and TID).
[0076] Among them, process tracking uses the process identifier (PID) and thread identifier (TID) in the log to associate different operations in the log with the same process and reconstruct the execution chain before the crash.
[0077] Thread synchronization analysis refers to the fact that in multi-threaded applications, crashes may occur during thread synchronization. Analyzing thread synchronization logs can help locate problems such as multi-thread contention or deadlock.
[0078] In this embodiment, when restoring the cause of the crash, the context of the error is the key. Log mining technology analyzes the function call stack (Stack Trace) in the crash log, analyzes the call path, function input and output, exception information, etc. when the crash occurs, and gradually restores the state before the crash.
[0079] Specifically, the restoration steps are:
[0080] T1. Parse the call stack to determine the function or code location where the crash occurred;
[0081] T2. Reconstruct the complete event timeline from application startup to crash through timestamp information to help analyze each operation step;
[0082] T3. Track the propagation process of the exception, analyze which module the error comes from, whether it has been handled by the exception, and whether it has not been captured correctly.
[0083] In this embodiment, in step S6, based on the analysis result, an alarm is triggered according to the set alarm rules and the developer is notified to handle it.
[0084] Specifically, when the system detects abnormal log events (such as crashes, frequent error logs, etc.), it will trigger an alarm according to the preset rules. The alarm will be notified to the developer through the system notification as soon as possible, and frequent errors and long-unhandled alarms will be handled through the chat tool robot @ relevant responsible personnel.
[0085] In summary, the present invention obtains and records the device information, system information and system version of the mobile device, and the mobile device is connected to the specified computer terminal through USB; obtains the application package name to be captured input by the user through the specified UI interface; according to the application package name, traverses the recorded device information and reads the log to obtain the log information; converts the log information according to the set log format to obtain the log information in a unified format; analyzes the log information in the unified format by setting an analysis strategy to obtain the analysis result; according to the analysis result, triggers an alarm according to the set alarm rule and notifies the developer to process. The present invention supports log collection of multi-platform devices such as Android, iOS, and Hongmeng through an abstract interface layer, and users can operate through a unified API without having to care about the differences between different operating systems. This design simplifies the development process, enables the system to quickly adapt to different operating platforms, and provides great flexibility and scalability. Considering that more new systems will appear in the future, the present invention has good scalability and modular architecture in the scheme design, and supports adding new log sources and log analysis modules. Users can continuously expand the capabilities and scope of application of the system according to needs. The present invention solves the problem of parsing difficulties caused by the diversity of log formats by converting the original logs of different systems into a standardized JSON format. The unified format lays the foundation for subsequent data processing, screening and analysis, and improves the efficiency of the system in processing different types of logs. Based on data mining technology, the present invention can automatically identify abnormal patterns and potential problems in logs, reducing the manual analysis of logs by developers. Machine learning algorithms can establish baseline behavior models based on historical log data to help discover abnormal patterns in the system. When the present invention detects abnormal log events, the system can notify relevant personnel in real time through a variety of system notifications and instant messaging tools to ensure that the problem is handled in a timely manner. The real-time alarm mechanism greatly reduces the risk of system downtime or failure.
[0086] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0087] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0088] Example 2
[0089] See also Figure 3 Embodiment 2 of the present invention further provides a multi-platform mobile phone system application log reading and analysis device, comprising:
[0090] The device information acquisition module 001 is used to acquire and record the device information, system information and system version of the mobile device, and the mobile device is connected to the designated computer via USB;
[0091] The capture package name input module 002 is used to obtain the application package name to be captured input by the user through a specified UI interface;
[0092] The log information acquisition module 003 is used to traverse the recorded device information and read the log according to the application package name to obtain the log information;
[0093] The log information format conversion module 004 is used to convert the log information according to the set log format to obtain the log information in a unified format;
[0094] The log information analysis module 005 is used to analyze the log information in a unified format by setting an analysis strategy to obtain analysis results;
[0095] The abnormal alarm module 006 is used to trigger an alarm according to the analysis results and the set alarm rules and notify the developer to handle it.
[0096] In this embodiment, in the device information acquisition module 001, in the process of acquiring and recording the device information, the system information and the system version of the mobile phone device, the device information of the mobile phone device is acquired by simultaneously executing adb devices and ideviceinfo; according to the system model of the mobile phone device, the device information and UUID are combined to generate a unique ID, and the device information is recorded; the device information includes the serial number, system version and device system.
[0097] In this embodiment, in the log information format conversion module 004, in the process of converting the log information according to the set log format, the set log format is JSON format; the JSON format is: UUID, device information, system type, application package name, log time, process / thread ID, log level and log content.
[0098] In this embodiment, in the log information analysis module 005, in the process of analyzing the log information in a unified format by using the set analysis strategy, the set analysis strategy filters and analyzes the log information from multiple dimensions; when analyzing the crash log information, the context information of the process and thread is obtained by performing serial process processing on the crash log information; the execution path that caused the crash is located and restored by analyzing the context information; the call path, function input and output, and exception information when the crash occurs are obtained by parsing the function call stack in the crash log information; and the state of the crash log information before the crash is restored according to the call path, the function input and output, and the exception information.
[0099] In this embodiment, in the abnormal alarm module 006, in the process of triggering the alarm according to the set alarm rules based on the analysis results and notifying the developer to handle it, when an abnormal log event is detected, an alarm is triggered according to the set alarm rules; the alarm is notified to the developer for handling through system notification; if frequent errors and alarms are not handled for a long time, they are handled through the chat tool robot @relevant responsible personnel.
[0100] It should be noted that the information interaction, execution process, etc. between the modules of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0101] Example 3
[0102] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which a program code for a multi-platform mobile phone system application log reading and analysis method is stored. The program code includes instructions for executing embodiment 1 or any possible implementation method of a multi-platform mobile phone system application log reading and analysis method.
[0103] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0104] Example 4
[0105] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0106] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a multi-platform mobile phone system application log reading and analysis method of embodiment 1 or any possible implementation thereof.
[0107] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0108] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0109] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0110] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.< / uuid> < / uuid> < / uuid> < / uuid>
Claims
1. A method for reading and analyzing application logs of a multi-platform mobile phone system, characterized in that: include: Obtain and record device information, system information and system version of a mobile device, wherein the mobile device is connected to a designated computer via USB; Get the name of the application package to be captured entered by the user through the specified UI interface; According to the application package name, traverse the recorded device information and read the log to obtain the log information; Convert the log information into a uniform format according to the set log format. Analyze the log information in a unified format by setting an analysis strategy to obtain analysis results; Based on the analysis results, an alarm is triggered according to the set alarm rules and the developer is notified to handle it.
2. A method for reading and analyzing application logs of a multi-platform mobile phone system according to claim 1, characterized in that: In the process of obtaining and recording the device information, system information and system version of the mobile device: By executing adb devices and ideviceinfo at the same time, the device information of the mobile device is obtained; According to the system model of the mobile phone device, the device information and UUID are combined to generate a unique ID, and the device information is recorded; the device information includes the serial number, system version and device system.
3. A method for reading and analyzing application logs of a multi-platform mobile phone system according to claim 2, characterized in that: In the process of converting the log information according to the set log format: The setting log format is JSON format; the JSON format is: UUID, device information, system type, application package name, log time, process / thread ID, log level and log content.
4. A method for reading and analyzing application logs of a multi-platform mobile phone system according to claim 3, characterized in that: In the process of analyzing the log information in a unified format by setting the analysis strategy: The setting analysis strategy filters and analyzes the log information from multiple dimensions; When analyzing the crash log information, context information of the process and thread is obtained by performing serial process processing on the crash log information; By analyzing the context information, locating and restoring the execution path that caused the crash; By parsing the function call stack in the crash log information, the call path, function input and output, and exception information when the crash occurs are obtained; The state of the crash log information before the crash is restored according to the calling path, the function input and output, and the exception information.
5. A method for reading and analyzing application logs of a multi-platform mobile phone system according to claim 4, characterized in that: In the process of triggering an alarm according to the analysis results and setting the alarm rules and notifying the developer to handle the process: When an abnormal log event is detected, an alarm is triggered according to the set alarm rules; the alarm is notified to the developer through system notification for processing; if frequent errors and alarms are not processed for a long time, they are processed through the chat tool robot @ relevant responsible personnel.
6. A multi-platform mobile phone system application log reading and analysis device, using a multi-platform mobile phone system application log reading and analysis method according to any one of claims 1 to 5, characterized in that: include: The device information acquisition module is used to acquire and record the device information, system information and system version of the mobile device, and the mobile device is connected to the designated computer via USB; The capture package name input module is used to obtain the application package name to be captured input by the user through the specified UI interface; A log information acquisition module, used to traverse the recorded device information and read the log according to the application package name to obtain the log information; A log information format conversion module, used to convert the log information according to a set log format to obtain the log information in a unified format; A log information analysis module, used to analyze the log information in a unified format by setting an analysis strategy and obtain analysis results; The abnormal alarm module is used to trigger an alarm according to the set alarm rules based on the analysis results and notify the developer to handle it.
7. A multi-platform mobile phone system application log reading and analysis device according to claim 6, characterized in that: In the device information acquisition module, in the process of acquiring and recording the device information, the system information and the system version of the mobile phone device, the device information of the mobile phone device is acquired by executing adb devices and ideviceinfo at the same time; according to the system model of the mobile phone device, the device information and UUID are combined to generate a unique ID, and the device information is recorded; the device information includes the serial number, system version and device system.
8. The multi-platform mobile phone system application log reading and analysis device according to claim 7, characterized in that: In the log information format conversion module, in the process of converting the log information according to the set log format, the set log format is JSON format; the JSON format is: UUID, device information, system type, application package name, log time, process / thread ID, log level and log content.
9. The multi-platform mobile phone system application log reading and analysis device according to claim 8, characterized in that: In the log information analysis module, in the process of analyzing the log information in a unified format by using the set analysis strategy, the set analysis strategy filters and analyzes the log information from multiple dimensions; when analyzing the crash log information, the context information of the process and thread is obtained by performing serial process processing on the crash log information; the execution path that caused the crash is located and restored by analyzing the context information; the call path, function input and output, and exception information when the crash occurs are obtained by parsing the function call stack in the crash log information; and the state of the crash log information before the crash is restored according to the call path, the function input and output, and the exception information.
10. The multi-platform mobile phone system application log reading and analysis device according to claim 9, characterized in that: In the abnormal alarm module, in the process of triggering the alarm according to the set alarm rules based on the analysis results and notifying the developer to handle it, when an abnormal log event is detected, the alarm is triggered according to the set alarm rules; the alarm is notified to the developer for handling through system notification; if frequent errors and alarms are not handled for a long time, they are handled through the chat tool robot @relevant responsible personnel.