Application freezing abnormity detection method and electronic equipment

By detecting and managing the freezing status information of the application and identifying and solving freezing abnormalities, timely thawing of applications in electronic devices is achieved, screen freezing is avoided, and user experience is improved.

CN119292861APending Publication Date: 2025-01-10HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411181852.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The abnormal freezing management module in electronic devices leads to freezing of screens, and the process cannot be thawed in time, which affects the user experience and is difficult to locate the problem.

Method used

By detecting the duration of the application switching from the foreground to the background, recording and managing the application's freezing status information, determining whether there is a freezing exception, and triggering the recovery mechanism after the exception is recognized, ensuring that the application is thawed and avoiding the freezing of the screen.

Benefits of technology

It effectively avoids the occurrence or rapid recovery of screen freezing, improves the user experience, and ensures timely thawing of the application and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292861A_ABST
    Figure CN119292861A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an application freezing abnormity detection method and electronic equipment. The electronic equipment manages state information of all frozen application programs, recognizes freezing abnormity through the state information, and triggers a recovery mechanism after recognizing the freezing abnormity. According to the method, the frozen screen can be avoided or quickly recovered, so that the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to a method and electronic equipment for detecting freezing anomalies. Background Art

[0002] Multiple applications can be installed in an electronic device. When the freezing management module in the electronic device is abnormal, the frozen process in the electronic device may not be thawed in time, resulting in a frozen screen. The abnormal freezing management module problem is difficult to locate, affecting the user experience. Summary of the invention

[0003] The embodiments of the present application provide a method for detecting application freezing anomalies and an electronic device, which can avoid screen freezing or quickly restore the frozen screen, thereby improving the user experience.

[0004] In a first aspect, a method for detecting application freezing anomalies is provided, which is applied to an electronic device. The method may include: detecting that a first application in the electronic device switches from foreground operation to background operation, and the duration of the background operation exceeds a first duration; freezing the first application; detecting that the first application switches from background operation to foreground operation; judging whether the first application has not been unfrozen based on recorded status information of the application currently in a frozen state; and unfreezing the first application if it has not been unfrozen.

[0005] In implementing the method of the first aspect, the electronic device records the status information of each application currently stored in a frozen state, identifies the freezing anomaly through the status information, and triggers a recovery mechanism after identifying the freezing anomaly. This method can avoid the freezing screen or quickly restore the frozen screen, thereby improving the user experience.

[0006] In combination with the first aspect, in some embodiments, whether the first application has not been unfrozen is determined based on the recorded status information of the application that is currently in a frozen state, specifically including: if the recorded status information of the application that is currently in a frozen state contains the status information of the first application, it is confirmed that the first application has not been unfrozen; if the recorded status information of the application that is currently in a frozen state does not contain the status information of the first application, it is confirmed that the first application has been unfrozen.

[0007] In this way, the electronic device can determine whether the application currently switched from the background to the foreground has been unfrozen by recording the status information of the application in the frozen state, and then find out and solve the freezing anomaly.

[0008] In combination with the first aspect, in some embodiments, it is confirmed that the first application has not been unfrozen only in the following circumstances: after detecting that the first application switches from background operation to foreground operation, the status information of the application currently in the frozen state recorded includes the status information of the first application, and, after a second period of time, the status information of the application currently in the frozen state recorded still includes the status information of the first application; or, after detecting that the first application switches from background operation to foreground operation, the status information of the application currently in the frozen state recorded includes the status information of the first application, and an event of not responding to user operations is detected within the second period of time.

[0009] Since the recovery process of the top window of the application stack and the process of the electronic device thawing the application may be processed in parallel, after the electronic device learns that the top window of the application stack has been restored, it may be that the electronic device is also thawing the application in parallel but has not yet completed the thawing, and may not complete the thawing until some time has passed. Based on this, the result of the electronic device's first judgment on whether there is application status information in the recorded information is yes, and it cannot be determined whether the application has a freezing abnormality for the time being. Only after more abnormal performance occurs (i.e., the result of the judgment again after a period of time is still yes, or an electronic device does not respond event occurs), will it be confirmed that the application has a freezing abnormality. This can ensure the accuracy of the result that the application has a freezing abnormality.

[0010] In combination with the first aspect, in some implementations, unfreezing the first application specifically includes: unfreezing all frozen applications.

[0011] In some embodiments, after all frozen applications are unfrozen, the method further includes: freezing applications that have been switched to background operation and have been running in the background for a period exceeding a first period of time. This is equivalent to restarting the freezing mechanism of the electronic device, which ensures that the first application is unfrozen.

[0012] In combination with the first aspect, in some embodiments, the electronic device includes a freezing management module, and the freezing management module is used to freeze the first application and unfreeze the first application.

[0013] In combination with the first aspect, in some embodiments, the electronic device further includes a freezing anomaly detection module, and the freezing anomaly detection module is used to record status information of frozen applications in the electronic device.

[0014] In some embodiments, the freezing anomaly detection module is specifically used to record the status information of the application when the electronic device freezes the application, and delete the recorded status information of the application when the electronic device thaws the application.

[0015] In some implementations, the freezing anomaly detection module is further used to determine whether the first application is not thawed.

[0016] In conjunction with the first aspect, in some implementations, the application status information includes one or more of the following: the name of the application, the process identifier PID of the application, and the package name of the application. Such status information may indicate which applications are currently in a frozen state.

[0017] In a second aspect, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method provided in the first aspect or any one embodiment of the first aspect.

[0018] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect or any one of the embodiments of the first aspect is implemented.

[0019] According to a fourth aspect, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method provided in the first aspect or any one of the embodiments of the first aspect is implemented.

[0020] In a fifth aspect, a chip system is provided, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method provided in the first aspect or any one of the embodiments of the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A software structure block diagram of the electronic device 100 provided in an embodiment of the present application;

[0022] Figure 2 A flow chart of a method for detecting freezing anomalies provided in an embodiment of the present application;

[0023] Figure 3 A flowchart for determining whether an application has a freezing abnormality provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings.

[0026] First, the terms involved in the embodiments of the present application are introduced.

[0027] Refrigeration Applications

[0028] App freezing is a management technology that manages applications to save resources, extend battery life, protect privacy, and optimize performance.

[0029] When an application in an electronic device moves to the background and is no longer used for a period of time, the electronic device will put the application into a "frozen" state. This can reduce the application's use of system resources, thereby allocating more resources to other applications and extending battery life.

[0030] When an application is in a "frozen" state, its application process enters a state similar to "hibernation" or "suspended", where the application process takes up fewer system resources but remains alive.

[0031] Unfreeze the application

[0032] When an application in an electronic device switches from the background to the foreground, the electronic device switches the application from the "frozen" state to the "thawed" state. When the application is thawed, it will exit the "sleep" or "suspend" state, occupy more system resources, and return to the normal scheduling state. The thawed application can provide the user with the application services required, such as responding to the user's input events to the foreground application.

[0033] The freezing and unfreezing of the application program described above may be performed by a freezing management module in the electronic device.

[0034] Frozen screen

[0035] A frozen screen refers to a situation where an electronic device suddenly stops responding during use, the screen becomes frozen or black, and the user is unable to perform any operations.

[0036] When an application in an electronic device is switched from the background to the foreground, if the electronic device has a freezing abnormality, that is, the application cannot be switched from the "frozen" state to the "thawed" state in time, then because the application is in the "frozen" state, it cannot respond to the user's input events to the foreground application, thereby causing a frozen screen phenomenon.

[0037] The frozen screen may be caused by an abnormality in the freezing management module of the electronic device. The abnormality of the freezing management module may include but is not limited to the process deadlock or abnormal state of the module. This abnormality will cause the application to be unable to unfreeze, that is, the freezing abnormality.

[0038] When the screen freezes, you can rely on the freezing management module in the electronic device to autonomously detect the abnormality and solve it, or the user can actively restart the application after discovering it. Both methods take a long time to solve the frozen screen problem, and the latter requires user intervention, which brings a bad user experience.

[0039] The following embodiments of the present application provide a method for detecting application freezing anomalies and an electronic device, wherein the electronic device manages the status information of each frozen application, identifies the freezing anomaly through the status information, and triggers a recovery mechanism after identifying the freezing anomaly. The method can avoid freezing the screen or quickly restore the frozen screen, thereby improving the user experience.

[0040] The method provided in the embodiments of the present application can be applied to electronic devices, which can be of various types, such as mobile phones, tablet computers, desktop computers, desktop computers with touch-sensitive surfaces or touch panels, laptop computers (laptops), handheld computers, notebook computers, smart screens, wearable devices (such as smart watches, smart bracelets, etc.), augmented reality (AR) devices, virtual reality (VR) devices, car computers, game consoles, etc.

[0041] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes a mobile operating system of a layered architecture as an example to exemplify the software structure of the electronic device.

[0042] Figure 1 It is a software structure block diagram of the electronic device 100 provided in an embodiment of the present application.

[0043] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the mobile operating system is divided into four layers, from top to bottom: application layer, application framework layer / core service layer, system library and runtime, and kernel layer.

[0044] The application layer can include a series of application packages.

[0045] The application package may include frozen management module, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications. The frozen management module is an application in the electronic device, responsible for freezing and unfreezing applications. The timing of freezing and unfreezing applications can refer to the relevant introduction in the previous and following texts.

[0046] 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.

[0047] The application framework layer may include a freezing anomaly detection module, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0048] The freezing anomaly detection module is used to manage the status information of each application frozen by the freezing management module, and determine whether a freezing anomaly occurs based on the status information. If so, it triggers the freezing management module to restart, thereby solving the freezing anomaly problem. The specific role of the freezing anomaly detection module can be referred to the detailed introduction below. The freezing anomaly detection module can be located in the system service (systemserver) of the application framework layer, or in the system library or other modules, which is not limited here.

[0049] The system service may also include an application not responding (ANR) module, which is used to detect an event in which the electronic device does not respond to user operations and notify the freezing anomaly detection module of the event. Afterwards, the freezing anomaly detection module may determine whether a freezing anomaly currently occurs based on the event.

[0050] Both the freezing anomaly detection module and the ANR module can run in the process of the system service.

[0051] By setting up a freezing anomaly detection module, it is possible to monitor whether an anomaly occurs in the freezing management module of the application layer, and to promptly execute a recovery mechanism when an anomaly occurs in the freezing management module to avoid freezing the screen or to quickly recover the frozen screen.

[0052] 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, capture the screen, etc.

[0053] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0054] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0055] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).

[0056] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0057] 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, an electronic device vibrates, an indicator light flashes, etc.

[0058] The runtime can refer to all code libraries, frameworks, etc. required for the program to run. For example, for the C language, the runtime includes a series of function libraries required for the C program to run. For the Java language, in addition to the core library, the runtime also includes the virtual machine required for the Java program to run. The above core library may include the function functions that the Java language needs to call.

[0059] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0060] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0061] 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.

[0062] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0063] A 2D graphics engine is a drawing engine for 2D drawings.

[0064] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0065] Figure 2A flowchart of a method for detecting freezing anomalies in an application provided in an embodiment of the present application. The method involves the interaction between the following modules: a zygote process, a freezing anomaly detection module, a freezing management module, and multiple applications. The zygote process is the parent process of all processes, and it creates the systemserver process and the application process in the form of fork. The interaction of the above modules can be considered as the interaction of the processes of each module.

[0066] refer to Figure 2 , the method may include the following steps:

[0067] S11, the electronic device starts system services and N applications, and the N applications may include a freezing management module and some other applications.

[0068] This step may specifically include:

[0069] S1101, the zygote process starts the process corresponding to the freezing anomaly detection module, such as the system server process.

[0070] S1102, the zygote process starts the process of the freezing management module.

[0071] S1103, the zygote process starts processes of N applications respectively, where N is an integer greater than or equal to 1.

[0072] S1103 may be a step performed by the electronic device after receiving a user operation to start a corresponding application. The N applications may be applications installed in the electronic device. S1103 is illustrated by taking the process of starting application A and the process of starting application B as an example. S1101 and S1102 may be steps performed immediately after the electronic device is turned on, and the order of these two steps is not limited.

[0073] S12, the electronic device manages status information of each frozen application.

[0074] Specifically, after freezing an application, the electronic device will record the status information of the frozen application; after unfreezing the application, the electronic device will delete the recorded status information of the unfrozen application. This is equivalent to recording the status information of the currently frozen application in the electronic device. In this way, the electronic device can know which applications are currently frozen through the recorded status information.

[0075] Taking application A among the N applications in S1103 as an example, S12 is expanded to introduce the process of the electronic device managing the status information of application A.

[0076] S1201, application A switches from foreground operation to background operation.

[0077] This step can be triggered by user operation. Users can switch some applications from foreground to background according to actual needs. After application A is switched to background, application A is not visible on the display screen of the electronic device, and the user does not interact directly with application A, but the background application continues to run and occupies certain system resources in the background. Generally, foreground applications occupy more system resources than background applications.

[0078] S1202: If the freezing management module detects that the duration of application A running in the background exceeds a preset duration, application A is frozen.

[0079] The preset duration can be set as needed and is not limited here. The definition of freezing application can be found in the previous text.

[0080] S1203, the freezing management module sends a freezing message to the freezing anomaly detection module, where the freezing message indicates that application A is frozen.

[0081] S1204, the freezing anomaly detection module records the status information of application A.

[0082] The status information of application A includes one or more of the following: the name of application A, the process ID (PID) of application A, and the package name of application A. The above information may indicate application A. In some embodiments, the status information of application A may also include the freezing time of application A.

[0083] The status information of application A may be sent by the freezing management module to the freezing abnormality detection module in S1203, or the freezing management module may obtain various information of the status information of application A by itself.

[0084] S1205, application A switches from background operation to foreground operation.

[0085] This step can be triggered by a user operation, and the user can switch some applications from background operation to foreground operation according to actual needs. After application A is switched to the foreground, application A is visible on the display screen of the electronic device, and the user can interact with application A directly.

[0086] S1206: After the freezing management module detects that application A switches from the background to the foreground, it unfreezes application A.

[0087] The freezing management module can determine whether an application is currently switched from background operation to foreground operation by the state of the window at the top of each application stack, and when the state of the window at the top of the application stack is in the resume state, it is determined that the application is switched from background operation to foreground operation. Alternatively, the system server can monitor the state of the window at the top of each application stack, and when the state of the window at the top of an application stack is in the resume state, the freezing management module is notified that the state of the window at the top of the application stack is in the resume state.

[0088] S1207, the freezing management module sends a thawing message to the freezing anomaly detection module, where the thawing message indicates that application A is thawed.

[0089] S1208, the freezing anomaly detection module deletes the recorded status information of application A.

[0090] In this way, the freezing anomaly detection module records the status information of which applications, indicating that these applications are currently in a frozen state.

[0091] The above S1201-S1208 describe the process of managing each frozen application when the freezing management module works normally. If the freezing management module is abnormal, it may cause the freezing to fail. The following takes application B among the N applications in S1103 as an example, and takes the freezing management module abnormal as an example, and expands S12 to introduce the process of electronic equipment managing the status information of application A.

[0092] S1209, the electronic device application B switches from foreground operation to background operation.

[0093] S1210: If the freezing management module detects that the duration of application B running in the background exceeds a preset duration, application B is frozen.

[0094] S1211, the freezing management module sends a freezing message to the freezing anomaly detection module, where the freezing message indicates that application B is frozen.

[0095] S1212, the freezing anomaly detection module records the status information of application B.

[0096] S1213, application B switches from background operation to foreground operation.

[0097] If the freezing management module is abnormal, the freezing management module will not defrost application B in response to S1212, nor will it send a defrost message to the freezing abnormality detection module, so that the freezing abnormality detection module will not delete the recorded status information of application B.

[0098] S1201-S1208 and S1209-S1213 introduce the scenarios of the freezing management module under normal and abnormal conditions, which can occur in different time periods.

[0099] S13, after an application is switched from background operation to foreground operation, the electronic device detects whether the application is frozen abnormally.

[0100] S13 can be executed by the freezing anomaly detection module. The system server can monitor the status of the windows at the top of each application stack. When the window status at the top of an application stack is in the resume state, the freezing anomaly detection module is notified that the window status at the top of the application stack is in the resume state. When the freezing anomaly detection module learns that the window status at the top of an application stack is in the resume state, it determines that the application is switched from the background to the foreground. For example, in the example of S12, it can be determined that both application A and application B are switched from the background to the foreground.

[0101] The freezing anomaly detection module detects whether an application switched from the background to the foreground has freezing anomalies, which can include the following methods:

[0102] Mode 1: The freezing anomaly detection module determines whether there is application status information in the recorded information. If so, it is determined that the application has a freezing anomaly; if not, it is determined that the application has no freezing anomaly.

[0103] According to the previous introduction, the freezing anomaly detection module uses the recorded information to understand which applications are currently in a frozen state. After the application switches from background operation to foreground operation, the application should be unfrozen. If the application is still in a frozen state, it can be determined that a freezing anomaly has occurred.

[0104] Method 2, the freezing abnormality detection module determines whether there is application status information in the recorded information. If so, it waits for a period of time and then performs the above judgment again. If the judgment result is still yes, it is determined that the application has a freezing abnormality; or, if a notification of an event that the electronic device does not respond to user operations is received during the waiting period, it is also determined that the application has a freezing abnormality. In other cases, it is considered that the application has no freezing abnormality. The duration can be set as needed, for example, it can be 1S, 2S, etc., and is not limited here.

[0105] In mode 2, if the freezing abnormality detection module first determines whether there is application status information in the recorded information and the result is yes, it cannot be determined whether the application has freezing abnormality temporarily. After more abnormal performance occurs (i.e., the result of the re-determination after a period of time is still yes, or the electronic device does not respond event occurs), it is confirmed that the application has freezing abnormality. In this way, the accuracy of the result that the application has freezing abnormality can be guaranteed.

[0106] Among them, an unresponsive event refers to an electronic device that does not respond after receiving a user operation (such as a touch operation, voice command, gesture, etc.) input by the user, that is, the electronic device freezes. The unresponsive event can be detected by the ANR module in the electronic device, and the ANR module notifies the freezing abnormality detection module after detection. In some embodiments, after the ANR module detects the unresponsive event, it can also display a pop-up box through the display screen of the electronic device to ask the user whether to close the application currently running in the foreground, that is, the application corresponding to the unresponsive event. In this way, the user can decide whether to close the application according to actual needs.

[0107] Since the recovery process of the top window of the application stack and the process of unfreezing the application by the freezing management module may be processed in parallel, after the freezing anomaly detection module learns that the top window of the application stack has been restored, the freezing management module may also be unfreezing the application in parallel but has not yet completed the unfreezing, and may not be completed until some time later. Based on this, method 2 can accurately detect the phenomenon of application freezing anomalies.

[0108] like Figure 3 As shown, method 2 may include the following steps:

[0109] 1. The freezing anomaly detection module first determines whether there is application status information in the recorded information.

[0110] If the result of step 1 is yes, go to step 2; if the result of step 1 is no, go to step 6.

[0111] 2. Start the timer. The duration of the timer can be set as needed, for example, 1S, 2S, etc., and there is no limitation here.

[0112] After step 2, you can proceed to step 3 or 4.

[0113] 3. After the timer expires, the freezing anomaly detection module determines again whether there is application status information in the recorded information.

[0114] If the result of step 3 is yes, go to step 5; if the result of step 3 is no, go to step 6.

[0115] 4. During the timer operation, determine whether a notification of an event in which the electronic device does not respond to a user operation is received.

[0116] If the result of step 4 is yes, stop the timer and go to step 5; if the result of step 4 is no, go to step 3.

[0117] 5. Confirm that the application has freezing abnormality.

[0118] 6. Confirm that the application does not experience freezing abnormalities.

[0119] Taking the application B in the previous article as an example, if an exception occurs in the freezing management module, after the application B switches from background operation to foreground operation, the freezing anomaly detection module can detect that the application B has a freezing anomaly.

[0120] If the judgment result of S13 is yes, that is, the electronic device can determine that the application currently switched to the foreground has a freezing abnormality, then continue to execute S14; if the judgment result of S13 is no, the electronic device can determine that the application has not a freezing abnormality.

[0121] S14, the electronic device unfreezes the abnormally frozen application.

[0122] In S14, the freezing management module may be triggered by the freezing abnormality detection module to execute.

[0123] One way of S14 is to restart the freezing management module. After restarting the freezing management module, the freezing management module can first unfreeze all frozen applications (such as application B) in the electronic device, and then freeze some applications according to the status of each application in the current electronic device and the rules for freezing applications. At this time, the frozen applications do not include applications that have been switched to the foreground. In this way, the applications switched from the background to the foreground can be unfrozen, so as to provide the user with the application services he needs.

[0124] If the processing of S13-S14 is fast enough, the application will have been unfrozen when the electronic device displays the application window, which can avoid freezing the screen. If the processing of S13-S14 takes a while, the electronic device may freeze the screen for a period of time when displaying the application window, and then the application will be unfrozen, which can also quickly restore the frozen screen. It can be seen that the method provided in the embodiment of the present application manages the status information of the freezing process through the freezing anomaly detection module, and triggers the freezing management module to restart when a freezing anomaly is detected, which can avoid freezing the screen or quickly restore the frozen screen, thereby improving the user experience.

[0125] In some implementations, the electronic device may further output a first prompt message after restarting the freezing management module, for indicating the reason for the freezing screen, wherein the reason for the freezing screen refers to an abnormality in the freezing management module.

[0126] The electronic device provided by the embodiments of the present application is introduced below.

[0127] Figure 4 The hardware structure diagram of the electronic device 100 provided in the embodiment of the present application is shown. The electronic device 100 is used to execute the detection method and electronic device of the abnormal freezing application provided in the above method embodiment.

[0128] The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, an antenna 103A, an antenna 104A, a power switch 105, a sensor module 106, a focus motor 107, a camera 108, a display screen 109, etc. Among them, the sensor module 106 may include a gyroscope sensor 106A, an acceleration sensor 106B, an ambient light sensor 106C, an image sensor 106D, a distance sensor 106E, etc. Among them, the wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above multiple parts can transmit data through a bus.

[0129] The processor 101 may include one or more processing units, for example, the processor 101 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.

[0130] The memory 102 may be used to store computer executable program codes, and the executable program codes may include instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the memory 102. The memory 102 may include a program storage area and a data storage area. In a specific implementation, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.

[0131] The wireless communication function of the electronic device 100 can be implemented through the antenna 103A, the antenna 104A, the mobile communication module 104, the wireless communication module 103, the modem processor and the baseband processor.

[0132] Antenna 103A and antenna 104A can be used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.

[0133] The mobile communication module 104 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 104 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 104 can receive electromagnetic waves through the antenna 104A, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 104 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 104A.

[0134] The modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is transmitted to the application processor. The application processor outputs a sound signal through an audio device, or displays an image or video through the display screen 109.

[0135] The wireless communication module 103 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 103 can be one or more devices integrating at least one communication processing module. The wireless communication module 103 receives electromagnetic waves via the antenna 103A, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 101. The wireless communication module 103 can also receive the signal to be sent from the processor 101, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 103A.

[0136] The power switch 105 may be used to control the supply of power to the electronic device 100 .

[0137] The gyro sensor 106A can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 106A. The gyro sensor 106A can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 106A detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 106A can also be used for navigation and somatosensory game scenes.

[0138] The acceleration sensor 106B can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device. For example, the acceleration sensor 106B can be applied to applications such as horizontal and vertical screen switching, pedometers, etc.

[0139] The ambient light sensor 106C is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 109 according to the sensed brightness of the ambient light. The ambient light sensor 106C can also be used to automatically adjust the white balance when taking pictures.

[0140] The image sensor 106D, also known as a photosensitive element, can utilize the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal that is proportional to the light image. The image sensor can be a charge coupled device (CCD) sensor or a complementary metal-oxide-semiconductor (CMOS) sensor.

[0141] The distance sensor 106E can be used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some shooting scenarios, the electronic device 100 can use the distance sensor 106E to measure the distance to achieve fast focusing.

[0142] The focus motor 107 can be used for fast focusing. The electronic device 100 can control the movement of the lens through the focus motor 107 to achieve automatic focusing.

[0143] The electronic device 100 can realize the shooting function through the ISP, the camera 108, the video codec, the GPU, the display screen 109 and the application processor.

[0144] The ISP is used to process the data fed back by the camera 108. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 108.

[0145] The camera 108 can be used to capture still images or videos. The object generates an optical image through the lens and projects it onto the image sensor. The image sensor can convert the optical signal into an electrical signal, and then transmit the electrical signal to the ISP to convert it into a digital image signal. The ISP can output the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 108, where N is a positive integer greater than 1.

[0146] The video codec is used to compress or decompress digital images. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can open or save pictures or videos in multiple coding formats.

[0147] The electronic device 100 can realize the display function through a GPU, a display screen 109, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 109 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 101 may include one or more GPUs, which execute program instructions to generate or change display information.

[0148] The display screen 109 is used to display images, videos, etc. The display screen 109 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 109, where N is a positive integer greater than 1.

[0149] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some 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.

[0150] In the embodiment of the present application, the memory 102 stores a computer program for implementing the method for detecting abnormal freezing of an application provided in the embodiment of the present application, and the processor 101 is used to call the computer program to implement the method. The operations performed by each device in the electronic device 100 can be specifically referred to the relevant description of the method embodiment above, and will not be elaborated in detail here.

[0151] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0152] The present application also provides an electronic device, which may include a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the method executed by the electronic device in any one of the above embodiments.

[0153] The present application also provides a chip system, which includes at least one processor, for implementing the method executed by the electronic device in any of the above embodiments. In a possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0154] A chip system can be composed of chips or include chips and other discrete devices.

[0155] Optionally, there may be one or more processors in the chip system. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0156] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0157] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0158] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method executed by the electronic device in any one of the above embodiments is implemented.

[0159] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the method executed by the electronic device in any of the above embodiments.

[0160] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0161] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the 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 a 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) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0162] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0163] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0164] The terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0165] In short, the above is only an embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included in the protection scope of this application.

Claims

1. A method for detecting freezing anomalies, characterized in that: Applied to electronic equipment, the method comprises: Detecting that a first application in the electronic device switches from foreground operation to background operation, and the duration of the background operation exceeds a first duration; freezing the first application; Detecting that the first application switches from background operation to foreground operation; Determining whether the first application is not unfrozen according to the recorded state information of the application currently in the frozen state; If the first application is not unfrozen, unfreeze the first application.

2. The method according to claim 1, characterized in that Judging whether the first application is not unfrozen according to the recorded state information of the application currently in the frozen state specifically includes: If the recorded state information of the application currently in the frozen state includes the state information of the first application, confirming that the first application is not unfrozen; If the recorded state information of the application currently in the frozen state does not include the state information of the first application, it is confirmed that the first application has been unfrozen.

3. The method according to claim 1, characterized in that: Judging whether the first application is not unfrozen according to the recorded state information of the application currently in the frozen state specifically includes: Only in the following cases, it is confirmed that the first application is not unfrozen: After detecting that the first application switches from background operation to foreground operation, the state information of the application currently in the frozen state recorded includes the state information of the first application, and after a second period of time has passed, the state information of the application currently in the frozen state recorded still includes the state information of the first application; or, After detecting that the first application switches from background operation to foreground operation, the state information of the application currently in the frozen state recorded includes the state information of the first application, and an event of not responding to user operations is detected within a second time period.

4. The method according to any one of claims 1 to 3, characterized in that: Unfreezing the first application specifically includes: Thaw all frozen applications.

5. The method according to claim 4, characterized in that After thawing all frozen applications, the method further comprises: An application that is switched to background operation and has been running in the background for more than the first time period is frozen.

6. The method according to any one of claims 1 to 5, characterized in that: The electronic device includes a freezing management module, and the freezing management module is used to freeze the first application and unfreeze the first application.

7. The method according to any one of claims 1 to 6, characterized in that: The electronic device further includes a freezing abnormality detection module, and the freezing abnormality detection module is used to record status information of frozen applications in the electronic device.

8. The method according to claim 7, characterized in that The freezing anomaly detection module is specifically used to record the status information of the application when the electronic device freezes the application, and to delete the recorded status information of the application when the electronic device thaws the application.

9. The method according to claim 8, characterized in that The freezing anomaly detection module is further used to determine whether the first application is not thawed.

10. The method according to any one of claims 1 to 7, characterized in that: The status information of the application includes one or more of the following: the name of the application, the process identifier PID of the application, and the package name of the application.

11. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

13. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Application management method and electronic device

    CN106125882A

  • Application freezing method and system

    CN106250177A

  • Information processing method and device, computer device and computer readable storage medium

    CN110007968A

  • Application freezing method and device, storage medium and electronic device

    CN110908727A

  • Multitasking method and electronic device therefor

    US20150160976A1