Fault reporting method and related device
By setting up a maintenance testing service application in the terminal device to monitor and handle faults in real time, the problem of timely application fault location and repair is solved, and the user experience and application stability are improved.
Patent Information
- Application Number
- CN202310094482.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-01-13
AI Technical Summary
In the existing technology, there is poor timeliness in locating and repairing terminal device application faults, and it takes a long time for users to provide feedback to developers, resulting in delayed fault repairs and the inability to quickly solve problems such as unresponsiveness, crashes, or freezes in applications.
Set up a maintenance testing service application in the terminal device to monitor application faults in real time and feedback fault data to the application in a timely manner to improve fault location efficiency and user experience. The application registers fault information by accessing the maintenance testing service application, uses fault coding and process information to quickly identify the fault type, and handles it through the callback function.
Through real-time monitoring and fault data feedback, the efficiency of application fault location and user experience are improved, developers' maintenance investment is reduced, fault repair time is shortened, and the stability and response speed of the application are improved.
Smart Images

Figure CN117149476B
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a fault reporting method and related devices. Background Art
[0002] When a user is using an application on a terminal device, the application may malfunction, for example, the application may become unresponsive, crash, or freeze.
[0003] In one implementation, users can report fault information to the customer service staff of the application. When the application developer receives more fault feedback, he can update the version of the application and fix the fault in the updated application version. However, the time from user feedback to the developer updating the version is usually long, and the timeliness of fault repair is poor. Summary of the invention
[0004] In the fault reporting method and related device provided in the embodiment of the present application, a maintenance and testing service application is provided in the terminal device, and the application can access the maintenance and testing service application. The maintenance and testing service application can monitor the faults of the application in real time. When the application fails, the maintenance and testing service application can promptly feedback the fault data to the application, so that the application can handle the fault, improve the efficiency of the application in locating the fault, and improve the user experience.
[0005] In a first aspect, the fault reporting method provided by the embodiment of the present application includes:
[0006] The first application registers the target fault with the second application by calling the interface; when the second application determines that the first application has a target fault, the second application reports the target fault to the first application, so that the first application can handle the target fault. In this way, when an application fails, the maintenance service application can promptly feedback the fault data to the application, so that the application can handle the fault, improve the efficiency of the application in locating faults, and improve the user experience.
[0007] In a possible implementation, a resource file for accessing a second application is integrated in the first application; the first application registers a target fault with the second application by calling an interface, which may include: the first application transmits the registration information of the first application to the second application based on the resource file, and the registration information of the first application includes the target fault and one or more of the following information of the first application: package name, user identifier UID, callback function. In this way, the second application can report different fault data to the application according to different subscription faults of different applications.
[0008] In a possible implementation, the application framework layer of the terminal device also includes a target service, and the method may further include: the second application transmits registration information of the first application to the target service; when the target service detects that a target fault occurs in the first application, the target service reports the target fault to the second application. In this way, the second application can report fault data of the target fault to the application in a timely manner, thereby improving the efficiency of the first application in locating the fault.
[0009] In a possible implementation, before the target service reports the target fault to the second application, the following steps may be included: the target service receives the fault code reported by the terminal device; the target service determines the target fault that occurs in the terminal device according to the fault code; the target service obtains process information; the target service determines that the target fault occurs in the first application in the process information. In this way, the terminal device adopts the reporting method of fault code, which can quickly identify and distinguish different fault types and improve the efficiency of fault detection.
[0010] In a possible implementation, the second application reporting the target fault to the first application may include: the second application calling the callback function of the first application. In this way, the callback function can be passed as a parameter, and when the callback function monitors the occurrence of the target fault in the first application, the callback function can execute a corresponding processing method for the corresponding target fault, and the callback function can improve the execution efficiency of the terminal device.
[0011] In a possible implementation, before the first application registers the target fault with the second application by calling the interface, the following may be included: if the second application detects that the first application has a fault, the second application saves the fault data of the first application. In this way, the second application saves the fault data for a period of time, which can ensure that the amount of fault data will not have a significant impact on the storage of the terminal device, and can also improve the efficiency of the second application in screening faults.
[0012] In a possible implementation, after the first application registers the target fault with the second application by calling the interface, the first application may also request the fault data before the first application is registered from the second application; if the second application finds the fault data before the first application is registered, the second application returns the fault data before the first application is registered to the first application. In this way, the fault can be repaired in the updated version of the first application, improving the user experience.
[0013] In a second aspect, an embodiment of the present application provides a device for reporting a fault, which may be a terminal device, or a chip or chip system in a terminal device. The device may include a processing unit. The processing unit is used to implement any method related to processing performed by the terminal device in the first aspect or any possible implementation of the first aspect. When the device is a terminal device, the processing unit may be a processor. The device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the terminal device implements the method described in the first aspect or any possible implementation of the first aspect. When the device is a chip or chip system in a terminal device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the terminal device implements the method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit in the chip (for example, a register, a cache, etc.), or a storage unit in the terminal device located outside the chip (for example, a read-only memory, a random access memory, etc.).
[0014] In a possible implementation, the processing unit is used for the first application to register the target fault with the second application by calling the interface; is also used for the second application to determine that the target fault occurs in the first application; and is specifically used for the second application to report the target fault to the first application.
[0015] In a possible implementation, the processing unit is configured for the first application to transmit registration information of the first application to the second application based on the resource file.
[0016] In a possible implementation, the processing unit is used for the second application to transmit the registration information of the first application to the target service; is also used for the target service to detect a target failure in the first application; and is specifically used for the target service to report the target failure to the second application.
[0017] In one possible implementation, the processing unit is used for the target service to receive the fault code reported by the terminal device, and is specifically used for the target service to determine the target fault occurring in the terminal device based on the fault code; it is also used for the target service to obtain process information; and is specifically used for the target service to determine in the process information that the target fault is the first application.
[0018] In a possible implementation, the processing unit is configured for the second application to call a callback function of the first application.
[0019] In a possible implementation, the processing unit is used for the second application to save the fault data of the first application.
[0020] In one possible implementation, the processing unit is used for the first application to request the second application for fault data before the first application was registered; it is also used for the second application to query the fault data before the first application was registered; specifically, it is also used for the second application to return the fault data before the first application was registered to the first application.
[0021] In a third aspect, an embodiment of the present application provides a terminal device, including a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the fault reporting method described in the first aspect or any possible implementation of the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the fault reporting method described in the first aspect or any possible implementation of the first aspect.
[0023] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, the computer executes the fault reporting method described in the first aspect or any possible implementation of the first aspect.
[0024] In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the fault reporting method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.
[0025] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
[0026] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of a maintenance service application providing a fault detection method for an application provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of a failure type of an application provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of interaction between an application and a maintenance and testing service application provided in an embodiment of the present application;
[0032] Figure 6 A detailed flowchart of fault detection and fault reporting provided for an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a fault prompt information interface provided in an embodiment of the present application;
[0034] Figure 8 A flowchart of fault data processing within a maintenance and testing service application provided in an embodiment of the present application;
[0035] Fig. 9 A schematic diagram of a fault reporting provided in an embodiment of the present application;
[0036] Fig.10 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0038] 1. Terminology
[0039] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0040] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0041] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.
[0042] 2. Terminal equipment
[0043] The terminal device of the embodiment of the present application may also be any form of electronic device. For example, the electronic device may include a handheld device, a vehicle-mounted device, etc. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public land mobile The embodiments of the present application do not limit this.
[0044] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0045] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.
[0046] The terminal device in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
[0047] In an embodiment of the present application, a terminal device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0048] For example, Figure 1 A schematic diagram of the structure of a terminal device is shown.
[0049] The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0050] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0051] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0052] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0053] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0054] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.
[0055] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device. In other embodiments of the present application, the terminal device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0056] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
[0057] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor. For example, the method of an embodiment of the present application may be executed.
[0058] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0059] The wireless communication module 160 can provide wireless communication solutions for application in terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0060] The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, modulate the frequency of the signal, amplify the signal, and convert it into an electromagnetic wave for radiation via the antenna.
[0061] The terminal device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information. The terminal device can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0062] The terminal device can implement audio functions such as audio playback or recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0063] Figure 2 : is a software structure block diagram of the terminal device of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
[0064] The application layer can include a series of application packages. Figure 2 As shown, the application package may include applications such as phone, calendar, camera, memo, video, etc. Applications may include system applications and third-party applications. In the embodiment of the present application, the application layer may also include a maintenance service application.
[0065] The maintenance and testing service application can manage the subscription registration information of the application, save fault data, detect heating faults, and notify the application of faults, etc. The specific description of the maintenance and testing service application will be described in detail in the following embodiments and will not be repeated here.
[0066] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0067] like Figure 2 As shown, the application framework layer may include a resource manager, a notification manager, a content provider, a window manager, etc. The application framework layer may also include a fault detection service.
[0068] The fault detection service can monitor the faults of the application in real time and report the fault data to the maintenance service application. The fault detection service will be described in detail in the following embodiments and will not be repeated here.
[0069] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0070] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.
[0071] Content providers are used to implement data sharing between different applications, allowing one program to access data in another program while ensuring the security of the accessed data.
[0072] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc.
[0073] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0074] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0075] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. For example, in the embodiment of the present application, the virtual machine can be used to execute the registration of the fault type and the processing of the fault by the application, the management of the registration information by the maintenance service application, and the detection of the fault.
[0076] The system library may include multiple functional modules, such as media libraries, function libraries, graphics processing libraries (such as OpenGL ES), etc.
[0077] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0078] The function library provides developers with API interfaces for multiple services, making it easy for developers to quickly integrate and implement various functions.
[0079] The graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.
[0080] The kernel layer is the layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, etc.
[0081] It should be noted that the embodiments of the present application are only illustrated using the Android system as an example. In other operating systems (such as Windows system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions of the present application can also be implemented.
[0082] When a user is using an application on a terminal device, the application may malfunction, for example, the application may become unresponsive, crash, or freeze.
[0083] In one implementation, users can feedback fault information to the customer service staff of the application. When the application developer receives more fault feedback, he can update the version of the application and fix the fault in the updated application version. However, in the process of developers fixing the fault, the success rate of fault location is low. The developer may need to reproduce the fault repeatedly, or may need to print fault data by adding logs to locate the fault, which increases the developer's investment in application maintenance. In addition, the time from user feedback to the developer's version update is usually long, and the timeliness of fault repair is poor, resulting in a lag in the application's fault resolution and the inability to quickly resolve the fault.
[0084] In view of this, the embodiment of the present application provides a fault reporting method, wherein a maintenance and testing service application is provided in the terminal device, and the application can access the maintenance and testing service application. The maintenance and testing service application can monitor the faults of the application in real time, and when the application fails, the maintenance and testing service application can promptly feedback the fault data to the application, so that the application can handle the fault, improve the efficiency of the application in locating the fault, and improve the user experience.
[0085] Figure 3 A schematic diagram showing a method for providing a fault detection method for an application by a maintenance and testing service application of a terminal device.
[0086] The application may integrate an Android application resource file (AAR) provided by the maintenance and testing service application, so that the application may interact with the maintenance and testing service application based on the AAR.
[0087] The maintenance and testing service application can send relevant subscription information of the application subscribing to the maintenance and testing service to the fault detection service, wherein the relevant subscription information includes, for example, the fault type.
[0088] For example, the application can subscribe to the fault detection service based on the AAR, and the fault detection service can monitor the faults of the application in real time. When the fault detection service detects that the fault of the application is the fault type subscribed by the application, the fault detection service can notify the maintenance service application of the fault. The maintenance service application can further notify the application of the fault so that the application can handle the fault.
[0089] In the embodiment of the present application, the failure type subscribed by the application may include at least a stability failure type, a performance failure type, and / or a heating failure type.
[0090] For example, Figure 4 The specific fault types included in stability, performance and heating are shown. Specifically include:
[0091] Stability failure types may include application not responding (ANR), application tombstoning, application crash, memory leak, thread leak, and application killed.
[0092] Among them, tombston, crash and killed can all cause abnormal exit of the application. It is understandable that the application crash caused by tombston may include abnormal exit of the system application, as well as abnormalities such as application null pointer call, array out of bounds, or address error in the bottom layer of the terminal device; the application crash caused by crash may include stack exceptions in the foreground or background application running on the terminal device, as well as abnormalities such as application call null pointer; the application crash caused by killed may include the application being abnormally killed by the terminal device, etc.
[0093] In addition, a memory leak of an application may cause the performance of the application to become increasingly worse, which may cause the application to crash; a thread leak of an application may cause the application's resources to be exhausted, which may cause the application to crash.
[0094] Performance failure types may include application frame loss, slow application startup, application crash, application freeze, etc.
[0095] Failure types related to heating may include terminal device heating and severe heating. For example, heating may include the battery temperature of the terminal device being higher than a first preset temperature value, and severe heating may include the battery temperature of the terminal device being higher than a second preset temperature value. The first preset temperature value is less than the second preset temperature value, and both the first preset temperature value and the second preset temperature value may be set by the maintenance service application or by the application, and are not limited in the embodiments of the present application.
[0096] It is understandable that different applications in the terminal device may focus on different fault types, so different applications may subscribe to different fault types from the maintenance service application. The fault type focused on by a specific application may be customized by the application, and this embodiment of the application does not limit this.
[0097] For example, office-type applications may focus on stability failure types such as application crashes, and applications of this type may subscribe to stability failure types from the maintenance and testing service application; short video-type applications may focus on performance failure types such as application freezes, and applications of this type may subscribe to performance failure types from the maintenance and testing service application; game-type applications may focus on terminal device heating failure types, and applications of this type may subscribe to heating failure types from the maintenance and testing service application.
[0098] Figure 5 The following is a detailed introduction to the application side, the maintenance service application side, and the fault detection service.
[0099] (1) Application side
[0100] Applications can integrate the maintenance and testing service AAR. Since the integrated maintenance and testing service AAR encapsulates the fault detection registration interface, the application can register faults by calling the fault detection registration interface, thereby subscribing to the fault types that the application is concerned about and realizing real-time monitoring of the application's own faults.
[0101] The application can pass the callback function defined by its own application as a parameter to the fault detection registration interface. When the application fails, the maintenance service application can call the callback function, and the registered fault type can be processed in the callback function on the application side.
[0102] For example, an application of a certain game type can customize a callback function of a heating fault type. When the application registers the heating fault type with the maintenance service AAR, the application can pass the callback function to the fault detection registration interface. When the maintenance service application detects that the battery of the current terminal device is heated, it can call the callback function passed by the application. At this time, the application side can execute the logic in the callback function and handle the heating fault accordingly. For example, the application's corresponding handling of the heating fault may include: the application can perform frame reduction processing on the game interface.
[0103] (2) Maintenance and testing service application side
[0104] The maintenance and testing service application may include: a subscription registration management module, a database management module, a fault detection module, and a trigger callback module.
[0105] After receiving the registration information of the application, the subscription registration management module of the maintenance and testing service application can manage the registration subscription information of the application and maintain the subscription list. The subscription list can be stored in a database maintained by the maintenance and testing service application. In a possible implementation, the subscription list maintained by the maintenance and testing service application can store the subscription information of the application in the form of a key-value pair. Exemplarily, the key value of the subscription list can include the package name of the application and the user identification (UID) of the application; the value of the subscription list can include the callback function passed by the application and the fault type registered by the application.
[0106] The database management module can save the detected fault data to the database, and can also manage the database to implement functions such as adding, deleting, modifying, and checking fault data in the database. For example, when a certain application fails, the database management module can save the fault data of the application; the database management module can also query the previous fault data of the application according to the application requirements; when the maintenance service application feeds back the fault data to the application, the database management module can also delete the fed-back fault data from the database.
[0107] The fault detection module can be used to detect heating faults of terminal equipment.
[0108] It is understandable that for the type of faults related to heating, the fault detection module in the maintenance and testing service application can detect the temperature of the terminal device. Since the maintenance and testing service application at the application layer can detect faults related to heating, the fault detection service at the application framework layer may not perform fault detection related to heating. In this way, fault detection and fault reporting related to heating can be implemented at the application layer, reducing the processing flow of performing fault detection related to heating at the application framework layer, reducing computing power, and improving the operating efficiency of the terminal device.
[0109] Of course, the fault detection of heating can also be detected in the fault detection service of the framework layer. The maintenance service application can send the registration information of the application to the fault detection service. When the fault detection service detects the heating fault, the fault detection service can report the heating fault to the maintenance service application.
[0110] (3) Fault detection service side
[0111] The fault detection service may include: a fault screening module and a fault reporting module.
[0112] The fault screening module can sense the fault, analyze the fault, and screen the fault type. The screened fault type can refer to the above Figure 4 The classification of fault types in the corresponding embodiments will not be repeated here.
[0113] When an application in a terminal device fails, the stability and performance fault detection module at the bottom layer of the terminal device can report the fault code, process information and related fault data of the fault to the fault detection service. Among them, the fault code can be used to identify different fault types, and the specific fault code identification method is not limited in the embodiment of the present application. Process information may include process number, process id, process name, etc. Related fault data may include: stack information, fault occurrence time, memory information, or CPU operation status and other information. It is understandable that the related fault data reported by the terminal device may be different for different fault types.
[0114] For example, when an application crashes, the terminal device can report the corresponding fault code, stack information, stack top function, fault time, and process information of the crash to the fault detection service. The fault screening module in the fault detection service can determine that the fault is a crash related to stability based on the fault code, and the fault detection service can also determine the application corresponding to the fault based on the process information. Furthermore, the fault reporting module can report the fault data to the maintenance and testing service application, and the maintenance and testing service application can report the relevant information of the above-mentioned crash to the application in a timely manner.
[0115] When a certain application has a slow startup fault, the terminal device can report the fault code, memory information, fault time, CPU usage information, and process information corresponding to the fault to the fault detection service. The fault screening module in the fault detection service can determine that the fault is a slow startup fault in terms of performance based on the fault code, and the fault detection service can also determine the application corresponding to the fault based on the process information. Furthermore, the fault reporting module can report the fault data to the maintenance and testing service application, and the maintenance and testing service application can report the relevant information of the above-mentioned slow startup fault to the application in a timely manner.
[0116] When a terminal device has a heating fault, the terminal device can report the fault code corresponding to the heating fault, application power consumption ranking, Wi-Fi power consumption, mobile data power consumption, and CPU occupancy time to the fault detection service. The fault screening module in the fault detection service can determine that the fault is a heating fault based on the fault code. The fault detection service can also report fault data to the maintenance and testing service application, and then the maintenance and testing service application can promptly feedback relevant information about the heating fault to the application that has registered the heating fault.
[0117] Specifically, Figure 6 A detailed fault detection and fault reporting flow chart is shown.
[0118] S601: The application calls a fault detection registration interface to register a fault.
[0119] Applications can integrate the maintenance and testing service AAR, and can register faults by calling the fault detection registration interface provided by the maintenance and testing service AAR, thereby subscribing to the fault types that the application is concerned about and realizing real-time monitoring of the application's own faults. Among them, the application can pass its own application package name, UID, callback function and registered fault type in the fault detection registration interface.
[0120] S602: The maintenance and testing service application manages application registration information.
[0121] The subscription registration management module in the maintenance service application can manage the registration information of the application. For details about the subscription registration management module, please refer to the above Figure 5 The relevant descriptions in the corresponding embodiments are not repeated here.
[0122] S603: The maintenance and testing service application sends application registration information to the fault detection service.
[0123] For the stability and performance failure types of application registration, the maintenance and testing service application can send the application registration information to the fault detection service so that the fault detection service can analyze and screen the failure types of application registration.
[0124] In some implementations, for heating failures registered by the application, the maintenance service application may also send the registration information of the application to the fault detection service, and the fault detection service may detect the heating failure.
[0125] S604: The application queries previous fault data.
[0126] In some implementations, before an application accesses the maintenance and testing service, the application may have been running for a period of time and generated some fault data. For example, an old version of an application does not support access to the maintenance and testing service application, but a new version of the application supports access to the maintenance and testing service application. When the application on the terminal device is updated to the new version, the maintenance and testing service application can report fault data to the application in a timely manner.
[0127] When the application is not connected to the maintenance and testing service application, the maintenance and testing service application can save the fault data of the application in the database. It is understandable that the database can save the application fault data within a preset time. For example, considering the impact of the amount of fault data on the storage of the terminal device and the efficiency of fault screening, the database can save the application fault data within 30 days. The specific length of time for which the database saves fault data can be customized by the maintenance and testing service application, and is not limited in the embodiments of the present application.
[0128] After the application accesses the maintenance and testing service application, the application may request the maintenance and testing service application to obtain previous fault data of the application stored in the maintenance and testing service application.
[0129] In a possible implementation, the application may pass identification information to the maintenance service application to indicate whether to obtain the previous fault data of the application, wherein the identification information may be a data type such as a Boolean type, an integer, or a string. For example, when the identification information is TRUE, it may indicate that the application requests to obtain the previous fault data, and when the identification information is FALSE, it may indicate that the application does not request to obtain the previous fault data. The specific type and value of the identification information are not limited in the embodiments of the present application.
[0130] S605: The maintenance and testing service application queries the database to obtain previous fault data of the application.
[0131] When an application requests to obtain previous fault data of the application stored in the maintenance and testing service application, the maintenance and testing service application may query whether there is previous fault data of the application in the database.
[0132] If the maintenance service application finds previous fault data of the application, the maintenance service application may obtain the previous fault data of the application and execute step S606. If the maintenance service application does not find previous fault data of the application, the maintenance service application may not feed back previous fault data to the application.
[0133] S606: The maintenance and testing service application returns the fault data before the application.
[0134] After the application obtains the previous fault data returned by the maintenance service application, the application can analyze the fault based on the previous fault data. In a possible implementation, the application can solve some fault problems existing in the application based on the fault data, and then can repair the application fault in the updated application version to improve the user experience.
[0135] S607: The maintenance and testing service application deletes previous fault data of the application from the database.
[0136] After the maintenance and testing service application feeds back the previously queried fault data of the application to the application, the maintenance and testing service application can delete the fault data fed back to the application from the database. In this way, the occupation of the terminal device memory space by the fault data can be reduced, the smoothness of the terminal device operation can be improved, and the lag of the terminal device can be reduced.
[0137] S608: Fault analysis and fault screening.
[0138] When the fault detection service detects that the application has a stability fault, a performance fault, and / or a heating fault, the fault detection service can analyze the fault and screen the fault type. If the fault is a fault type registered by the application, the fault detection service can execute step S609.
[0139] In some implementations, the detection of heating faults can be replaced by a maintenance service application.
[0140] S609: The fault detection service reports fault data.
[0141] The fault detection service can report fault data to the maintenance and testing service application.
[0142] S610: Trigger a callback function corresponding to the fault.
[0143] The maintenance and testing service application can determine the callback function corresponding to the fault according to the fault type, and call the callback function to report the fault data to the application in a timely manner.
[0144] S611. Apply fault handling.
[0145] The application can handle the fault reported by the maintenance service application accordingly. It is understandable that different applications in the terminal device can have different fault handling methods for the fault reported by the terminal device. The fault type and fault handling method concerned by the specific application can be customized by the application, and the embodiments of the present application are not limited.
[0146] For example, office-type applications can pay attention to stability failure types such as application crashes. When an office-type application obtains that its application is currently experiencing a crash, the application can restart and open the page before the crash. Short video-type applications can pay attention to performance failure types such as application lags. When a short video-type application obtains that its application is currently experiencing a lag, the application can clean up cache resources in its own application. Game-type applications can pay attention to terminal device heating failure types. When a game-type application obtains that the battery heat of the current terminal device reaches a preset temperature, the application can reduce the frame rate of the game interface.
[0147] It should be noted that steps S604 to S607 may be optional steps, and the application may request the maintenance and testing service application to obtain the previous fault data of the application, or may not request the maintenance and testing service application to obtain the previous fault data of the application. Whether a specific application requests previous fault data may be determined by the application itself, and this embodiment of the application does not limit this.
[0148] Optionally, before the application handles the fault, the application can instruct the terminal device to display a pop-up window for fault handling.
[0149] Take the example of an application that fails to respond. Figure 7 As shown, a pop-up window 701 may be displayed on the interface of the terminal device, and the pop-up window 701 may display an application icon 702 , a fault prompt title 703 , fault handling prompt information 704 , an OK button 705 , and a Cancel button 706 .
[0150] Among them, the fault prompt title 703 may include "The application is not responding", and the fault handling prompt information 704 may include "The current application is not responding, do you want to close it?" The specific content information of the fault prompt title 703 and the fault handling prompt information 704 is not limited in the embodiment of the present application. When the terminal device receives the operation of the user triggering the confirmation button 705, the terminal device can close the application. When the terminal device receives the operation of the user triggering the cancel button 706, the terminal device can cancel the display of the pop-up window 701 and does not close the application.
[0151] Figure 8 A flow chart showing the fault data processing within the maintenance and testing service application is shown.
[0152] When the application registers the fault detection interface of the maintenance and testing service application, the maintenance and testing service application can add the registration information of the application to the subscription information, where the subscription information can refer to the above Figure 5The description of the subscription list maintained by the maintenance service application in the corresponding embodiment is not repeated here. It is understandable that after subscribing to the message, a binding relationship may exist between the application and the fault type, that is, the maintenance service application may determine the fault type that each application is concerned about.
[0153] After the application is bound to the maintenance and testing service, the maintenance and testing service application can determine whether to feedback the previous fault data to the application according to the application's needs. Possible implementation methods can refer to the above Figure 6 The relevant description of S604 in the embodiment is not repeated here.
[0154] If the application requests to obtain previous fault data, the maintenance and testing service application can read the database to query whether there is previous fault data of the application in the database. If the maintenance and testing service application finds that there is previous fault data of the application, the maintenance and testing service application can feed back the found previous fault data of the application to the application. After feeding back to the application, the maintenance and testing service application can delete the fault data fed back to the application from the database.
[0155] When the fault detection service detects a fault, the fault detection service can report the fault data to the maintenance and testing service application. The maintenance and testing service application can determine whether there is corresponding application binding information for the fault type. If an application is registered and bound to the fault type, the maintenance and testing service application can promptly feedback the fault data reported by the fault detection service to the application. If no application is registered and bound to the fault type, the maintenance and testing service application can save the fault data to the database.
[0156] The following specific embodiments are used to describe the method of the present application in detail. The following embodiments may be combined with each other or implemented independently, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0157] Fig. 9 The fault reporting method of the embodiment of the present application is shown. The method includes:
[0158] S901. A first application registers a target fault with a second application by calling an interface.
[0159] In the embodiment of the present application, the first application can be any application installed in the terminal device, and the first application can include a third-party application and a system application. The first application can be any application that requires fault processing, and the specific first application is not limited in the embodiment of the present application.
[0160] The second application may be an application in the terminal device that can perform fault detection. For example, the second application may be the maintenance and testing service application in the above embodiment. It is understandable that the above embodiments all take the interaction between the application and the maintenance and testing service application as an example to illustrate the method of fault reporting. In a possible implementation, the application may be replaced by any first application that needs fault processing, and the maintenance and testing service application may be replaced by any second application that can perform fault detection.
[0161] The target fault may be a fault type registered by the first application to the second application. For example, the target fault may include a stability fault type, a performance fault type, and / or a heating fault type. The specific fault types included in stability, performance, and heating may refer to the above Figure 4 The relevant descriptions in the corresponding embodiments are not repeated here. The specific fault type that the first application registers with the second application is not limited in the embodiments of the present application.
[0162] S902: When the second application determines that a target fault occurs in the first application, the second application reports the target fault to the first application so that the first application processes the target fault.
[0163] In the embodiment of the present application, the second application can determine the target fault of the first application based on the fault data reported by the terminal device. Figure 5 The relevant description of the fault detection service side in the corresponding embodiment will not be repeated here.
[0164] In a possible implementation, the second application may report the target fault to the first application through a callback function, or may report the target fault to the first application through broadcasting, or may report the target fault to the first application through the Android interface definition language. The specific manner in which the second application reports the target fault to the first application is not limited in the embodiment of the present application. For example, the process of the second application reporting the target fault to the first application through a callback function can refer to the above Figure 5 The relevant description of the application side in the corresponding embodiment will not be repeated here.
[0165] In an embodiment of the present application, the second application can monitor the faults of the first application in real time. When a fault occurs in the first application, the second application can promptly feedback the fault data to the first application, so that the first application can process the fault data, thereby improving the efficiency of the first application in locating the fault and improving the user experience.
[0166] Optional, in Fig. 9On the basis of the corresponding embodiment, a resource file for accessing the second application is integrated in the first application; the first application registers the target fault to the second application by calling the interface, which may include: the first application transmits the registration information of the first application to the second application based on the resource file, and the registration information of the first application includes the target fault and one or more of the following information of the first application: package name, user identifier UID, and callback function.
[0167] In an embodiment of the present application, the resource file may be an AAR provided by the second application, or may be resource information related to the second application set in a configuration file of the first application, or may be other files related to the second application. The specific resource file is not limited in the embodiment of the present application.
[0168] The first application transmits the registration information of the first application to the second application based on the resource file. In this way, the second application can determine different applications based on the package name and the user identifier UID. The second application can also determine the fault type to be subscribed based on the target fault. The second application can also call the application callback function to report the fault data of the target fault to the application in time. In this way, the second application can report different fault data to the application based on the different subscribed faults of different applications.
[0169] Optional, in Fig. 9 Based on the corresponding embodiment, the application framework layer of the terminal device also includes a target service, and the method may also include: the second application transmits the registration information of the first application to the target service; when the target service detects that a target failure occurs in the first application, the target service reports the target failure to the second application.
[0170] In the embodiment of the present application, the target service can implement fault screening and fault reporting. Exemplarily, the target service can be the fault detection service in the above embodiment. The specific name of the target service is not limited in the embodiment of the present application.
[0171] When the target service detects that the first application has a target fault, the target service reports the target fault to the second application. In this way, the second application can report the fault data of the target fault to the application in a timely manner, thereby improving the efficiency of locating the fault of the first application.
[0172] Optional, in Fig. 9 On the basis of the corresponding embodiment, before the target service reports the target fault to the second application, it may also include: the target service receives the fault code reported by the terminal device; the target service determines the target fault occurring in the terminal device based on the fault code; the target service obtains the process information; the target service determines in the process information that the target fault occurs in the first application.
[0173] In the embodiment of the present application, the process information can be used to determine the application where the target failure occurs. The specific content of the process information can be referred to above. Figure 5 The relevant description of the fault detection service side in the corresponding embodiment will not be repeated here.
[0174] Fault codes can be used to identify different fault types. The specific fault code identification method is not limited in the present application embodiment. The terminal device adopts the fault code reporting method to quickly identify and distinguish different fault types, which can improve the efficiency of fault detection.
[0175] Optional, in Fig. 9 On the basis of the corresponding embodiment, the second application reports the target fault to the first application, which may include: the second application calls a callback function of the first application.
[0176] In the embodiment of the present application, the process of the second application calling the callback function of the first application can refer to the above Figure 5 The relevant description of the application side in the corresponding embodiment will not be repeated here.
[0177] The callback function can be passed as a parameter. When the callback function monitors the occurrence of a target fault in the first application, the callback function can execute a corresponding processing method for the corresponding target fault. The callback function can improve the execution efficiency of the terminal device.
[0178] Optional, in Fig. 9 On the basis of the corresponding embodiment, before the first application registers the target fault with the second application by calling the interface, it may also include: if the second application detects that the first application has a fault, the second application saves the fault data of the first application.
[0179] In the embodiment of the present application, the first application registers the target fault with the second application, which can be understood as the first application does not support access to the second application. At this time, the second application can save the fault data of the first application in the database. Figure 6 The relevant description of the fault data before the application query in S604 in the corresponding embodiment will not be repeated.
[0180] It is understandable that before the first application is connected to the second application, the second application can save the fault data of the first application for a period of time, for example, the second application can save the fault data of the application within 30 days. In this way, the second application saves the fault data for a period of time, which can ensure that the amount of fault data will not have a significant impact on the storage of the terminal device, and can also improve the efficiency of the second application in screening faults.
[0181] Optional, in Fig. 9On the basis of the corresponding embodiment, after the first application registers the target fault to the second application by calling the interface, it can also include: the first application requests the second application for the fault data before the first application is registered; if the second application queries the fault data before the first application is registered, the second application returns the fault data before the first application is registered to the first application.
[0182] In the embodiment of the present application, the first application can pass identification information to the second application to indicate whether to obtain the previous fault data. The specific identification information can refer to the above Figure 6 The relevant description of the fault data before the application query in S604 in the corresponding embodiment will not be repeated.
[0183] After the first application is connected to the second application, the second application can return the previous fault data to the first application, and then the first application can analyze the fault according to the previous fault data. The first application can solve some fault problems existing in the application according to the fault data, so that the fault can be repaired in the updated version of the first application to improve the user experience.
[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0185] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0186] The embodiment of the present application can divide the functional modules of the device implementing the method according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0187] like Fig.10 FIG. 1 is a schematic diagram of a chip structure provided by an embodiment of the present application. The chip 1000 includes one or more (including two) processors 1001 , a communication line 1002 , a communication interface 1003 and a memory 1004 .
[0188] In some implementations, the memory 1004 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0189] The method described in the above embodiment of the present application can be applied to the processor 1001, or implemented by the processor 1001. The processor 1001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 1001. The above processor 1001 can be a general processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1001 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.
[0190] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1004, and the processor 1001 reads the information in the memory 1004 and completes the steps of the above method in combination with its hardware.
[0191] The processor 1001 , the memory 1004 , and the communication interface 1003 may communicate with each other via the communication line 1002 .
[0192] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0193] The embodiment of the present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application 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 device. 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 one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0194] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
[0195] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.
[0196] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
Claims
1. A fault reporting method, characterized in that: Applied to a terminal device, the terminal device includes a first application and a second application, a calling interface is provided between the first application and the second application, and the method includes: The first application registers a target fault with the second application through the calling interface; When the second application determines that the first application has the target fault, the second application reports the target fault to the first application so that the first application processes the target fault; The first application is integrated with a resource file for accessing the second application; the first application registers the target fault with the second application through the calling interface, including: the first application transmits the registration information of the first application to the second application based on the resource file; The application framework layer of the terminal device also includes a target service, and the method further includes: The second application transmits the registration information of the first application to the target service; When the target service detects that the target failure occurs in the first application, the target service reports the target failure to the second application.
2. The method according to claim 1, characterized in that The registration information of the first application includes the target fault and one or more of the following information of the first application: package name, user identifier UID, and callback function.
3. The method according to claim 1, characterized in that Before the target service reports the target fault to the second application, the method further includes: The target service receives the fault code reported by the terminal device; The target service determines the target fault occurring in the terminal device according to the fault code; The target service obtains process information; The target service determines from the process information that the target failure occurs in the first application.
4. The method according to any one of claims 1 to 3, characterized in that: The second application reports the target fault to the first application, including: The second application calls a callback function of the first application.
5. The method according to any one of claims 1 to 3, characterized in that: Before the first application registers the target fault with the second application through the calling interface, the method further includes: If the second application detects that the first application fails, the second application saves the failure data of the first application.
6. The method according to claim 5, characterized in that After the first application registers the target fault with the second application through the calling interface, the method further includes: The first application requests the second application for fault data before the first application is registered; If the second application queries the fault data before the first application is registered, the second application returns the fault data before the first application is registered to the first application.
7. A terminal device, characterized in that: include: A memory and a processor, the memory being used to store a computer program, and the processor being used to execute the computer program to perform the method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the computer executes the method according to any one of claims 1 to 6.
9. A computer program product, characterized in that The method comprises a computer program, which, when executed, causes a terminal device to execute the method according to any one of claims 1 to 6.
