System exception processing method and device and storage medium
By monitoring and analyzing system exceptions, dynamically adjusting the exception level and selecting appropriate recovery plans, the problem of the inability to execute different recovery strategies according to different exceptions in the prior art is solved, and the stable operation of the system and data backup are achieved.
Patent Information
- Application Number
- CN202311247589.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-03-25
AI Technical Summary
When handling system exceptions, the prior art cannot execute different recovery strategies according to different exceptions, resulting in the system being unable to maintain stable operation, and the stability of the rescue program is affected by the system.
By monitoring system operation exceptions, determine the exception type and level, based on the correspondence between the exception type, level and recovery plan, select the appropriate recovery plan for system recovery, and dynamically adjust the exception level to deal with different exception situations.
It implements targeted recovery processing according to different system exception types and levels, ensures stable system operation, reduces the unavailability time of equipment, and backs up data when an exception occurs.
Smart Images

Figure CN119690741A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a system exception handling method, device and storage medium. Background Art
[0002] With the development of computer technology, system exception handling methods are mostly based on rescue procedures.
[0003] In the related art, kernel and abnormality detection is implemented based on CPU abnormal terminal, watchdog and other mechanisms. When an abnormality is detected, a restart or reset operation will be triggered. However, when solving such problems, the rescue program in the related art usually restarts the device and enters the recovery mode for different abnormalities, and then prompts the user to restore the factory settings. It is unable to implement different recovery strategies according to different abnormalities to ensure that the system maintains stable operation. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a system exception handling method, device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a system exception handling method is provided, comprising: in response to monitoring a system operation abnormality during the operation of an electronic device system, determining a current system exception type and a current system exception level; based on a correspondence between the system exception type, the system exception level and the system recovery plan, determining a current system recovery plan that matches the current exception type and the current exception level, and performing system recovery based on the determined current system recovery plan; wherein the correspondence includes a plurality of system exception types, each of the plurality of system exception types corresponds to a plurality of different system exception levels, and different system exception levels correspond to different system recovery plans.
[0006] In one embodiment, each system abnormality level of each system abnormality type in the multiple system abnormality types corresponds to a system abnormality level threshold, the system abnormality level threshold is the number of system abnormalities, the first system abnormality level corresponds to the first system abnormality number, the second system abnormality level corresponds to the second system abnormality number, the first system abnormality level and the second system abnormality level are adjacent levels, and the first system abnormality level is lower than the second system abnormality level, and the first system abnormality number is less than the second system abnormality number; the method also includes: in response to monitoring system operation abnormality during the operation of the electronic device system, determining the number of system abnormalities under the current system abnormality type; in response to the number of system abnormalities at the first system abnormality level reaching the system abnormality level threshold, and determining that the duration of the first system abnormality level is less than the first time threshold, and / or determining that the duration of the first system abnormality number is less than the second time threshold, adjusting the system abnormality level from the first system abnormality level to the second system abnormality level.
[0007] In one embodiment, after the system exception level is adjusted from the first system exception level to the second system exception level, the method further includes: storing the timestamp of adjusting the system exception level from the first system exception level to the second system exception level in a system exception level queue, and clearing the timestamp in a system exception count queue; wherein the system exception level queue stores the timestamp of the change in the system exception level, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0008] In one embodiment, determining that the duration of the first system exception level is less than a first time threshold includes: if the difference between the timestamp stored at the head of the system exception level queue and the first timestamp is less than the first time threshold, determining that the duration of the first system exception level is less than the first time threshold; the first timestamp is the timestamp when the number of system exceptions reaches the system level threshold; wherein, the system exception level queue stores the timestamp of the system exception level change, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0009] In one embodiment, determining that the duration of the first system anomaly count is less than a second time threshold includes: if the difference between the timestamp stored at the head of the system anomaly count queue and the second timestamp is less than the second time threshold, determining that the duration of the first system anomaly count is less than the second time threshold; the second timestamp is the timestamp when the system anomaly count reaches the second system anomaly count; wherein, the system anomaly count queue stores the timestamp when the system anomaly count changes, and the timestamp stored at the head of the system anomaly count queue is the earliest timestamp in the queue.
[0010] In one embodiment, the correspondence between the system exception type, the system exception level and the system recovery plan satisfies at least one of the following: when the system exception level is lower than the exception level threshold, different system exception types at the same system exception level correspond to the same system recovery plan; when the system exception level is higher than the exception level threshold, different system exception types at the same system exception level correspond to different system recovery plans, and the same system exception type at different system exception levels corresponds to different system recovery plans.
[0011] In one embodiment, the same system recovery scheme includes deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values; wherein, deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values each correspond to a different system abnormality level, and the system abnormality levels increase sequentially.
[0012] In one implementation, when the system abnormality level is higher than the abnormality level threshold, the correspondence between the system abnormality type, the system abnormality level, and the system recovery solution satisfies at least one of the following: wherein the abnormality type is a system abnormality, then: the system abnormality level is at the first level, the system abnormality information is recorded in the database, and the device is restarted; or
[0013] The system abnormality level is at the second level, resetting the system settings to the system default values and deleting the settings that do not contain the system default values; or
[0014] If the system abnormality level is at the third level or above, the system is restarted to enter the system rescue mode;
[0015] If the abnormality type is system service and core component, then: the abnormality level of system service and core component is at the first level, and the configuration information corresponding to the initial system service or core component is restored; or
[0016] The abnormal level of the system services and core components is at the second level, resetting the system settings of the system services and core components to the system default values, deleting the settings that do not contain the system default values, deleting the configuration information corresponding to the system services or core components, forcing the system services and core components to initialize, recording system crash information, and restarting the device; or
[0017] If the abnormality level of system services and core components is at level 3 or above, the system is restarted and enters system rescue mode;
[0018] If the exception type is the system user interface, then: the system user interface exception level is at the first level, and the cache and user data of the system user interface, as well as the wallpaper information, are deleted; or
[0019] The system user interface abnormality level is at the second level, resetting the system settings of the system user interface to the system default values, deleting the settings that do not include the system default values of the system user interface, and rolling back to the system user interface version, recording the system abnormality information, and restarting the device; or
[0020] When the system user interface abnormality level is at level 3 or above, data transmission mode is enabled;
[0021] If the exception type is a resident application, then: the resident application exception level is at the first level, and the cache and user data of the resident application are deleted; or
[0022] The resident application exception level is at the second level, and the resident application version is rolled back; or
[0023] The resident application exception level is at level 3 or above, and the resident application exception is prohibited from being activated by the system again;
[0024] If the exception type is the system desktop, then: the system desktop exception level is at the first level, and the cache and user data of the system desktop are deleted; or
[0025] The system desktop abnormality level is at the second level, and the system desktop version is rolled back; or
[0026] When the system desktop abnormality level is at the third level or above, the system desktop is replaced with a streamlined and stable desktop; the first level and the second level of the different types of abnormality levels are adjacent levels, and the second level and the third level are adjacent levels, the first level is smaller than the second level, the second level is smaller than the third level, and the first level and the abnormality level threshold are the same level.
[0027] In one embodiment, the system exception method also includes: determining an unknown exception type and recording the unknown exception type in a system database; analyzing the unknown exception type and determining the correspondence between the exception level of the unknown exception type and the system recovery plan; the correspondence between the unknown exception type, the exception level of the unknown exception type and the system recovery plan is any one of the correspondences that does not belong to the system exception type, the system exception level and the system recovery plan.
[0028] According to a second aspect of an embodiment of the present disclosure, there is provided a system exception handling device, comprising:
[0029] A monitoring unit is used to determine the current system abnormality type and the current system abnormality level in response to monitoring system operation abnormality during the operation of the electronic equipment system; a determination unit is used to determine the current system recovery plan that matches the current abnormality type and the current abnormality level based on the correspondence between the system abnormality type, the system abnormality level and the system recovery plan, and perform system recovery based on the determined current system recovery plan; wherein the correspondence includes multiple system abnormality types, each of the multiple system abnormality types corresponds to multiple different system abnormality levels, and different system abnormality levels correspond to different system recovery plans.
[0030] In one embodiment, the monitoring unit adopts the following method: each system abnormality level of each system abnormality type in the multiple system abnormality types corresponds to a system abnormality level threshold, the system abnormality level threshold is the number of system abnormalities, the first system abnormality level corresponds to the first system abnormality number, the second system abnormality level corresponds to the second system abnormality number, the first system abnormality level and the second system abnormality level are adjacent levels, and the first system abnormality level is lower than the second system abnormality level, and the first system abnormality number is less than the second system abnormality number; the monitoring unit is also used to: in response to monitoring system operation abnormality during the operation of the electronic device system, determine the number of system abnormalities under the current system abnormality type; in response to the number of system abnormalities at the first system abnormality level reaching the second system abnormality number corresponding to the second system abnormality level threshold, and determining that the duration of the first system abnormality level is less than the first time threshold, and / or determining that the duration of the first system abnormality number is less than the second time threshold, adjust the system abnormality level from the first system abnormality level to the second system abnormality level.
[0031] In one embodiment, after the system exception level is adjusted from the first system exception level to the second system exception level, the monitoring unit is also used to: store the timestamp of adjusting the system exception level from the first system exception level to the second system exception level in the system exception level queue, and clear the timestamp in the system exception count queue; wherein the system exception level queue stores the timestamp of the change in the system exception level, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0032] In one embodiment, the determination unit determines that the duration of the first system exception level is less than a first time threshold in the following manner: if the difference between the timestamp stored at the head of the system exception level queue and the first timestamp is less than the first time threshold, then it is determined that the duration of the first system exception level is less than the first time threshold; the first timestamp is the timestamp when the number of system exceptions reaches the timestamp system level threshold of the second system exception number; wherein, the system exception level queue stores the timestamp of the system exception level change, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0033] In one embodiment, the determination unit determines that the duration of the first system anomaly count is less than a second time threshold in the following manner: if the difference between the timestamp stored at the head of the system anomaly count queue and the second timestamp is less than the second time threshold, then it is determined that the duration of the first system anomaly count is less than the second time threshold; the second timestamp is the timestamp when the system anomaly count reaches the second system anomaly count; wherein, the system anomaly count queue stores the timestamp when the system anomaly count changes, and the timestamp stored at the head of the system anomaly count queue is the earliest timestamp in the queue.
[0034] In one embodiment, the determination unit determines that the correspondence between the system abnormality type, the system abnormality level, and the system recovery plan satisfies at least one of the following items in the following manner: when the system abnormality level is lower than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to the same system recovery plan; when the system abnormality level is higher than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to different system recovery plans, and the same system abnormality type at different system abnormality levels corresponds to different system recovery plans.
[0035] In one embodiment, the determination unit adopts the following same system recovery scheme including deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values; wherein, deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values respectively correspond to different system abnormality levels, and the system abnormality levels increase successively.
[0036] In one embodiment, the determination unit adopts the following method: when the system abnormality level is higher than the abnormality level threshold, the corresponding relationship between the system abnormality type, the system abnormality level and the system recovery scheme satisfies at least one of the following: wherein the abnormality type is a system abnormality, then: the system abnormality level is at the first level, the system abnormality information is recorded in the database, and the device is restarted; or
[0037] The system abnormality level is at the second level, resetting the system settings to the system default values and deleting the settings that do not contain the system default values; or
[0038] If the system abnormality level is at the third level or above, the system is restarted to enter the system rescue mode;
[0039] If the abnormality type is system service and core component, then: the abnormality level of system service and core component is at the first level, and the configuration information corresponding to the initial system service or core component is restored; or
[0040] The abnormal level of the system services and core components is at the second level, resetting the system settings of the system services and core components to the system default values, deleting the settings that do not contain the system default values, deleting the configuration information corresponding to the system services or core components, forcing the system services and core components to initialize, recording system crash information, and restarting the device; or
[0041] If the abnormality level of system services and core components is at level 3 or above, the system is restarted and enters system rescue mode;
[0042] If the exception type is the system user interface, then: the system user interface exception level is at the first level, and the cache and user data of the system user interface, as well as the wallpaper information, are deleted; or
[0043] The system user interface abnormality level is at the second level, resetting the system settings of the system user interface to the system default values, deleting the settings that do not include the system default values of the system user interface, and rolling back to the system user interface version, recording the system abnormality information, and restarting the device; or
[0044] When the system user interface abnormality level is at level 3 or above, data transmission mode is enabled;
[0045] If the exception type is a resident application, then: the resident application exception level is at the first level, and the cache and user data of the resident application are deleted; or
[0046] The resident application exception level is at the second level, and the resident application version is rolled back; or
[0047] The resident application exception level is at level 3 or above, and the resident application exception is prohibited from being activated by the system again;
[0048] If the exception type is the system desktop, then: the system desktop exception level is at the first level, and the cache and user data of the system desktop are deleted; or
[0049] The system desktop abnormality level is at the second level, and the system desktop version is rolled back; or
[0050] When the system desktop abnormality level is at the third level or above, the system desktop is replaced with a streamlined and stable desktop; the first level and the second level of the different types of abnormality levels are adjacent levels, and the second level and the third level are adjacent levels, the first level is smaller than the second level, the second level is smaller than the third level, and the first level and the abnormality level threshold are the same level.
[0051] In one embodiment, the determination unit is also used to determine the unknown exception type and record the unknown exception type in the system database; analyze the unknown exception type and determine the correspondence between the exception level of the unknown exception type and the system recovery plan; the correspondence between the unknown exception type, the exception level of the unknown exception type and the system recovery plan is any one of the correspondences that does not belong to the system exception type, the system exception level and the system recovery plan.
[0052] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to execute the executable instructions to execute the display control method in the first aspect or any one of the embodiments of the first aspect.
[0053] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the system exception handling method in the first aspect or any one of the implementations of the first aspect.
[0054] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: determining the severity of the abnormalities corresponding to different abnormal types according to the different abnormal types monitored by the system, performing recovery processing on the analyzed abnormal conditions, accurately processing system abnormal conditions and ensuring that user data information is preserved.
[0055] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0057] Figure 1 The present invention is a flowchart of a method for handling system exceptions according to an exemplary embodiment.
[0058] Figure 2 The figure is a flowchart showing a system level adjustment according to an exemplary embodiment.
[0059] Figure 3 The figure is a flowchart of a system-level adjusted timestamp processing according to an exemplary embodiment.
[0060] Figure 4 The figure is a flow chart showing a system recovery solution according to an exemplary embodiment.
[0061] Figure 5 is a system schematic diagram shown according to an exemplary embodiment.
[0062] Figure 6 The diagram is a schematic diagram showing the startup and interaction of a system and a rescue program according to an exemplary embodiment.
[0063] Figure 7a The figure is a flow chart of a system recovery solution according to an exemplary embodiment.
[0064] Figure 7b The figure is a flowchart of system recovery with a system abnormality level of 4 according to an exemplary embodiment.
[0065] Figure 7c The following is a flowchart of a system recovery process with a system abnormality level of 5 according to an exemplary embodiment.
[0066] Figure 7d The present invention is a flowchart of a system recovery process when the system abnormality level is 6 or above according to an exemplary embodiment.
[0067] Figure 8 The diagram is a schematic diagram showing a system user interface abnormality according to an exemplary embodiment.
[0068] Fig. 9 The present invention is a block diagram of a system exception handling device according to an exemplary embodiment.
[0069] Fig.10 The present invention is a block diagram of a device for handling system exceptions according to an exemplary embodiment. DETAILED DESCRIPTION
[0070] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0071] The system exception handling method provided in the embodiment of the present disclosure is applied to the system kernel exception scenario. The system exception handling method involved in the embodiment of the present disclosure is mainly applied to the scenario of system operation. For example, it is applied to the scenario of system core program exception.
[0072] In the system exception handling method in the related technology, when the electronic device is running, the system kernel realizes exception detection through CPU exception interrupt, watchdog and other mechanisms. When an exception is detected, if it is a serious exception, it will trigger a restart or reset operation. At this time, when the rescue program is solving such problems, on the one hand, when there is no obvious perceived problem, it triggers a restart or even enters the recovery system, so that the mechanism will cause the device that could have been used normally to become unusable. On the other hand, when an exception occurs in the early stage of the system, the rescue program cannot be perceived and cannot be triggered.
[0073] In addition, in the related art, there is no way to specifically solve the various abnormal situations that cause system abnormalities during system operation. For example, in the case of problems with the display screen of an electronic device, the system cannot solve the problem of the display screen alone and can only restart or reset the running system. However, this solution usually restores the system at the cost of data loss. In addition, the rescue program in the related art is highly coupled with the system, which makes it difficult to migrate to other systems. The stability of the rescue program is affected by the system, and many systems cannot be detected by abnormalities early on, resulting in the upper layer of the device wirelessly restarting and getting stuck on the startup animation.
[0074] In view of this, the present disclosure provides a system exception handling method, which executes different recovery strategies for different system exceptions, and modifies the strategy in the related technology that the rescue program causes the complete unavailability of the device side, thereby reducing the device unavailability time, improving the stability of the system, and backing up data when an exception occurs.
[0075] Figure 1 FIG. 1 is a flowchart of a method for handling system exceptions according to an exemplary embodiment. Figure 1 As shown, the system abnormality handling method is used in an electronic device, comprising the following steps:
[0076] In step S11, in response to monitoring system operation abnormality during operation of the electronic device system, the current system abnormality type and the current system abnormality level are determined.
[0077] In the embodiment of the present disclosure, based on the anomalies monitored during the operation of the electronic device, the system operation anomaly is analyzed and the name of the abnormal component is recorded. The abnormal component includes a system operation anomaly label of the system abnormality information, such as a description of the system abnormality information, the abnormality type and the abnormality level.
[0078] Among them, the system exception type can be understood as the exceptions of different core programs of the system, such as system kernel exceptions, system service and core component exceptions, system user interface exceptions, resident application exceptions or system desktop exceptions, etc. It can also be understood as system unknown exceptions. The system exception level can be understood as the severity of the system under the current exception type.
[0079] In step S12, based on the correspondence between the system abnormality type, the system abnormality level and the system recovery plan, a current system recovery plan matching the current abnormality type and the current abnormality level is determined, and the system is restored based on the determined current system recovery plan.
[0080] In the disclosed embodiment, a system recovery plan is determined, the system exception type is obtained according to the system exception label, and the system exception levels of different system exception types are analyzed according to the system exception type to determine a system recovery plan that matches the exception level in the current exception type.
[0081] The system recovery solution can be understood as a recovery method based on the analyzed system abnormality type and system abnormality level to maintain the normal use of the electronic device.
[0082] In the disclosed embodiment, the corresponding relationship includes multiple system abnormality types, each of the multiple system abnormality types corresponds to multiple different system abnormality levels, and different system abnormality levels correspond to different system recovery solutions.
[0083] In the disclosed embodiment, the system recovery operation is accurately performed according to different exceptions and exception severity levels, thereby avoiding unnecessary system data loss due to the recovery of the upper-layer applications of the system.
[0084] Figure 2 FIG. 1 is a flowchart showing a system level adjustment according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0085] In the embodiment of the present disclosure, each system abnormality level of each system abnormality type in multiple system abnormality types corresponds to a system abnormality level threshold, the system abnormality level threshold is the number of system abnormalities, the first system abnormality level corresponds to the first system abnormality number, the second system abnormality level corresponds to the second system abnormality number, the first system abnormality level and the second system abnormality level are adjacent levels, and the first system abnormality level is lower than the second system abnormality level, and the first system abnormality number is less than the second system abnormality number.
[0086] Among them, the system abnormality level threshold can be understood as the number of abnormalities that occur in the system under the current abnormality type within a certain period of time, which is a fixed value, for example, it can be 5 times. The first system abnormality level can be understood as the degree of system abnormality of the system under the current abnormality type. The second system abnormality level can be understood as the system abnormality level of the system under the current abnormality type that is adjacent to and higher than the first system abnormality level. The first system abnormality number can be understood as the abnormality that occurs in the system at the current moment corresponding to the current system abnormality type. The second system abnormality number can be understood as the abnormality that occurs at the most recent moment after multiple system abnormalities occur within a period of time from the abnormality that occurs in the system at the current moment. The first system abnormality number is less than the second abnormality number, and the second abnormality number includes the first abnormality number.
[0087] In step S21, in response to monitoring a system operation abnormality during operation of the electronic device system, the number of system abnormalities under the current system abnormality type is determined.
[0088] In the embodiment of the present disclosure, based on the anomalies detected during the operation of the electronic device, the number of system anomalies under the current system anomaly type within a period of time is counted.
[0089] In step S22, in response to the number of system abnormalities at the first system abnormality level reaching the system abnormality level threshold, and determining that the duration of the first system abnormality level is less than the first time threshold, and / or determining that the duration of the first system abnormality number is less than the second time threshold, the system abnormality level is adjusted from the first system abnormality level to the second system abnormality level.
[0090] In the embodiment of the present disclosure, based on the current system abnormality level being at the first system abnormality level, the number of system abnormalities at the current level is counted, the number of abnormalities occurring within a certain period of time is recorded, and the most recent abnormality occurring within a certain period of time is selected as the second system abnormality number, thereby adjusting the first system abnormality level to the second system abnormality level.
[0091] Among them, the first time threshold can be understood as the time required for the system to adjust to another abnormal level under the current abnormal level, which is a fixed value, for example, a minutes. The second time threshold can be understood as the time required for the system to have a certain number of abnormalities at the current level, which is a fixed value, for example, b seconds. Both a and b can be arbitrary values.
[0092] In the disclosed embodiment, it is determined whether the number of system exceptions within a certain period of time of the current system exception level reaches the number value of the adjustable system exception level. When the number value of the adjustable system exception level is reached, it is analyzed whether the time difference between the time of the most recent exception and the time point recorded at the previous system exception level meets the time required for the system exception level adjustment. If so, the first system exception level is adjusted to the second system exception level, so as to avoid the deep recovery of the system caused by the adjustment of the exception level when the system exception occurs in a short period of time.
[0093] Figure 3 FIG. 1 is a flowchart showing a system-level adjusted timestamp processing according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0094] In step S31, the system abnormality level is adjusted from the first system abnormality level to the timestamp of the second system abnormality level.
[0095] In the embodiment of the present disclosure, the system abnormality level is adjusted and an identifier indicating the system abnormality level is determined, for example, a timestamp.
[0096] The timestamp for adjusting the system abnormality level from the first system abnormality level to the second system abnormality level can be understood as the time point of the most recent abnormality that occurred in the system within a certain period of time, and the current time point is recorded as the timestamp for adjusting the system abnormality level.
[0097] In step S32, the obtained timestamp is stored in the system exception level queue, and the timestamp in the system exception count queue is cleared.
[0098] In the embodiment of the present disclosure, the timestamp indicating the system abnormality level is stored in the system abnormality level queue, and the remaining timestamps of abnormalities occurring within a certain time are deleted.
[0099] The system exception level queue can be understood as a queue that stores the tail timestamp of the exception counting queue, and the exception counting queue can be understood as a queue that stores the number of exception occurrence timestamps within a certain period of time.
[0100] In the disclosed embodiment, the system exception level queue stores a timestamp of when the system exception level changes, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0101] In the disclosed embodiment, the current system exception level is adjusted according to the number of timestamps stored in the exception counting queue, and the exception level is determined according to the number of timestamps stored in the exception level queue, so as to facilitate the determination of the system exception level.
[0102] In the disclosed embodiment, the time difference between the timestamp stored at the head of the system abnormality level queue and the first timestamp is determined. If the time difference is less than the first time threshold, it is determined that the duration of the first system abnormality level is less than the first time threshold.
[0103] The first timestamp may be understood as being stored in the system exception level queue and used to adjust the system level timestamp.
[0104] In the embodiment of the present disclosure, the first timestamp is the timestamp when the number of system anomalies reaches the system level threshold. It can be understood that the first timestamp is the most recent timestamp when the number of system anomalies within a certain period of time reaches the system level threshold.
[0105] The system exception level queue stores the timestamp of when the system exception level changes, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0106] In the embodiment of the present disclosure, before adjusting the system abnormality level, it should be determined whether the system needs to adjust the system abnormality level.
[0107] In the disclosed embodiment, the time difference between the timestamp stored at the head of the system anomaly count queue and the second timestamp is determined. If the time difference is less than the second time threshold, it is determined that the duration of the first system anomaly count is less than the second time threshold.
[0108] The second timestamp may be understood as the most recent timestamp stored in the system anomaly count queue, and is used to be the timestamp placed in the system level queue when the adjustment level is met.
[0109] In the disclosed embodiment, the second timestamp is the timestamp when the number of system anomalies reaches the system level threshold.
[0110] The system exception count queue stores the timestamps when the system exception count changes, and the head of the system exception count queue stores the earliest timestamp in the queue.
[0111] Figure 4 FIG. 1 is a flowchart of a system recovery solution according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0112] In step S41, the system abnormality level is determined.
[0113] In the embodiment of the present disclosure, the system abnormality level is determined according to the received system abnormality information of the electronic device.
[0114] In step S42, when the system abnormality level is lower than the abnormality level threshold, different system abnormality types of the same system abnormality level correspond to the same system recovery solution.
[0115] In the embodiment of the present disclosure, according to the system abnormality at a low system level, different system abnormalities at the same abnormality level adopt the same recovery solutions at different low levels.
[0116] In step S43, when the system abnormality level is higher than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to different system recovery solutions, and the same system abnormality type at different system abnormality levels corresponds to different system recovery solutions.
[0117] In the disclosed embodiment, according to the system abnormality level being higher than the abnormality level threshold, the abnormality type at the current abnormality level is analyzed, and system processing is performed for different abnormality types, such as adopting different system recovery solutions.
[0118] The abnormal level threshold can be understood as whether it is necessary to distinguish and adopt different system recovery solutions according to different abnormal levels. It is a fixed level, such as level 4.
[0119] In the disclosed embodiment, the system level threshold is used to analyze whether different system exception types are distinguished when performing system recovery under the current level of system exception. The same system recovery plan is used for exception levels that do not distinguish system exception types, and different system recovery plans are used for exception levels that need to distinguish system exception types, so as to accurately complete the recovery of system exceptions.
[0120] In the embodiment of the present disclosure, the same recovery scheme at different lower levels is adopted according to different system exceptions at the same exception level, which can be understood as the following processing situations.
[0121] In the disclosed embodiment, the same system recovery scheme includes deleting all newly added system setting information when the system exception level is at the first level, resetting all untrusted system settings to default values when the system exception level is at the second level, and resetting all trusted system settings to default values when the system exception level is at the third level.
[0122] Among them, the first level, the second level and the third level are system abnormality levels and increase in sequence. The first level is the lowest level of system abnormality, and the third level is the highest level below the system abnormality level threshold.
[0123] In the embodiment of the present disclosure, according to the system abnormality level being higher than the abnormality level threshold, the abnormality type under the current abnormality level is analyzed, and system processing is performed for different abnormality types, such as adopting different system recovery solutions, which can be understood as the following situations.
[0124] In one implementation of the disclosed embodiment, if the abnormality type is a system abnormality, then: the system abnormality level is at the first level, the system abnormality information is recorded in the database, and the device is restarted; or
[0125] The system abnormality level is at the second level, resetting the system settings to the system default values and deleting the settings that do not contain the system default values; or
[0126] If the system abnormality level is at the third level or above, the system is restarted to enter the system rescue mode;
[0127] If the abnormality type is system service and core component, then: the abnormality level of system service and core component is at the first level, and the configuration information corresponding to the initial system service or core component is restored; or
[0128] The abnormal level of the system services and core components is at the second level, resetting the system settings of the system services and core components to the system default values, deleting the settings that do not contain the system default values, deleting the configuration information corresponding to the system services or core components, forcing the system services and core components to initialize, recording system crash information, and restarting the device; or
[0129] If the abnormality level of system services and core components is at level 3 or above, the system is restarted and enters system rescue mode;
[0130] If the exception type is the system user interface, then: the system user interface exception level is at the first level, and the cache and user data of the system user interface, as well as the wallpaper information, are deleted; or
[0131] The system user interface abnormality level is at the second level, resetting the system settings of the system user interface to the system default values, deleting the settings that do not include the system default values of the system user interface, and rolling back to the system user interface version, recording the system abnormality information, and restarting the device; or
[0132] When the system user interface abnormality level is at level 3 or above, data transmission mode is enabled;
[0133] If the exception type is a resident application, then: the resident application exception level is at the first level, and the cache and user data of the resident application are deleted; or
[0134] The resident application exception level is at the second level, and the resident application version is rolled back; or
[0135] The resident application exception level is at level 3 or above, and the resident application exception is prohibited from being activated by the system again;
[0136] If the exception type is the system desktop, then: the system desktop exception level is at the first level, and the cache and user data of the system desktop are deleted; or
[0137] The system desktop abnormality level is at the second level, and the system desktop version is rolled back; or
[0138] When the abnormality level of the system desktop is at the third level or above, the system desktop is replaced with a streamlined and stable desktop.
[0139] Among them, different types of abnormality levels can be understood as the first level, the second level and the third level, the first level and the second level are adjacent levels, and the second level and the third level are adjacent levels, the first level is smaller than the second level, the second level is smaller than the third level, and the first level and the abnormality level threshold are the same level.
[0140] In the disclosed embodiment, known exception types are restored based on the exceptions detected by the system, unknown exception types are recorded in the system database, and the exception levels of the unknown exception types recorded in the system database and the corresponding system recovery solutions are analyzed.
[0141] In the disclosed embodiment, the known system anomalies are analyzed for their abnormality levels and corresponding system recovery plans, the unknown system anomalies are recorded in a database, and the severity of the unknown anomalies is analyzed, and the system recovery plan for the unknown anomalies is confirmed based on the severity of the unknown anomalies.
[0142] In the embodiment of the present disclosure, in the scenario of system operation, system operation anomalies are detected, and different recovery strategies are executed according to different anomalies to ensure that the system maintains stable operation.
[0143] Figure 5 FIG. 1 is a schematic diagram of a system according to an exemplary embodiment. Figure 5 As shown, including:
[0144] In one implementation, when an exception occurs in the system and its core components and services, the exception information is transmitted to the rescue program at the time of exiting the system. The rescue program then analyzes the exception information, including the exception type and the exception level, sets the exception level corresponding to the current system and the exception type according to the analysis result, and performs system recovery operations according to the exception level and the exception type.
[0145] The exception level can be understood as whether the current system has experienced any exceptions in the previous period of time. The more exceptions there are, the higher the level is, thus triggering different recovery operations.
[0146] Figure 6 FIG. 1 is a schematic diagram showing the startup and interaction of a system and a rescue program according to an exemplary embodiment. Figure 6As shown, including:
[0147] In one implementation, when the device is started, the system kernel is started first, and then the system initialization program is started. After the initialization program completes the initialization, the system rescue program is started first, and then the system is started, including starting the program, starting the system services and core components, starting the system user interface, starting the resident system applications, starting the system desktop, and finally performing the user interaction stage.
[0148] Among them, in the program startup stage, if the system is abnormal, the system rescue program is notified; in the system service and core component startup stage, if the system service and core component are abnormal, the system rescue program is notified; in the system user interface startup stage, if the system user interface is abnormal, the system rescue program is notified; in the system resident application startup stage, if the resident system application is abnormal, the system rescue program is notified; in the system desktop startup stage, if the system desktop stage is abnormal, the system rescue program is notified.
[0149] FIG7 is a flowchart of a system recovery solution according to an exemplary embodiment. As shown in FIG7 , the following steps are included:
[0150] In one implementation, the recovery method for abnormalities of the system and system core programs includes:
[0151] In step S7a1, system abnormality information is received.
[0152] In an exemplary embodiment of the present disclosure, the electronic device receives abnormal information of the system and sends the received abnormal information.
[0153] In step S7a2, the type of system abnormality is determined.
[0154] In an exemplary embodiment of the present disclosure, the system abnormality category is determined according to the received abnormality information.
[0155] Among them, the system exception category can be understood as different exception types contained in the system, including but not limited to system exceptions, system service and core component exceptions, system user interface exceptions, resident application exceptions and system desktop exceptions.
[0156] In step S7a3, the unknown abnormality information is recorded in the database.
[0157] In the exemplary embodiment of the present disclosure, the purpose of storing the unknown abnormal information in the database is to facilitate the R&D personnel to analyze the unknown abnormal information.
[0158] In step S7a4, the program record is restored.
[0159] In an exemplary embodiment of the present disclosure, the unknown abnormal information after the analysis is completed is recorded in a recovery program.
[0160] In step S7a5, the timestamps in the corresponding exception counting queue that exceed the exception counting duration are deleted.
[0161] In the exemplary embodiment of the present disclosure, each different application includes its own independent corresponding exception count queue.
[0162] Among them, the exception counting duration can be understood as the time generated when multiple exceptions occur, and deleting the timestamps exceeding the exception counting duration in the corresponding exception counting queue can be understood as deleting all timestamps exceeding the exception counting duration in the system exception statistics queue; deleting all timestamps exceeding the exception counting duration in the system service and core component exception statistics queue; deleting all timestamps exceeding the exception counting duration in the system user interface exception statistics queue; deleting all timestamps exceeding the exception counting duration in the resident application exception statistics queue; deleting all timestamps exceeding the exception counting duration in the system desktop exception statistics queue, etc.
[0163] In step S7a6, the current system timestamp is added to the corresponding counting queue.
[0164] In an exemplary embodiment of the present disclosure, a timestamp of when an exception occurs in the current situation is added to a corresponding statistics queue.
[0165] Among them, adding the current system timestamp to the corresponding statistical queue can be understood as adding the timestamp of the current system exception to the system exception statistical queue, adding the timestamp of the current system service and core component exception to the system service and core component exception statistical queue, adding the timestamp of the current system user interface exception to the system user interface exception statistical queue, adding the timestamp of the current resident application exception to the resident application exception statistical queue, adding the timestamp of the current system desktop exception to the system desktop exception statistical queue, etc.
[0166] In step S7a7, it is determined whether the number of queue elements exceeds the corresponding abnormal count threshold.
[0167] In an exemplary embodiment of the present disclosure, it is determined whether a queue element exceeds a corresponding exception count threshold, including, if it does not exceed the threshold, no intervention is performed; if it exceeds the threshold, the corresponding exception level is adjusted and the data of the exception count queue is cleared.
[0168] The anomaly count threshold can be understood as a range of values within which the number of anomalies allowed to occur in the system.
[0169] In step S7a8, a corresponding exception level queue is set.
[0170] In the exemplary embodiment of the present disclosure, the setting of the exception level is also set through the queue. When adjusting the exception level, the timestamps exceeding the duration of the exception level in the exception level queue will be deleted first.
[0171] Among them, adjusting the exception level queue includes: constantly comparing whether the timestamp of the exception level head exceeds the exception level duration. If it exceeds, the queue element is dequeued until the head element in the queue is within the exception level duration, and adding the current timestamp to the crash level queue corresponding to the exception.
[0172] In step S7a9, the corresponding abnormality count queue is cleared.
[0173] In the exemplary embodiment of the present disclosure, the timestamp in the corresponding exception counting queue is deleted to avoid increasing the exception level based on the exception that has been resolved this time when the next exception occurs, which makes the exception handling complicated.
[0174] In an exemplary embodiment of the present disclosure, when deleting expired timestamps according to the exception level duration and the exception count duration, elements are directly taken from the head of the queue until the first timestamp appearing in the queue is within the duration, thereby reducing the number of subsequent checks.
[0175] For example, if it is a system exception, the outdated timestamps in the system exception counting queue will be cleared first, and then the timestamp at the time of the exception will be added to the system crash counting queue; if it is a system service and core component exception, the outdated timestamps in the system service and core component exception counting queue will be cleared first, and then the timestamp at the time of the exception will be added to the exception counting queue of the system service and core component; if it is a system user interface exception, the outdated timestamps in the system user interface exception counting queue will be cleared first, and then the timestamp at the time of the exception will be added to the exception counting queue of the system user interface; if it is a resident application exception, the outdated timestamps in the corresponding resident application exception counting queue will be cleared first, and then the timestamp at the time of the exception will be added to the corresponding exception counting queue; if it is a system desktop exception, the outdated timestamps in the system desktop exception counting queue will be cleared first, and then the timestamp at the time of the crash will be added to the crash counting queue of the system desktop.
[0176] In step S7a10 , the current exception level is 1.
[0177] In an exemplary embodiment of the present disclosure, rescue measures with an exception level of 1 are executed according to the number of elements in the exception level queue.
[0178] In step S7a11, all newly added system setting information is deleted.
[0179] In an exemplary embodiment of the present disclosure, when the level is 1, all newly added (global configuration, security configuration, device configuration) system setting information will be deleted regardless of any abnormality.
[0180] In step S7a12 , the current exception level is 2.
[0181] In an exemplary embodiment of the present disclosure, rescue measures of abnormal level 2 are executed according to the number of abnormal level queue elements.
[0182] In step S7a13, all untrusted system settings are deleted as system defaults.
[0183] In an exemplary embodiment of the present disclosure, when the level is 2, all untrusted (global configuration, security configuration, device configuration) system settings are reset to system default values regardless of any abnormalities.
[0184] In step S7a14, the current exception level is 3.
[0185] In an exemplary embodiment of the present disclosure, rescue measures of abnormal level 3 are executed according to the number of abnormal level queue elements.
[0186] In step S7a15, all trusted system settings are deleted as system defaults.
[0187] In an exemplary embodiment of the present disclosure, when the level is 3, all trusted (global configuration, security configuration, device configuration) system settings are reset to system default values regardless of any abnormalities.
[0188] In an exemplary embodiment of the present disclosure, when anomalies from different sources occur in the system, when it is determined that the levels of the anomalies from different sources are at or below the level threshold, the electronic device can perform the same operation of the same level for the anomalies from different sources, or can perform different operations of the same level for the anomalies from different sources.
[0189] The level threshold may be understood as a low level among the abnormal levels.
[0190] In step S7a16 , the current exception level is 4.
[0191] In an exemplary embodiment of the present disclosure, rescue measures of abnormal level 4 are executed according to the number of abnormal level queue elements.
[0192] In step S7a17, the abnormality type is determined and corresponding recovery processing is performed.
[0193] In the exemplary embodiment of the present disclosure, the system abnormality type is determined and corresponding recovery processing is performed, such as Figure 7b shown.
[0194] Figure 7b The system recovery flowchart of the system abnormality level 4 is shown according to an exemplary embodiment. The following steps are included:
[0195] In step S7b1, the abnormal level is obtained as 4.
[0196] The logic of this step is the same as that of S7a16 and will not be repeated here.
[0197] In step S7b2, the exception type is system.
[0198] In the exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 4, the abnormality type is in the system.
[0199] In step S7b3, the system abnormality information is recorded in the database and the entire device is restarted.
[0200] In an exemplary embodiment of the present disclosure, in the event of a system abnormality, the current system abnormality level will be recorded in a database, and then the entire device will be restarted to attempt recovery.
[0201] Among them, recording the current system exception level in the database can be understood as, at the next startup, the recovery program can restore the system exception level from the data, and restarting the entire device to try to reply can be understood as the system exception may be caused by the underlying program being stuck, and the underlying program can be restarted by restarting.
[0202] In step S7b4, the exception types are system services and core components.
[0203] In an exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 4, the abnormality type is system services and core components.
[0204] In step S7b5, the configuration information corresponding to the initial system service or component is restored.
[0205] In an exemplary embodiment of the present disclosure, when system services and core components are abnormal, the initial configuration information of the system services or components is restored.
[0206] Among them, the abnormalities of system services and core components are generally caused by abnormal configuration files in the system services. Therefore, the configuration files in the system are restored to their original states.
[0207] In step S7b6, the exception type is system user interface.
[0208] In an exemplary embodiment of the present disclosure, when it is determined that the abnormality level is at level 4, the abnormality type is in the system user interface.
[0209] In step S7b7, the cache and user data, as well as the wallpaper information are deleted.
[0210] In an exemplary embodiment of the present disclosure, the system user interface crashes and attempts to delete the user interface cache, data, and all wallpaper information. If the startup is successful, the system will pop up a window to remind the user that the system theme has been restored due to system abnormality.
[0211] Among them, deleting all wallpaper information can be understood as due to the crash of the system user interface, which may be related to the anomaly caused by the user changing the wallpaper. By deleting the user's operation records and wallpaper, and then restoring the system, the system pop-up window prompting the user can be understood as informing the user of the reason for the change of wallpaper and theme.
[0212] In step S7b8, the exception type is resident application.
[0213] In an exemplary embodiment of the present disclosure, when it is determined that the exception level is at level 4, the exception type is a resident application.
[0214] In step S7b9, the cache and user data are deleted.
[0215] In an exemplary embodiment of the present disclosure, the resident application is abnormal, and the cache and user data are deleted.
[0216] Among them, the exceptions of resident applications are often related to the exceptions caused by stored information, so they are initialized back to the initial state.
[0217] In step S7b10, the exception type is system desktop.
[0218] In an exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 4, the abnormality type is on the system desktop.
[0219] In step S7b11, the cache and user data are deleted.
[0220] In an exemplary embodiment of the present disclosure, the system desktop is abnormal, and the cache and user data are deleted.
[0221] Among them, the system desktop abnormality can be understood as being related to desktop configuration and modification.
[0222] In step S7b12, the process ends.
[0223] In an exemplary embodiment of the present disclosure, the system recovery process is terminated when the current abnormality level is 4.
[0224] In step S7a18 , the current exception level is 5.
[0225] In an exemplary embodiment of the present disclosure, rescue measures of abnormal level 5 are executed according to the number of abnormal level queue elements.
[0226] In step S7a19, the abnormality type is determined and corresponding recovery processing is performed.
[0227] In the exemplary embodiment of the present disclosure, the system abnormality type is determined and corresponding recovery processing is performed, such as Figure 7c shown.
[0228] Figure 7c This is a system recovery flowchart for a system abnormality level of 5 according to an exemplary embodiment. The flowchart includes the following steps:
[0229] In step S7c1, the abnormality level 5 is obtained.
[0230] The logic of this step is the same as that of S7a18 and will not be repeated here.
[0231] In step S7c2, the exception type is system.
[0232] In the exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 5, the abnormality type is in the system.
[0233] In step S7c3, all system settings are reset to system defaults, and all settings without system defaults are deleted.
[0234] In an exemplary embodiment of the present disclosure, when the system crashes, all settings in the system will be reset to system default values, and other settings that do not have system default values will be deleted.
[0235] In step S7c4, the exception types are system services and core components.
[0236] In an exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 5, the abnormality type is system services and core components.
[0237] In step S7c5, all system settings are reset to system defaults, and all settings without system defaults are deleted.
[0238] In an exemplary embodiment of the present disclosure, when system services and core components crash, all settings in the system will be reset to system default values, and other settings that do not have system default values will be deleted.
[0239] Among them, resetting all settings in the system to system defaults and deleting other settings that do not have system defaults can be understood as the system abnormality may be caused by a combination of several setting information, which has caused undetected problems in the system, so all settings need to be cleared.
[0240] In step S7c6, the configuration information corresponding to the system service or component is deleted, and re-initialization is forced.
[0241] In the exemplary embodiment of the present disclosure, deleting the configuration information corresponding to the system service or component and forcing initialization can be understood as each system service has its own accessed configuration information, and the configuration information can sometimes trigger undiscovered problems and cause the system to crash.
[0242] In step S7c7, the exception type is system user interface.
[0243] In an exemplary embodiment of the present disclosure, when it is determined that the abnormality level is at level 5, the abnormality type is in the system user interface.
[0244] In step S7c8, all system settings are reset to system defaults, deleting all settings that do not have system defaults.
[0245] In the disclosed embodiment, resetting all settings in the system to system default values and deleting other settings without system default values can be understood as a system abnormality, which may be caused by a combination of several setting information, triggering an undiscovered problem in the system.
[0246] In step S7c9, the system user interface version is rolled back.
[0247] In the exemplary embodiment of the present disclosure, rolling back the system user interface version can be understood as the system user interface can be updated independently of the system.
[0248] In step S7c10, the system abnormality information is recorded in the database and the entire device is restarted.
[0249] The system crash level is recorded in the database and the entire device is restarted. If the startup is successful, the system will pop up a window to remind the user that all system settings have been restored due to system abnormalities.
[0250] Among them, resetting all settings in the system to system default values and deleting other settings that do not have system default values can be understood as the occurrence of system abnormalities is due to the combination of several setting information causing undetected system problems. Recording the system abnormality level to the database can be understood as the next time the recovery program is started, the system abnormality level can be restored from the database. The system pop-up window prompting the user can be understood as informing the user of the reason for the setting change.
[0251] In step S7c11, the exception type is resident application.
[0252] In an exemplary embodiment of the present disclosure, when it is determined that the exception level is at level 5, the exception type is a resident application.
[0253] In step S7c12, a fallback resident application version is generated.
[0254] In an exemplary embodiment of the present disclosure, a resident application crashes and an attempt is made to roll back the corresponding resident application.
[0255] Among them, the resident application exception can be understood as being caused by application upgrade.
[0256] In step S7c13, the exception type is system desktop.
[0257] In an exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 5, the abnormality type is on the system desktop.
[0258] In step S7c14, a fallback system desktop version is generated.
[0259] In an exemplary embodiment of the present disclosure, the system desktop crashes and attempts to roll back the corresponding resident application.
[0260] In step S7c15, the process ends.
[0261] In an exemplary embodiment of the present disclosure, the system recovery process is terminated when the current abnormality level is 5.
[0262] In step S7a20, the current abnormality level is greater than or equal to 6.
[0263] In an exemplary embodiment of the present disclosure, rescue measures for exception levels 6 and above are executed according to the number of exception level queue elements.
[0264] In step S7a21, the abnormality type is determined and corresponding recovery processing is performed.
[0265] In the exemplary embodiment of the present disclosure, the system abnormality type is determined and corresponding recovery processing is performed, such as Figure 7d as shown.
[0266] Figure 7d This is a system recovery flowchart for a system abnormality level of 6 or above according to an exemplary embodiment. It includes the following steps:
[0267] In step S7d1, the abnormality level is obtained to be 6 or above.
[0268] The logic of this step is the same as that of S7a20 and is not described here.
[0269] In step S7d2, the exception type is system.
[0270] In an exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 6 or above, the abnormality type is in the system.
[0271] In step S7d3, the entire system is restarted and enters the system rescue mode.
[0272] In an exemplary embodiment of the present disclosure, the system is abnormal, the entire system is restarted, and the system enters a system rescue mode.
[0273] Among them, for level 6 and above, since the previous repair mechanism has not taken effect, it means that there is no other means of recovery, so you can only enter another system (system rescue mode) to export abnormal information and try to recover by clearing data.
[0274] In step S7d4, the exception types are system services and core components.
[0275] In an exemplary embodiment of the present disclosure, it is determined that when the abnormality level is at level 6 or above, the abnormality type is system services and core components.
[0276] In step S7d5, the entire system is restarted and enters the system rescue mode.
[0277] In an exemplary embodiment of the present disclosure, system services and core components crash, and the entire system is restarted to enter a system rescue mode.
[0278] Among them, restarting the entire system can be understood as, since the previous repair mechanism did not take effect, it is only possible to enter another system (system rescue mode) to export abnormal information and recover by clearing data.
[0279] In step S7d6, the exception type is system user interface.
[0280] In an exemplary embodiment of the present disclosure, when it is determined that the abnormality level is at level 6 or above, the abnormality type is displayed in the system user interface.
[0281] In step S7d7, the data transmission mode is started.
[0282] In an exemplary embodiment of the present disclosure, the system user interface is abnormal, the data transfer mode is enabled, and the user is prompted to urgently back up and export the data before handing the device over to after-sales service for processing.
[0283] Among them, the user is prompted that when urgently backing up and exporting data, the electronic device needs to be connected to other electronic devices that can receive data, such as a computer.
[0284] Figure 8 is a schematic diagram showing a system user interface abnormality according to an exemplary embodiment. Figure 8 As shown:
[0285] In an exemplary embodiment of the present disclosure, the system user interface is abnormal, and the user is prompted to perform corresponding processing, such as displaying on the interface that the file transfer mode cannot be recovered due to the abnormality of the system user interface, and entering the lock screen password to enable the file transfer mode to back up and export data, and displaying "Please enter password" and "OK" options.
[0286] In step S7d8, the exception type is resident application.
[0287] In an exemplary embodiment of the present disclosure, when it is determined that the exception level is at level 6 or above, the exception type is a resident application.
[0288] In step S7d9, the abnormal resident data is prohibited from being activated by the system again.
[0289] In an exemplary embodiment of the present disclosure, the resident application is abnormal, and the abnormal resident application is prohibited from being started by the system.
[0290] Among them, prohibiting abnormal resident applications from being started by the system can be understood as the failure of resident applications will cause some system functions to fail. After the resident application dies, the system will automatically restart the entire resident application, but if a resident application cannot be started, it will be restarted and then die repeatedly, which will cause performance loss and power loss. Therefore, the rescue program will prohibit abnormal resident applications from being started by the system.
[0291] In step S7d10, the exception type is system desktop.
[0292] In an exemplary embodiment of the present disclosure, when it is determined that the abnormality level is at level 6 or above, the abnormality type is on the system desktop.
[0293] In step S7d11, the system desktop is replaced with a simplified and stable desktop.
[0294] In an exemplary embodiment of the present disclosure, when a system desktop crashes, the system desktop is replaced with a streamlined and stable desktop.
[0295] Among them, a streamlined desktop can be understood as a desktop that only retains basic functions and is updated with the system itself.
[0296] In step S7d12, the process ends.
[0297] In an exemplary embodiment of the present disclosure, the system recovery process is terminated when the current abnormality level is 6 or above.
[0298] In step S7a22, the process ends.
[0299] In the exemplary embodiment of the present disclosure, the process of analyzing the abnormality level according to the system abnormality category and performing system recovery for different abnormality categories is ended.
[0300] In the exemplary embodiment of the present disclosure, the method of analyzing the abnormality level for different abnormality categories greatly improves the stability of the system, increases the usage time of electronic devices, ensures as much as possible that users can still enter the system when a system abnormality occurs, and backs up data when an abnormality occurs, thereby improving the user experience.
[0301] Based on the same concept, the embodiment of the present disclosure also provides a system exception handling device.
[0302] It is understandable that the system exception handling device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure 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. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0303] Fig. 9 is a block diagram of a system exception handling device according to an exemplary embodiment. Fig. 9 The device includes a monitoring unit 101 and a determining unit 102.
[0304] The monitoring unit 101 is used to determine the current system abnormality type and the current system abnormality level in response to monitoring system operation abnormality during the operation of the electronic device system; the determination unit 102 is used to determine the current system recovery plan that matches the current abnormality type and the current abnormality level based on the correspondence between the system abnormality type, the system abnormality level and the system recovery plan, and perform system recovery based on the determined current system recovery plan; wherein the correspondence includes multiple system abnormality types, each of the multiple system abnormality types corresponds to multiple different system abnormality levels, and different system abnormality levels correspond to different system recovery plans.
[0305] In one embodiment, the monitoring unit 101 adopts the following method: each system abnormality level of each system abnormality type in multiple system abnormality types corresponds to a system abnormality level threshold, the system abnormality level threshold is the number of system abnormalities, the first system abnormality level corresponds to the first system abnormality number, the second system abnormality level corresponds to the second system abnormality number, the first system abnormality level and the second system abnormality level are adjacent levels, and the first system abnormality level is lower than the second system abnormality level, and the first system abnormality number is less than the second system abnormality number; the monitoring unit 101 is also used to: in response to monitoring system operation abnormality during the operation of the electronic device system, determine the number of system abnormalities under the current system abnormality type; in response to the number of system abnormalities at the first system abnormality level reaching the second system abnormality number corresponding to the second system abnormality level threshold, and determining that the duration of the first system abnormality level is less than the first time threshold, and / or determining that the duration of the first system abnormality number is less than the second time threshold, adjust the system abnormality level from the first system abnormality level to the second system abnormality level.
[0306] In one embodiment, after the system exception level is adjusted from the first system exception level to the second system exception level, the monitoring unit 101 is also used to: store the timestamp of adjusting the system exception level from the first system exception level to the second system exception level in the system exception level queue, and clear the timestamp in the system exception count queue; wherein, the system exception level queue stores the timestamp of the change of the system exception level, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0307] In one embodiment, the determination unit 102 determines that the duration of the first system exception level is less than a first time threshold in the following manner: if the difference between the timestamp stored at the head of the system exception level queue and the first timestamp is less than the first time threshold, then it is determined that the duration of the first system exception level is less than the first time threshold; the first timestamp is the timestamp when the number of system exceptions reaches the timestamp system level threshold of the second system exception number; wherein, the timestamp of the change of the system exception level is stored in the system exception level queue, and the timestamp stored at the head of the system exception level queue is the earliest timestamp in the queue.
[0308] In one embodiment, the determination unit 102 determines that the duration of the first system anomaly count is less than the second time threshold in the following manner: if the difference between the timestamp stored at the head of the system anomaly count queue and the second timestamp is less than the second time threshold, then it is determined that the duration of the first system anomaly count is less than the second time threshold; the second timestamp is the timestamp when the system anomaly count reaches the second system anomaly count; wherein, the system anomaly count queue stores the timestamp when the system anomaly count changes, and the timestamp stored at the head of the system anomaly count queue is the earliest timestamp in the queue.
[0309] In one embodiment, the determination unit 102 determines that the correspondence between the system abnormality type, the system abnormality level, and the system recovery plan satisfies at least one of the following items in the following manner: when the system abnormality level is lower than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to the same system recovery plan; when the system abnormality level is higher than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to different system recovery plans, and the same system abnormality type at different system abnormality levels corresponds to different system recovery plans.
[0310] In one embodiment, the determination unit 102 adopts the following method: the same system recovery scheme includes deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values; wherein, deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values each correspond to a different system abnormality level, and the system abnormality levels increase successively.
[0311] In one embodiment, the determination unit 102 adopts the following method: when the system abnormality level is higher than the abnormality level threshold, the corresponding relationship between the system abnormality type, the system abnormality level and the system recovery scheme satisfies at least one of the following: wherein the abnormality type is a system abnormality, then: the system abnormality level is at the first level, the system abnormality information is recorded in the database, and the device is restarted; or
[0312] The system abnormality level is at the second level, resetting the system settings to the system default values and deleting the settings that do not contain the system default values; or
[0313] If the system abnormality level is at level 3 or above, restart the system and enter the system rescue mode;
[0314] If the exception type is system services and core components, then: the exception level of system services and core components is at the first level, and the configuration information corresponding to the initial system services or core components is restored; or
[0315] The abnormal level of system services and core components is at the second level, resetting the system settings of system services and core components to the system default values, deleting the settings that do not contain the system default values, deleting the configuration information corresponding to the system services or core components, forcing the system services and core components to initialize, recording system crash information, and restarting the device; or
[0316] If the abnormality level of system services and core components is at level 3 or above, restart the system and enter system rescue mode;
[0317] If the exception type is system user interface, then: the system user interface exception level is at level 1, and the cache and user data of the system user interface, as well as the wallpaper information, are deleted; or
[0318] The system user interface abnormality level is at the second level, the system settings of the system user interface are reset to the system default values, and the settings that do not include the system default values of the system user interface are deleted, and the system user interface version is rolled back, the system abnormality information is recorded, and the device is restarted; or
[0319] When the system user interface abnormality level is at level 3 or above, data transmission mode is enabled;
[0320] If the exception type is a resident application, then: the resident application exception level is at level 1, and the cache and user data of the resident application are deleted; or
[0321] The resident application exception level is at the second level, and the resident application version is rolled back; or
[0322] The resident application exception level is at level 3 or above, and the resident application exception is prohibited from being activated by the system again;
[0323] If the exception type is the system desktop, then: the system desktop exception level is at the first level, and the cache and user data of the system desktop are deleted; or
[0324] The system desktop abnormality level is at the second level, and the system desktop version is rolled back; or
[0325] When the system desktop abnormality level is at the third level or above, the system desktop will be replaced with a streamlined and stable desktop; the first level and the second level of different types of abnormality levels are adjacent levels, and the second level and the third level are adjacent levels, the first level is smaller than the second level, the second level is smaller than the third level, and the first level and the abnormality level threshold are the same level.
[0326] In one embodiment, the determination unit 102 is also used to determine the unknown exception type and record the unknown exception type in the system database; analyze the unknown exception type and determine the correspondence between the exception level of the unknown exception type and the system recovery plan; the correspondence between the unknown exception type, the exception level of the unknown exception type and the system recovery plan is any one of the correspondences that does not belong to the system exception type, the system exception level and the system recovery plan.
[0327] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0328] Fig.10 2 is a block diagram of an apparatus 200 for system exception handling according to an exemplary embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0329] Reference Fig.10 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0330] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 202 may include one or more modules to facilitate the interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate the interaction between the multimedia component 208 and the processing component 202.
[0331] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0332] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0333] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0334] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0335] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0336] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0337] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0338] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0339] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0340] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "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. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0341] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0342] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.
[0343] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0344] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0345] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0346] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. A system exception handling method, characterized in that: The method comprises: In response to monitoring a system operation abnormality during operation of the electronic device system, determining a current system abnormality type and a current system abnormality level; Based on the correspondence between the system abnormality type, the system abnormality level and the system recovery solution, determine a current system recovery solution that matches the current abnormality type and the current abnormality level, and perform system recovery based on the determined current system recovery solution; The corresponding relationship includes a plurality of system abnormality types, each of the plurality of system abnormality types corresponds to a plurality of different system abnormality levels, and different system abnormality levels correspond to different system recovery solutions.
2. The method according to claim 1, characterized in that Each system abnormality level of each system abnormality type in the multiple system abnormality types corresponds to a system abnormality level threshold, the system abnormality level threshold is the number of system abnormalities, the first system abnormality level corresponds to the first system abnormality number, the second system abnormality level corresponds to the second system abnormality number, the first system abnormality level and the second system abnormality level are adjacent levels, and the first system abnormality level is lower than the second system abnormality level, and the first system abnormality number is less than the second system abnormality number; The method further comprises: In response to monitoring a system operation abnormality during operation of the electronic device system, determining a number of system abnormalities under a current system abnormality type; In response to the number of system abnormalities at a first system abnormality level reaching a system abnormality level threshold, and determining that the duration of the first system abnormality level is less than a first time threshold, and / or determining that the duration of the first system abnormality number is less than a second time threshold, the system abnormality level is adjusted from the first system abnormality level to the second system abnormality level.
3. The method according to claim 2, characterized in that After the system abnormality level is adjusted from the first system abnormality level to the second system abnormality level, the method further includes: The timestamp indicating that the system exception level is adjusted from the first system exception level to the second system exception level is stored in the system exception level queue, and the timestamp in the system exception count queue is cleared; The system abnormality level queue stores a timestamp of a change in the system abnormality level, and the timestamp stored at the head of the system abnormality level queue is the earliest timestamp in the queue.
4. The method according to claim 2 or 3, characterized in that: The determining that the duration of the first system abnormality level is less than a first time threshold includes: If the difference between the timestamp stored at the head of the system abnormality level queue and the first timestamp is less than the first time threshold, it is determined that the duration of the first system abnormality level is less than the first time threshold; The first timestamp is the timestamp when the number of system anomalies reaches the system level threshold; The system abnormality level queue stores a timestamp of a change in the system abnormality level, and the timestamp stored at the head of the system abnormality level queue is the earliest timestamp in the queue.
5. The method according to claim 2, characterized in that: The determining that the duration of the first system abnormality number is less than the second time threshold includes: If the difference between the timestamp stored at the head of the system anomaly count queue and the second timestamp is less than the second time threshold, it is determined that the duration of the first system anomaly count is less than the second time threshold; The second timestamp is the timestamp when the number of system anomalies reaches the system level threshold; The system anomaly count queue stores the timestamps when the system anomaly count changes, and the head of the system anomaly count queue stores the earliest timestamp in the queue.
6. The method according to claim 1, characterized in that The correspondence between the system abnormality type, the system abnormality level and the system recovery solution satisfies at least one of the following: When the system abnormality level is lower than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to the same system recovery solution; When the system abnormality level is higher than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to different system recovery solutions, and the same system abnormality type at different system abnormality levels corresponds to different system recovery solutions.
7. The method according to claim 6, characterized in that The same system recovery solution includes deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values; Among them, deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values respectively correspond to different system abnormality levels, and the system abnormality levels increase in sequence.
8. The method according to claim 6, characterized in that When the system abnormality level is higher than the abnormality level threshold, the corresponding relationship between the system abnormality type, the system abnormality level and the system recovery solution satisfies at least one of the following: If the exception type is system exception, then: The system abnormality level is at the first level, the system abnormality information is recorded in the database, and the device is restarted; or The system abnormality level is at the second level, resetting the system settings to the system default values and deleting the settings that do not contain the system default values; or If the system abnormality level is at the third level or above, the system is restarted to enter the system rescue mode; If the exception type is system service or core component: The abnormal level of the system service and core component is at the first level, and the configuration information corresponding to the initial system service or core component is restored; or The abnormal level of the system services and core components is at the second level, resetting the system settings of the system services and core components to the system default values, deleting the settings that do not contain the system default values, deleting the configuration information corresponding to the system services or core components, forcing the system services and core components to initialize, recording system crash information, and restarting the device; or If the abnormality level of system services and core components is at level 3 or above, the system is restarted and enters system rescue mode; If the exception type is system user interface, then: The system user interface abnormality level is at the first level, and the cache and user data of the system user interface, as well as the wallpaper information are deleted; or The system user interface abnormality level is at the second level, resetting the system settings of the system user interface to the system default values, deleting the settings that do not include the system default values of the system user interface, and rolling back to the system user interface version, recording the system abnormality information, and restarting the device; or When the system user interface abnormality level is at level 3 or above, data transmission mode is enabled; If the exception type is resident application, then: The abnormal level of the resident application is at the first level, and the cache and user data of the resident application are deleted; or The resident application exception level is at the second level, and the resident application version is rolled back; or The resident application exception level is at level 3 or above, and the resident application exception is prohibited from being activated by the system again; If the exception type is system desktop, then: The abnormal level of the system desktop is at the first level, and the cache and user data of the system desktop are deleted; or The system desktop abnormality level is at the second level, and the system desktop version is rolled back; or If the abnormality level of the system desktop is at the third level or above, the system desktop is replaced with a streamlined and stable desktop; The first level and the second level of the different types of abnormal levels are adjacent levels, and the second level and the third level are adjacent levels, the first level is smaller than the second level, the second level is smaller than the third level, and the first level and the abnormal level threshold are the same level.
9. The method according to claim 1, characterized in that: The method further comprises: Determine the unknown exception type, and record the unknown exception type in the system database; Analyze the unknown exception type and determine the corresponding relationship between the exception level of the unknown exception type and the system recovery solution; The correspondence between the unknown exception type, the exception level of the unknown exception type, and the system recovery solution is any one of the correspondences that does not belong to the system exception type, the system exception level, and the system recovery solution.
10. A system abnormality handling device, characterized in that: include: A monitoring unit, configured to determine a current system abnormality type and a current system abnormality level in response to detecting a system abnormality during operation of the electronic device system; A determination unit, configured to determine a current system recovery scheme matching the current abnormality type and the current abnormality level based on a correspondence between the system abnormality type, the system abnormality level and the system recovery scheme, and perform system recovery based on the determined current system recovery scheme; The corresponding relationship includes a plurality of system abnormality types, each of the plurality of system abnormality types corresponds to a plurality of different system abnormality levels, and different system abnormality levels correspond to different system recovery solutions.
11. The system abnormality handling device according to claim 10, characterized in that: The monitoring unit adopts the following method: each system abnormality level of each system abnormality type in the multiple system abnormality types corresponds to a system abnormality level threshold, the system abnormality level threshold is the number of system abnormalities, the first system abnormality level corresponds to the first system abnormality number, the second system abnormality level corresponds to the second system abnormality number, the first system abnormality level and the second system abnormality level are adjacent levels, and the first system abnormality level is lower than the second system abnormality level, and the first system abnormality number is less than the second system abnormality number; The monitoring unit is also used for: In response to monitoring a system operation abnormality during operation of the electronic device system, determining a number of system abnormalities under a current system abnormality type; In response to the number of system abnormalities at a first system abnormality level reaching a second system abnormality number corresponding to a second system abnormality level threshold, and determining that the duration of the first system abnormality level is less than the first time threshold, and / or determining that the duration of the first system abnormality number is less than the second time threshold, the system abnormality level is adjusted from the first system abnormality level to the second system abnormality level.
12. The system abnormality handling device according to claim 11, characterized in that: After the system abnormality level is adjusted from the first system abnormality level to the second system abnormality level, the monitoring unit is further used to: The timestamp indicating that the system exception level is adjusted from the first system exception level to the second system exception level is stored in the system exception level queue, and the timestamp in the system exception count queue is cleared; The system abnormality level queue stores a timestamp of a change in the system abnormality level, and the timestamp stored at the head of the system abnormality level queue is the earliest timestamp in the queue.
13. A system abnormality handling device according to claim 11 or 12, characterized in that: The determining unit determines that the duration of the first system abnormality level is less than the first time threshold in the following manner: If the difference between the timestamp stored at the head of the system abnormality level queue and the first timestamp is less than the first time threshold, it is determined that the duration of the first system abnormality level is less than the first time threshold; The first timestamp is the timestamp at which the number of system anomalies reaches the timestamp system level threshold of the second system anomaly number; The system abnormality level queue stores a timestamp of a change in the system abnormality level, and the timestamp stored at the head of the system abnormality level queue is the earliest timestamp in the queue.
14. The system abnormality handling device according to claim 11, characterized in that: The determining unit determines that the duration of the first system abnormality number is less than the second time threshold in the following manner: If the difference between the timestamp stored at the head of the system anomaly count queue and the second timestamp is less than the second time threshold, it is determined that the duration of the first system anomaly count is less than the second time threshold; The second timestamp is the timestamp when the number of system anomalies reaches the second number of system anomalies; The system anomaly count queue stores the timestamps when the system anomaly count changes, and the head of the system anomaly count queue stores the earliest timestamp in the queue.
15. The system abnormality handling device according to claim 10, characterized in that: The determining unit determines in the following manner that the corresponding relationship between the system abnormality type, the system abnormality level, and the system recovery solution satisfies at least one of the following: When the system abnormality level is lower than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to the same system recovery solution; When the system abnormality level is higher than the abnormality level threshold, different system abnormality types at the same system abnormality level correspond to different system recovery solutions, and the same system abnormality type at different system abnormality levels corresponds to different system recovery solutions.
16. The system abnormality handling device according to claim 15, characterized in that: The determination unit adopts the following method: the same system recovery scheme includes deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values; Among them, deleting all newly added system setting information, resetting all untrusted system settings to default values, and resetting all trusted system settings to default values respectively correspond to different system abnormality levels, and the system abnormality levels increase in sequence.
17. The system abnormality handling device according to claim 15, characterized in that: The determining unit adopts the following manner: when the system abnormality level is higher than the abnormality level threshold, the corresponding relationship between the system abnormality type, the system abnormality level and the system recovery solution satisfies at least one of the following: If the exception type is system exception, then: The system abnormality level is at the first level, the system abnormality information is recorded in the database, and the device is restarted; or The system abnormality level is at the second level, resetting the system settings to the system default values and deleting the settings that do not contain the system default values; or If the system abnormality level is at the third level or above, the system is restarted to enter the system rescue mode; If the exception type is system service or core component: The abnormal level of the system service and core component is at the first level, and the configuration information corresponding to the initial system service or core component is restored; or The abnormal level of the system services and core components is at the second level, resetting the system settings of the system services and core components to the system default values, deleting the settings that do not contain the system default values, deleting the configuration information corresponding to the system services or core components, forcing the system services and core components to initialize, recording system crash information, and restarting the device; or If the abnormality level of system services and core components is at level 3 or above, the system is restarted and enters system rescue mode; If the exception type is system user interface, then: The system user interface abnormality level is at the first level, and the cache and user data of the system user interface, as well as the wallpaper information are deleted; or The system user interface abnormality level is at the second level, resetting the system settings of the system user interface to the system default values, deleting the settings that do not include the system default values of the system user interface, and rolling back to the system user interface version, recording the system abnormality information, and restarting the device; or When the system user interface abnormality level is at level 3 or above, data transmission mode is enabled; If the exception type is resident application, then: The abnormal level of the resident application is at the first level, and the cache and user data of the resident application are deleted; or The resident application exception level is at the second level, and the resident application version is rolled back; or The resident application exception level is at level 3 or above, and the resident application exception is prohibited from being activated by the system again; If the exception type is system desktop, then: The abnormal level of the system desktop is at the first level, and the cache and user data of the system desktop are deleted; or The system desktop abnormality level is at the second level, and the system desktop version is rolled back; or If the abnormality level of the system desktop is at the third level or above, the system desktop is replaced with a streamlined and stable desktop; The first level and the second level of the different types of abnormal levels are adjacent levels, and the second level and the third level are adjacent levels, the first level is smaller than the second level, the second level is smaller than the third level, and the first level and the abnormal level threshold are the same level.
18. The system abnormality handling device according to claim 10, characterized in that: The determining unit is further configured to: Determine the unknown exception type, and record the unknown exception type in the system database; Analyze the unknown exception type and determine the corresponding relationship between the exception level of the unknown exception type and the system recovery solution; The correspondence between the unknown exception type, the exception level of the unknown exception type, and the system recovery solution is any one of the correspondences that does not belong to the system exception type, the system exception level, and the system recovery solution.
19. A system abnormality handling device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method according to any one of claims 1 to 9.
20. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 9.