Log analysis method and device, electronic equipment and storage medium

By introducing the method of selecting target log analysis function and adding program code input function in the log analysis system, the problem of poor log analysis flexibility in existing systems is solved, and more efficient log analysis is achieved.

CN120144340APending Publication Date: 2025-06-13BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311694899.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing log analysis system has poor flexibility when analyzing abnormal problems and needs to analyze all abnormal problems, resulting in inefficiency.

Method used

Provides a log analysis method, allowing users to select target log analysis functions from a variety of log analysis functions, only conduct log analysis based on target functions, and add program code input functions to customize log analysis functions.

Benefits of technology

Improves the flexibility of log analysis, allowing users to select analysis functions as needed, reduce unnecessary analysis steps, and improve efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144340A_ABST
    Figure CN120144340A_ABST
Patent Text Reader

Abstract

The invention relates to a log analysis method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring log information; a target log analysis function is selected from multiple log analysis functions, each log analysis function corresponds to one abnormal problem, and the log analysis function is used for analyzing whether the corresponding abnormal problem exists in the log information or not; and based on the target log analysis function, analyzing the log information to obtain an analysis result of the log information. According to the log analysis system provided by the invention, a user can select the target log analysis function from multiple log analysis functions according to the abnormal problem needing to be analyzed, so that log analysis is carried out based on the target log analysis function, log analysis does not need to be carried out based on all log analysis functions, the user can customize the log analysis function, and the user experience is improved. And the log analysis is more flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a log analysis method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development of computer technologies, in order to meet the growing usage demands of users, more and more application programs have been developed, and the testing of application programs has become an indispensable and important link.

[0003] In related technologies, when an electronic device has an anomaly, log information is captured and uploaded to a log analysis system, and then the reason for the anomaly is obtained through the log analysis system. However, with more rigorous testing processes and continuous updates of electronic devices, there are more and more anomaly problems. To meet the needs of users, the log analysis system can analyze more and more anomaly problems. As a result, each time log analysis is performed, all anomaly problems need to be analyzed according to the background logic of the log analysis system, and the flexibility of log analysis is poor. Summary of the Invention

[0004] To overcome the problems existing in related technologies, the present disclosure provides a log analysis method, apparatus, electronic device, and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a log analysis method is provided. The method includes:

[0006] Obtain log information;

[0007] Select a target log analysis function from multiple log analysis functions, where each log analysis function corresponds to an anomaly problem, and the log analysis function is used to analyze whether the corresponding anomaly problem exists in the log information;

[0008] Analyze the log information based on the target log analysis function to obtain an analysis result of the log information.

[0009] In some embodiments, the selecting a target log analysis function from multiple log analysis functions includes:

[0010] Display multiple log analysis options, where each log analysis option corresponds to a log analysis function;

[0011] Select a target log analysis option from the multiple log analysis options, and the target log analysis option corresponds to the target log analysis function.

[0012] In some embodiments, the analyzing the log information based on the target log analysis function to obtain an analysis result of the log information includes:

[0013] Display description options corresponding to the target log analysis function, where the description options include a simple description option and a detailed description option. The simple description option is used to indicate the analysis result of the simple description log information, and the detailed description option is used to indicate the analysis result of the detailed description log information;

[0014] Select a target description option, where the target description option is the simple description option or the detailed description option;

[0015] Analyze the log information based on the target description option to obtain an analysis result corresponding to the target description option.

[0016] In some embodiments, the analyzing the log information based on the target log analysis function to obtain an analysis result of the log information includes:

[0017] Invoke an application programming interface corresponding to the target log analysis function to analyze the log information and obtain the analysis result.

[0018] In some embodiments, the method further includes:

[0019] Input program code corresponding to a log analysis function to be added in a function writing interface of a log analysis system;

[0020] Upload the program code to the log analysis system so that the log analysis system adds a log analysis function corresponding to the program code.

[0021] In some embodiments, the method further includes:

[0022] Configure a virtual development environment in which the program code can run in the function writing interface.

[0023] In some embodiments, after inputting program code corresponding to a log analysis function to be added in a function writing interface of a log analysis system, the method further includes:

[0024] In response to a code running operation, display a running result of the program code in the function writing interface, where the running result is used to characterize whether the program code runs normally.

[0025] According to a second aspect of the embodiments of the present disclosure, there is provided a log analysis device, where the device includes:

[0026] A log acquisition module configured to acquire log information;

[0027] A function selection module, configured to select a target log analysis function from multiple log analysis functions, where each log analysis function corresponds to an abnormal problem, and the log analysis function is used to analyze whether the log information has the corresponding abnormal problem;

[0028] A log analysis module, configured to analyze the log information based on the target log analysis function to obtain an analysis result of the log information.

[0029] In some embodiments, the function selection module is configured to:

[0030] Display multiple log analysis options, each log analysis option corresponding to a log analysis function;

[0031] Select a target log analysis option from the multiple log analysis options, the target log analysis option corresponding to the target log analysis function.

[0032] In some embodiments, the log analysis module is configured to:

[0033] Display a description option corresponding to the target log analysis function, the description option including a simple description option and a detailed description option, the simple description option being used to indicate a simple description of the analysis result of the log information, and the detailed description option being used to indicate a detailed description of the analysis result of the log information;

[0034] Select a target description option, the target description option being the simple description option or the detailed description option;

[0035] Analyze the log information based on the target description option to obtain an analysis result corresponding to the target description option.

[0036] In some embodiments, the log analysis module is configured to:

[0037] Call an application programming interface corresponding to the target log analysis function to analyze the log information to obtain the analysis result.

[0038] In some embodiments, the device further includes:

[0039] A code input module, configured to input program code corresponding to a log analysis function to be added in a function writing interface of a log analysis system;

[0040] A function adding module, configured to upload the program code to the log analysis system so that the log analysis system adds the log analysis function corresponding to the program code.

[0041] In some embodiments, the device further includes:

[0042] A development environment configuration module, configured to configure a virtual development environment in which the program code can run on the function writing interface.

[0043] In some embodiments, the device further includes:

[0044] A running result display module, configured to display the running result of the program code on the function writing interface in response to a code running operation, where the running result is used to characterize whether the program code runs normally.

[0045] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0046] A processor;

[0047] A memory for storing instructions executable by the processor;

[0048] Wherein, the processor is configured to execute the method described in the first aspect of the embodiments of the present disclosure.

[0049] According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, which when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method described in the first aspect of the embodiments of the present disclosure.

[0050] Adopting the above method of the present disclosure has the following beneficial effects:

[0051] In the method provided by the embodiments of the present disclosure, when performing log analysis, the user can select a target log analysis function from multiple log analysis functions according to the abnormal problems to be analyzed, so as to perform log analysis based on the target log analysis function, rather than performing log analysis based on all log analysis functions, enabling the user to customize the log analysis function and making the log analysis more flexible.

[0052] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.

[0054] Figure 1 is a flowchart of a log analysis method shown according to an exemplary embodiment;

[0055] Figure 2 is a flowchart of a log analysis method shown according to an exemplary embodiment;

[0056] Figure 3 It is a schematic diagram of a log analysis interface shown according to an exemplary embodiment;

[0057] Figure 4 It is a schematic diagram of a parsing process shown according to an exemplary embodiment;

[0058] Figure 5 It is a flowchart of a log analysis method shown according to an exemplary embodiment;

[0059] Figure 6 It is a schematic diagram of a function writing interface shown according to an exemplary embodiment;

[0060] Figure 7 It is a block diagram of a log analysis device shown according to an exemplary embodiment;

[0061] Figure 8 It is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0062] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present invention. On the contrary, they are only examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0063] In the related art, when an electronic device has an abnormality, log information is captured and uploaded to a log analysis system, and then the reason for the abnormality is obtained through the log analysis system. However, with the more rigorous test process and the continuous update of electronic devices, there are more and more abnormality problems. To meet the needs of users, the log analysis system can analyze more and more abnormality problems. As a result, every time log analysis is performed, all abnormality problems need to be analyzed according to the background logic of the log analysis system, and the flexibility of log analysis is poor.

[0064] The log analysis system provided by the embodiments of the present disclosure can select a log analysis function when performing log analysis, so as to perform the analysis required by the user, without analyzing all abnormality problems, and improving the flexibility of log analysis.

[0065] The method provided by the embodiments of the present disclosure is executed by an electronic device, and the electronic device can be a device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a wearable device, a smart home device, etc.

[0066] Figure 1It is a flowchart of a log analysis method shown according to an exemplary embodiment, which is executed by an electronic device. Refer to Figure 1 , the method includes the following steps:

[0067] Step S101, obtain log information.

[0068] The electronic device grabs the log to obtain log information. Among them, the log information includes various types of log information. For example, the log information includes system log, main log, kernel log, etc.

[0069] Step S102, select a target log analysis function from multiple log analysis functions. Each log analysis function corresponds to an abnormal problem, and the log analysis function is used to analyze whether there is a corresponding abnormal problem in the log information.

[0070] In the embodiment of the present disclosure, since the log analysis system has multiple log analysis functions, and when performing log analysis, the user may only want to determine whether there is one or several abnormal problems, or the user can determine which abnormal problems must not exist. In this case, it is not necessary to use all log analysis functions for log analysis. Therefore, a target log analysis function is selected from multiple log analysis functions, and the target log analysis function includes at least one of multiple log analysis functions. For example, the abnormal problems include stability restart script problems, watchdog problems, ANR (Application Not Responding) problems, data communication problems, WIFI (Wireless Fidelity) problems, etc., and each abnormal problem corresponds to a log analysis function.

[0071] Step S103, analyze the log information based on the target log analysis function to obtain an analysis result of the log information.

[0072] Among them, the analysis result is used to characterize whether there is an abnormal problem corresponding to the target log analysis function in the log information.

[0073] In the method provided by the embodiment of the present disclosure, when performing log analysis, the user can select a target log analysis function from multiple log analysis functions according to the abnormal problems to be analyzed, so as to perform log analysis based on the target log analysis function, rather than performing log analysis based on all log analysis functions, enabling the user to customize the log analysis function and making the log analysis more flexible.

[0074] Figure 2It is a flowchart of a log analysis method shown according to an exemplary embodiment, which is executed by an electronic device. Refer to Figure 2 , the method includes the following steps:

[0075] Step S201, obtain log information.

[0076] In some embodiments, obtaining log information includes: uploading a log file to the log analysis system, where the log file includes log information. For example, refer to Figure 3 the schematic diagram of the log analysis interface shown, where the log analysis interface includes "Drag the log here" (the area for uploading log information), and drag the log file to this area.

[0077] In some embodiments, obtaining log information includes: uploading log information to the buff pool of the log analysis system, and dividing the log information into at least one log set in the buff pool, where each log set includes one type of log. For example, refer to Figure 4 the schematic diagram of the parsing process shown, upload the log compressed package to the buff pool, and then divide the log information into system log, main log, and kernel log in the buff pool. Optionally, the log in each log set can be further split into logs corresponding to different exception problems according to the keyword of each line of the log. For example, it can be split into reboot log, anr log, process crash log, WIFI log, watchdog trace log, memory log, and perfmonitor log, etc.

[0078] Step S202, display multiple log analysis options, where each log analysis option corresponds to a log analysis function.

[0079] In the embodiments of the present disclosure, in order to facilitate user selection, log analysis options corresponding to each log analysis function are provided for the user. For example, refer to Figure 3 the schematic diagram of the log analysis interface shown, in Figure 3 the following log analysis options are given: "Stability restart script", "Watchdog overview", "Watchdog - call chain", "ANR problem", "ANR problem HANG stack", "Data communication problem", "WLAN problem", etc.

[0080] It should be noted that the embodiments of the present disclosure are only described by taking step S101 being executed first and then step S102 as an example. In another embodiment, step S102 can be executed first and then step S101.

[0081] Step S203: Select a target log analysis option from multiple log analysis options. The target log analysis option corresponds to a target log analysis function.

[0082] When log analysis is required, the user can select at least one log analysis option from multiple log analysis options.

[0083] It should be noted that multiple log analysis functions can be the log analysis functions built into the log analysis system during development, or can be newly added log analysis functions by program code written by the user.

[0084] Step S204: Analyze the log information based on the target log analysis function to obtain the analysis result of the log information.

[0085] In some embodiments, the user may only need simple analysis in some cases, that is, to obtain keywords characterizing abnormal problems, while in some cases may need detailed analysis, that is, to obtain the code stack characterizing abnormal problems, specifically locate the code line where the abnormality occurs, etc. In order to flexibly display the analysis results to the user. After selecting the target log analysis function, display the description options corresponding to the target log analysis function, where the description options include a simple description option and a detailed description option. The simple description option is used to indicate a simple description of the analysis result of the log information, and the detailed description option is used to indicate a detailed description of the analysis result of the log information; select the target description option, and the target description option is the simple description option or the detailed description option; analyze the log information based on the target description option to obtain the analysis result corresponding to the target description option. Among them, the analysis result corresponding to the simple description option only simply describes the abnormal problem, and the analysis result corresponding to the detailed description option details the abnormal problem.

[0086] In some embodiments, call the application programming interface (API) corresponding to the target log analysis function to analyze the log information to obtain the analysis result. For example, see Figure 6 , provide an externally exposed API, and this API is the API corresponding to the log analysis function. When performing log analysis, call the API corresponding to the target log analysis function to obtain the analysis result.

[0087] The method provided by the embodiments of the present disclosure, when performing log analysis, the user can select a target log analysis function from multiple log analysis functions according to the abnormal problem to be analyzed, so as to perform log analysis based on the target log analysis function, rather than performing log analysis based on all log analysis functions, enabling the user to customize the log analysis function and making the log analysis more flexible.

[0088] In addition, in a related technology, as the test process becomes more rigorous and electronic devices are continuously updated, there are more and more abnormal problems, and the log analysis system usually cannot cover all abnormal problems, making it difficult to meet the log analysis requirements. Moreover, in terms of the function development of the log analysis system, usually, testers need to put forward requirements, and then developers need to conduct research and development and testing based on these requirements until the same function is finally added to the log analysis system, which requires a long waiting time.

[0089] The log analysis system provided by the embodiments of the present disclosure, in addition to selecting the target log analysis function according to the needs of users, can also add a program code input function, enabling users to directly add log analysis functions in the log analysis system according to the needs of log analysis, realizing the customization of log analysis functions, thereby better meeting the log analysis requirements. Moreover, log analysis functions can be added to the log analysis system in a timely manner. When a new log analysis function is needed, it can be realized faster, reducing the development time.

[0090] Figure 5 is a flowchart of a log analysis method shown according to an exemplary embodiment, executed by an electronic device. Refer to Figure 5 and the method includes the following steps:

[0091] Step S501, in the function writing interface, input the program code corresponding to the log analysis function to be added.

[0092] Among them, the log analysis system has a log analysis function and a program code writing function. Of course, the log analysis system may also have other functions, and the embodiments of the present disclosure do not limit other functions of the log analysis system. The function writing interface of the log analysis system is used to add a new log analysis function to the log analysis system by inputting the application program code corresponding to the log analysis function to be added. For example, refer to Figure 3 the schematic diagram of the function writing interface shown. The function writing interface includes a code writing area, and the program code corresponding to the log analysis bus to be added is input in the code writing area.

[0093] In some embodiments, it is necessary to input the program code according to the interface specification. Among them, the interface specification is used to represent the interface called during log analysis.

[0094] It should be noted that the program code input in the function writing interface can be any type of programming language. For example, the program code is C++, Java, or other programming languages, and the embodiments of the present disclosure do not limit this.

[0095] Step S502, in the function writing interface, configure the virtual development environment in which the program code can run.

[0096] To support the running of program code, a development environment suitable for the program code needs to be configured. In related technologies, it is usually necessary to locally install development environments such as JDK, Springboot, and maven on an electronic device. In the embodiments of the present disclosure, a variety of virtual development environments are pre-configured in the log analysis system. When program code needs to be input, one of the pre-configured virtual development environments can be selected as the virtual development environment to support the program code.

[0097] For example, referring to Figure 3 the schematic diagram of the function writing interface shown, the function writing interface includes a development environment configuration area, and in the development environment configuration area, a virtual development environment is configured.

[0098] Optionally, the development environment configuration area can display a variety of virtual development environments. In response to a selection operation on any one of the variety of virtual development environments, the selected virtual development environment is configured as the virtual development environment to support the running of the program code.

[0099] It should be noted that the embodiments of the present disclosure are only described by taking the example of first inputting program code and then configuring the virtual development environment. In another embodiment, the virtual development environment can be configured first and then the program code can be input.

[0100] Step S503, in response to a code running operation, display the running result of the program code on the function writing interface, and the running result is used to indicate whether the program code runs normally.

[0101] After inputting the program code and configuring the virtual development environment, in order to ensure that the program code can run normally, the program code needs to be tested first, that is, the program code is tried to run first, and it is judged whether the program code runs normally according to the running result. If it can run normally, step S504 is executed. If it cannot run normally, the program code is debugged again, and then the debugged program code is continued to run until the program code can run normally.

[0102] For example, referring to Figure 3 the schematic diagram of the function writing interface shown, the function writing interface includes a running control (refer to Figure 3 the upper left corner) and a debugging control. In response to a triggering operation on the running control, the program code is run, and the running result is displayed in the running result display area. If it cannot run normally, in response to a triggering operation on the debugging control, the program code is debugged, and then the debugged program code is continued to run until the program code can run normally.

[0103] Optionally, when displaying the running result, the result indicating whether it runs normally finally can be displayed, or the results corresponding to each instruction in the program code can be displayed, so as to facilitate finding out where the program code goes wrong.

[0104] Step S504, when the running result indicates that the program code runs normally, upload the program code to the log analysis system so that the log analysis system adds the log analysis function corresponding to the program code.

[0105] In some embodiments, the program code is encapsulated and the encapsulated program code is uploaded to the log analysis system. For example, the program code is compiled into a jar package and the jar package is uploaded to the log analysis system.

[0106] In some embodiments, the function writing interface includes an upload control, and in response to a trigger operation on the upload control, the program code is uploaded to the log analysis system.

[0107] It should be noted that the embodiments of the present disclosure are only described by taking the example of debugging the program code after writing the program code. In another embodiment, the program code can be directly uploaded to the log analysis system after inputting the program code so that the log analysis system adds the log analysis function corresponding to the program code.

[0108] The log analysis system provided by the embodiments of the present disclosure realizes the customization of the log analysis function by adding the input function of the program code, enabling users to directly add the log analysis function in the log analysis system according to the needs of log analysis, thereby better meeting the needs of log analysis. And there is no need to download a development environment locally on the electronic device.

[0109] Figure 7 is a block diagram of a log analysis device shown according to an exemplary embodiment, configured in an electronic device, see Figure 7 , the device includes:

[0110] A log acquisition module 701, configured to acquire log information;

[0111] A function selection module 702, configured to select a target log analysis function from multiple log analysis functions, where each log analysis function corresponds to an abnormal problem, and the log analysis function is used to analyze whether the log information has the corresponding abnormal problem;

[0112] A log analysis module 703, configured to analyze the log information based on the target log analysis function to obtain an analysis result of the log information.

[0113] In some embodiments, the function selection module 702 is configured to:

[0114] Display multiple log analysis options, and each log analysis option corresponds to a log analysis function;

[0115] From multiple log analysis options, select a target log analysis option, where the target log analysis option corresponds to a target log analysis function.

[0116] In some embodiments, the log analysis module 703 is configured to:

[0117] Display description options corresponding to the target log analysis function, where the description options include a simple description option and a detailed description option. The simple description option is used to indicate the analysis result of simply describing the log information, and the detailed description option is used to indicate the analysis result of detailedly describing the log information;

[0118] Select a target description option, where the target description option is a simple description option or a detailed description option;

[0119] Analyze the log information based on the target description option to obtain an analysis result corresponding to the target description option.

[0120] In some embodiments, the log analysis module 703 is configured to:

[0121] Invoke an application programming interface corresponding to the target log analysis function to analyze the log information and obtain an analysis result.

[0122] In some embodiments, the device further includes:

[0123] A code input module, configured to input program code corresponding to a log analysis function to be added in a function writing interface of the log analysis system;

[0124] A function adding module, configured to upload the program code to the log analysis system so that the log analysis system adds a log analysis function corresponding to the program code.

[0125] In some embodiments, the device further includes:

[0126] A development environment configuration module, configured to configure a virtual development environment in which the program code can run in the function writing interface.

[0127] In some embodiments, the device further includes:

[0128] A running result display module, configured to display the running result of the program code in the function writing interface in response to a code running operation, where the running result is used to characterize whether the program code runs normally.

[0129] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0130] Embodiments of the present disclosure also provide an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the log analysis method in the above embodiments.

[0131] Figure 8 FIG. 4 is a block diagram of an electronic device 800 shown according to an exemplary embodiment.

[0132] Referring to Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0133] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0134] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0135] The power component 806 provides power to various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0136] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of a touch or swipe action but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0137] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0138] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0139] The sensor component 814 includes one or more sensors for providing an assessment of the various aspects of the state of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0140] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 may access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0141] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the above instructions can be executed by a processor 820 of the electronic device 800 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0143] An embodiment of the present disclosure also provides a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the log analysis method in the above embodiment.

[0144] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.

[0145] It should be understood that the present invention is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims

1. A log analysis method, characterized in that, the method includes: Obtaining log information; Selecting a target log analysis function from multiple log analysis functions, where each log analysis function corresponds to an abnormal problem, and the log analysis function is used to analyze whether there is a corresponding abnormal problem in the log information; Based on the target log analysis function, analyzing the log information to obtain an analysis result of the log information.

2. The method according to claim 1, characterized in that, the selecting a target log analysis function from multiple log analysis functions includes: Displaying a plurality of log analysis options, each log analysis option corresponding to a log analysis function; Selecting a target log analysis option from the plurality of log analysis options, the target log analysis option corresponding to the target log analysis function.

3. The method according to claim 2, characterized in that, the analyzing the log information based on the target log analysis function to obtain an analysis result of the log information includes: Displaying a description option corresponding to the target log analysis function, the description option including a simple description option and a detailed description option, the simple description option being used to indicate a simple description of the analysis result of the log information, and the detailed description option being used to indicate a detailed description of the analysis result of the log information; Selecting a target description option, the target description option being the simple description option or the detailed description option; Based on the target description option, analyzing the log information to obtain an analysis result corresponding to the target description option.

4. The method according to claim 2, characterized in that, the analyzing the log information based on the target log analysis function to obtain an analysis result of the log information includes: Invoking an application programming interface corresponding to the target log analysis function to analyze the log information to obtain the analysis result.

5. The method according to claim 1, characterized in that, the method further includes: Inputting program code corresponding to a log analysis function to be added in a function writing interface of a log analysis system; Uploading the program code to the log analysis system so that the log analysis system adds the log analysis function corresponding to the program code.

6. The method according to claim 5, characterized in that, the method further includes: Configuring a virtual development environment in which the program code can run in the function writing interface.

7. The method according to claim 5, characterized in that, after inputting the program code corresponding to the log analysis function to be added in the function writing interface of the log analysis system, the method further includes: In response to a code running operation, displaying a running result of the program code in the function writing interface, the running result being used to characterize whether the program code runs normally.

8. A log analysis device, characterized in that, the device includes: A log acquisition module configured to acquire log information; A function selection module, configured to select a target log analysis function from a variety of log analysis functions, wherein each log analysis function corresponds to an abnormal problem, and the log analysis function is used to analyze whether there is a corresponding abnormal problem in the log information; A log analysis module, configured to analyze the log information based on the target log analysis function to obtain an analysis result of the log information.

9. An electronic device, characterized in that, it includes: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium, characterized in that, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1-7.