WO2023005459A1 - 异常处理方法、装置、计算机设备及存储介质 - Google Patents

异常处理方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2023005459A1
WO2023005459A1 PCT/CN2022/098325 CN2022098325W WO2023005459A1 WO 2023005459 A1 WO2023005459 A1 WO 2023005459A1 CN 2022098325 W CN2022098325 W CN 2022098325W WO 2023005459 A1 WO2023005459 A1 WO 2023005459A1
Authority
WO
WIPO (PCT)
Prior art keywords
exception
module
information
abnormal
abnormality
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/098325
Other languages
English (en)
French (fr)
Inventor
朱文波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of WO2023005459A1 publication Critical patent/WO2023005459A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to an exception handling method, device, computer equipment, and storage medium.
  • Embodiments of the present application provide an exception handling method, device, computer equipment, and storage medium. Described technical scheme is as follows:
  • the embodiment of the present application provides an exception handling method, the method includes:
  • the first module is driven to perform exception recovery processing, and the first module is a module associated with the exception.
  • the embodiment of the present application provides an exception handling device, the device includes:
  • a control module configured to receive the first abnormality information reported by the abnormality module in the operating system
  • the control module is further configured to acquire second abnormality information synchronized by the abnormality module based on the first abnormality information, the second abnormality information and the first abnormality information correspond to the same abnormality, and the second abnormality
  • the information volume of the information is greater than the information volume of the first abnormal information
  • the control module is further configured to drive the first module to perform exception recovery processing based on the second exception information and the exception handling strategy, and the first module is a module associated with the exception.
  • an embodiment of the present application provides a computer device, the computer device includes: a processor and a memory; the memory stores at least one program, and the at least one program is used to be executed by the processor to realize Exception handling methods as described in the above aspects.
  • an embodiment of the present application provides a computer-readable storage medium, at least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor to implement the above-mentioned Exception handling method.
  • an embodiment of the present application provides a computer program product, the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer-readable storage medium from the computer-readable storage medium.
  • a computer instruction the processor executes the computer instruction, so that the computer device executes the exception handling method provided in various optional implementation manners of the foregoing aspect.
  • Fig. 1 shows the structural block diagram of the computer equipment that an exemplary embodiment of the present application provides
  • Fig. 2 shows the structural block diagram of the computer device that another exemplary embodiment of the present application provides
  • Fig. 3 shows the structural block diagram of the computer device provided by another exemplary embodiment of the present application.
  • FIG. 4 shows a flowchart of an exception handling method provided by an exemplary embodiment of the present application
  • Fig. 5 is a schematic diagram of implementation of an abnormality recovery process shown in an exemplary embodiment of the present application.
  • FIG. 6 shows a flowchart of an exception handling method provided by another exemplary embodiment of the present application.
  • Fig. 7 is an interactive flowchart of the inter-module interaction process in the exception handling method shown in Fig. 6;
  • FIG. 8 shows a flowchart of an exception handling method provided by another exemplary embodiment of the present application.
  • Fig. 9 is a schematic diagram of an abnormality information storage area shown in an exemplary embodiment of the present application.
  • Fig. 10 is an interaction flowchart of the inter-module interaction process in the exception handling method shown in Fig. 8;
  • Fig. 11 is an interaction flowchart of the interaction process between modules in the exception handling method shown in another embodiment of the present application.
  • Fig. 12 shows a structural block diagram of an exception handling device provided by an embodiment of the present application.
  • FIG. 1 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
  • the computer device may be an electronic device running an operating system, such as a smart phone, a tablet computer, a smart TV, and a personal computer.
  • a computer device in this application may include one or more of the following components: a processor 110 , a memory 120 and an input and output device 130 .
  • Processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire computer equipment, and executes the computer by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the device may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the displayed content; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 110, but may be realized by a communication chip alone.
  • the memory 120 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • RAM Random Access Memory
  • ROM Read-Only Memory
  • the memory 120 includes a non-transitory computer-readable storage medium.
  • the memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for realizing the following various method embodiments, etc.
  • the operating system can be an Android (Android) system (including a system based on the deep development of the Android system), an IOS system developed by Apple Inc. (including a system based on the deep development of the IOS system) ) or other systems.
  • the storage data area can also store data (such as phone book, audio and video data, and chat record data) created by the computer device during use.
  • the programs and data stored in the memory 120 are as shown in Figure 2, and the memory 120 can store a Linux kernel layer 220, a system runtime layer 240, an application framework layer 260 and an application layer 280, wherein , the Linux kernel layer 220, the system runtime layer 240 and the application framework layer 260 belong to the operating system space, and the application layer 280 belongs to the user space.
  • the Linux kernel layer 220 provides underlying drivers for various hardware of computer equipment, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, and the like.
  • the system runtime layer 240 provides main feature support for the Android system through some C/C++ libraries.
  • the SQLite library provides database support
  • the OpenGL/ES library provides 3D drawing support
  • the Webkit library provides browser kernel support.
  • An Android Runtime library (Android Runtime) is also provided in the system runtime layer 240, which mainly provides some core libraries and can allow developers to use the Java language to write Android applications.
  • the application framework layer 260 provides various application programming interfaces (Application Programming Interface, API) that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, location management.
  • API Application Programming Interface
  • the IOS system includes: a core operating system layer 320 (Core OS layer), a core service layer 340 (Core Services layer), a media layer 360 (Media layer), touchable layer 380 (Cocoa Touch Layer).
  • the core operating system layer 320 includes an operating system kernel, drivers, and underlying program frameworks. These underlying program frameworks provide functions closer to hardware for use by the program frameworks located in the core service layer 340 .
  • the core service layer 340 provides system services and/or program frameworks required by applications, such as foundation framework, account framework, advertisement framework, data storage framework, network connection framework, geographic location framework, exercise framework and so on.
  • the media layer 360 provides audio-visual interfaces for applications, such as interfaces related to graphics and images, interfaces related to audio technology, interfaces related to video technology, and wireless playback (AirPlay) interfaces of audio and video transmission technologies.
  • the touchable layer 380 provides various common interface-related frameworks for application development, and the touchable layer 380 is responsible for the user's touch interaction operation on the terminal. Such as local notification service, remote push service, advertising framework, game tool framework, message user interface interface (User Interface, UI) framework, user interface UIKit framework, map framework and so on.
  • frameworks related to most applications include but not limited to: the basic framework in the core service layer 340 and the UIKit framework in the touchable layer 380 .
  • the basic framework provides many basic object classes and data types, and provides the most basic system services for all applications, regardless of UI.
  • the class provided by the UIKit framework is a basic UI class library for creating a touch-based user interface. iOS applications can provide UI based on the UIKit framework, so it provides the infrastructure of the application for building user interfaces, drawing , Handle and user interaction events, respond to gestures, and more.
  • the input and output device 130 may include a touch display screen, which is used to receive a user's touch operation on or near it using any suitable object such as a finger or a stylus, and to display user interfaces of various application programs.
  • the touch display screen is usually arranged on the front panel of the computer equipment. Touch screens can be designed as full screens, curved screens or special-shaped screens. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in this embodiment of the present application.
  • the structure of the computer equipment shown in the above drawings does not constitute a limitation on the computer equipment, and the computer equipment may include more or less components than those shown in the illustration, or combine certain some components, or a different arrangement of components.
  • the computer device also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, WiFi) module, a power supply, and a bluetooth module, which will not be repeated here.
  • the operating system is an Android system as an example for schematic illustration, but this is not limited thereto.
  • FIG. 4 shows a flow chart of an exception handling method provided by an exemplary embodiment of the present application.
  • the embodiment of the present application takes the method applied to computer equipment as an example for illustration. The method includes:
  • Step 401 receiving first exception information reported by the exception module in the operating system.
  • each module in the operating system of the computer device follows a handshake mechanism, and a unified control module is provided, which is used to receive abnormal information reported by other modules, and control the system based on the abnormal information. Relevant modules perform exception recovery processing. When an abnormality occurs in the abnormal module, the abnormal information is reported to the control module through the handshake mechanism.
  • the abnormal module can be a management module in the hardware abstraction layer (Hardware Abstraction Layer, HAL) in the operating system, such as a power consumption management module, a temperature control management module, a message management module, etc.
  • the control module may be a core management (coremanager) module in the HAL or a higher-level module.
  • the exception module may also be a module in other system levels in the operating system, and the embodiment of the present application does not limit the exception module.
  • the abnormal module in order to avoid the problem of directly reporting large amounts of abnormal information to the control module, resulting in high transmission time, the abnormal module generates an abnormality and the first abnormal information reported through the handshake mechanism for the first time is the basic information of the abnormality, so that the control module can be based on The first abnormality information preliminarily judges the abnormality occurred in the abnormality module.
  • the information types of the first exception information reported by different exception modules are the same.
  • the first exception information includes necessary exception information
  • the necessary exception information includes at least an exception type and an exception module identifier.
  • the exception types may include operation exceptions (RuntimeException), transmission exceptions (IOException), power consumption exceptions (PowerException), temperature exceptions (ThermalException), etc., which are not limited in this embodiment of the present application.
  • the first exception information reported by different exception modules may include exception information specific to the exception module in addition to exception information of a unified information type (such as necessary exception information).
  • the first abnormal information reported by the temperature control management module may include temperature information
  • the first abnormal information reported by the power consumption management module may include power consumption information and the like. The embodiment of the present application does not limit the specific content contained in the first exception information.
  • Step 402 Obtain second exception information synchronized by the exception module based on the first exception information.
  • the second exception information and the first exception information correspond to the same exception, and the information volume of the second exception information is greater than that of the first exception information.
  • the control module may not be able to determine the specific method of abnormal recovery. Therefore, the control module further obtains the second abnormal information synchronized by the abnormal module through the handshake mechanism based on the first abnormal information, so as to realize the synchronization between the abnormal module and Synchronization of exception information between control modules.
  • the second abnormal information has a larger amount of information (that is, the second abnormal information is more detailed), and correspondingly, the control module can further judge the abnormal occurred in the abnormal module based on the second abnormal information.
  • the content of the second exception information synchronized by different exception modules is different.
  • the abnormality module collects the second abnormality information, so that when the control module needs to obtain further detailed abnormality information, it can provide it to the control module in time.
  • Step 403 based on the second exception information and the exception handling strategy, drive the first module to perform exception recovery processing, the first module is a module associated with the exception.
  • an exception handling policy is set in the control module, and the exception handling policy is used to indicate a manner of performing exception recovery processing in different abnormal situations.
  • the exception handling strategy is pre-configured and supports updating.
  • the exception handling policy adopts a file in xml or txt format.
  • the control module After the control module makes a further judgment on the abnormality based on the second abnormality information, it drives the first module associated with the abnormality to perform abnormality recovery processing based on the judgment result and the abnormality handling strategy.
  • the first module may include an exception module, and other exception-related modules other than the exception module, and, for different types of exceptions, the first module determined by the control module is different, and the exception recovery processing operation performed by the first module Also different.
  • control module schedules multiple first modules to perform exception recovery processing in parallel, so as to increase the speed of exception recovery and reduce the impact of the exception on user use.
  • the control module can quickly obtain the abnormal information through the handshake mechanism.
  • the main information of the exception that is, the first exception information
  • the perception of system abnormalities helps to improve the user experience.
  • the abnormality module reports the first abnormality information of the abnormality to the control module, and the control module obtains more detailed second abnormality information based on the first abnormality information, so that based on the second Exception information and exception handling strategy, drive the module associated with the exception to perform exception recovery processing, so that the operating system can recover from the exception;
  • the exception information can be quickly synchronized between different modules through the handshake mechanism, improving The timeliness of abnormal recovery is improved; moreover, the control module performs unified scheduling based on abnormal information, which helps to improve the parallelism of abnormal recovery processing and further accelerates the speed of abnormal recovery.
  • acquiring the second abnormal information synchronized by the abnormal module based on the first abnormal information includes:
  • the second exception information reported by the exception module based on the exception query message is received, and the second exception information is collected by the exception module when an exception occurs.
  • an exception query message is sent to the exception module based on the first exception information, including:
  • an exception inquiry message is sent to the exception module.
  • the method further includes:
  • the second module is driven to perform exception recovery processing, and the second module is a module associated with the exception.
  • acquiring the second abnormal information synchronized by the abnormal module based on the first abnormal information includes:
  • the second abnormal information is read from the abnormal information storage area based on the first abnormal information, and the second abnormal information is collected by the abnormal module and written into the abnormal information storage area when an abnormality occurs.
  • reading the second exception information from the exception information storage area based on the first exception information includes:
  • the second abnormal information is read from the target abnormal information storage area, and the second abnormal information is written into the target abnormal information storage area by the abnormal module based on the abnormal type and the abnormal module identification.
  • the first module is driven to perform exception recovery processing, including:
  • Each first module is driven to execute exception recovery processing operations.
  • the method further includes:
  • the third module is driven to perform exception recovery processing, and the third module is a module associated with the exception.
  • the third module is driven to perform exception recovery processing, including:
  • Each third module is driven to perform exception recovery processing operations.
  • the first module is driven to perform exception recovery processing, including:
  • Methods also include:
  • the operating system is switched to a bypass mode, and in the bypass mode, exceptions generated by the exception module are bypassed.
  • control module first determines the first module and the exception recovery processing operations performed by each first module based on the second exception information and exception handling strategy , so as to drive each first module to perform an exception recovery processing operation.
  • the exception handling strategy includes the correspondence between exception parameters, exception handling modules, and exception recovery processing operations. It can be extracted from the second exception information based on the exception parameter extraction template), and each exception handling module and the exception recovery processing operation that each exception handling module needs to execute are determined from the corresponding relationship. Schematically, the corresponding relationships included in the exception handling strategy are shown in Table 1.
  • control module can also use other methods.
  • the specific way of processing operations is defined.
  • the DebugManager drives the StrategyManager to perform DebugCtl, drives the SceneManager to perform DebugCtl, drives the 3AStatsManager to perform DebugCtl, drives the PowerManager to perform DebugCtl, and drives the MessageManager to perform LogCtl and ExceptionSync based on the exception information and exception handling strategy.
  • step 402 may include the following steps.
  • Step 402A sending an exception query message to the exception module based on the first exception information.
  • the control module after receiving the first abnormality information, sends an abnormality query message to the abnormality module that has an abnormality through the handshake mechanism based on the first abnormality information, instructing the abnormality module to further report the detailed information of the abnormality.
  • the control module determines the abnormal module based on the abnormal module identifier contained in the first abnormal information, and generates an abnormal query message based on the abnormal type contained in the first abnormal information, instructing the abnormal module to report detailed abnormal information of the abnormal type.
  • the control module cannot determine the specific cause of the abnormality and the way to recover from the abnormality based on simple abnormality information, so it needs to further instruct the abnormality module to report detailed abnormality information to improve the success rate of abnormality recovery;
  • the control module can determine the cause of the exception and how to handle the exception based on simple exception information. In this case, the control module instructs the exception module to report detailed exception information, which will affect the speed of exception recovery.
  • the main control module After receiving the first abnormal information, the main control module first determines whether there is an abnormal query requirement based on the first abnormal information, and sends an abnormal query request to the abnormal module when there is an abnormal query requirement Exception query message.
  • this step may include the following steps:
  • the control module determines whether there is an abnormal query requirement based on the abnormal type and the abnormal module identifier in the first abnormal information.
  • the control module is provided with a corresponding relationship between the abnormal type, the abnormal module identifier, and the abnormal inquiry requirement.
  • the control module determines whether to There is an abnormal inquiry requirement.
  • the corresponding relationship is pre-configured and supports updating. Schematically, the corresponding relationship is shown in Table 2.
  • control module obtains from the first abnormality information that the abnormality type is temperature abnormality, and the abnormality module is identified as ModuleB, thereby determining that there is an abnormality inquiry requirement.
  • control module may also judge the abnormal inquiry requirement based on other abnormal information (that is, other content in the first abnormal information) other than the abnormal type and the abnormal module identification, which is not constituted by this embodiment. limited.
  • control module sends an abnormal query message to the abnormal module, so as to make further abnormal judgment based on the detailed abnormal information reported by the abnormal module.
  • the exception handling policy in addition to determining the exception recovery processing method together with the detailed exception information, can also determine the exception recovery processing method together with the simple exception information.
  • the control module drives the second module to perform abnormal recovery processing based on the first abnormal information and the abnormal processing strategy, and the second module is a module associated with the abnormal.
  • the second module may include an exception module, and other exception-related modules other than the exception module, and, for different types of exceptions, the second module determined by the control module is different, and the exception recovery processing operation performed by the second module is also different.
  • the second module driven by the control module when performing abnormal recovery processing based on the first abnormal information and abnormal handling strategy, and the abnormal recovery based on the second abnormal information and abnormal handling strategy
  • the first module driven during processing is the same, that is, the control module can also implement abnormal recovery processing without obtaining detailed abnormal information, which improves the speed of abnormal recovery.
  • Step 402B receiving the second abnormality information reported by the abnormality module based on the abnormality inquiry message, the second abnormality information is collected by the abnormality module when an abnormality occurs.
  • the abnormal module fills the second abnormal information collected when an abnormal occurs into a buffer (buffer), and reports it to the control module; correspondingly, the control module receives Extract the second exception information from the buffer.
  • the abnormality module reports first abnormality information to the control module when an abnormality occurs. Based on the first abnormal information, the control module determines whether there is an abnormal query requirement, that is, whether it is necessary to further obtain detailed abnormal information.
  • the control module drives the abnormal module and other modules related to the abnormal to perform abnormal recovery processing according to the first abnormal information and the abnormal processing strategy; if there is an abnormal query demand, the control module sends an abnormal query message to the abnormal module, and after receiving the abnormal query message, the abnormal module further reports the second abnormal information to the control module, so that the control module drives the abnormal module according to the second abnormal information and the abnormal processing strategy And other modules related to exceptions for exception recovery processing.
  • control module instructs the abnormal module to further report detailed abnormal information by sending an abnormal query message, so that the control module can drive related modules to perform abnormal recovery processing based on detailed abnormal information, and improve the success rate of abnormal recovery .
  • control module when the control module receives the first abnormal information, it further determines whether to perform further abnormal query operations based on the first abnormal information, and directly drives the Relevant modules perform exception recovery processing without exception inquiry and detailed exception information reporting, which helps to improve the speed of exception recovery for minor or simple exceptions.
  • the amount of detailed abnormal information is usually large.
  • the control module obtains detailed abnormal information through abnormal query, the transmission of detailed abnormal information will consume a certain amount of time, which will affect the speed of abnormal recovery.
  • the abnormal module can collect the second abnormal information when an abnormal occurs, and write the second abnormal information into the abnormal information storage area, because both the bottom module and the upper module have The access authority of the abnormal information storage area, so when it is necessary to obtain detailed abnormal information, the control module can read the second abnormal information from the abnormal information storage area based on the first abnormal information, without reporting by the abnormal module.
  • step 402 may include the following steps.
  • Step 402C acquiring the exception type and the exception module identifier included in the first exception information, where the exception module identifier is the identifier of the exception module.
  • the exception module stores the detailed exception information in the specified exception storage area based on the agreed storage strategy and according to the exception module identifier and exception type.
  • the control module obtains the first abnormality information through the handshake mechanism, it can read the detailed abnormality information from the specified abnormality storage area according to the abnormality type contained therein and the abnormality module identification.
  • exception information of different exception types in different exception modules is stored in different exception storage areas.
  • Step 402D based on the exception type and the exception module identifier, determine the target exception information storage area, where different exception module identifiers and exception types correspond to different exception information storage areas.
  • control module stores the correspondence between the abnormal module identifier, the abnormal type, and the address of the abnormal information storage area.
  • the control module promptly , query the address of the target exception information storage area from the corresponding relationship.
  • Table 3 Schematically, the corresponding relationship is shown in Table 3.
  • the control module determines the abnormal information storage area corresponding to address 009 as the target abnormal information storage area based on the above correspondence.
  • the exception module stores the correspondence between the exception type and the address of the exception information storage area (only the correspondence of its own module is required), and when an exception occurs, the exception module, according to the exception type, starts from the The address of the target abnormal information storage area is determined in the corresponding relationship, and then the second abnormal information is written into the target abnormal information storage area based on the address.
  • Step 402E read the second exception information from the target exception information storage area, and write the second exception information into the target exception information storage area by the exception module based on the exception type and the exception module identifier.
  • control module reads the second abnormal information written by the abnormal module from the target abnormal information storage area, so as to perform abnormal recovery processing based on the second abnormal information.
  • the control module determines whether there is a need to read detailed abnormal information based on the first abnormal information, and if there is a demand, perform the above steps of determining the target abnormal information storage area and reading the second abnormal information, if not If there is a requirement, abnormal recovery processing is performed based on the first abnormal information.
  • the process of determining whether there is a demand can refer to the above-mentioned step 402A, which will not be repeated here in this embodiment.
  • the exception information collected during the latest n times of exceptions is stored in the exception information storage area, and correspondingly, the control module reads the latest written exception information from the exception information storage area.
  • the abnormality module reports the first abnormality information to the control module when an abnormality occurs, and writes the detailed second abnormality information into the target abnormality information storage area based on the abnormality type. Based on the first abnormal information, the control module determines whether there is a need to read detailed abnormal information, that is, whether it is necessary to further obtain detailed abnormal information.
  • the control module drives the abnormal module and other modules related to the abnormal to perform abnormal recovery processing according to the first abnormal information and the abnormal handling strategy; if there is a demand, the control module Based on the first exception information, the module reads the second exception information from the target exception information storage area, and drives the exception module and other modules related to the exception to perform exception recovery processing according to the second exception information and exception handling strategy.
  • the exception module writes the detailed second exception information into the target exception information storage area based on the exception type, so that the control module can subsequently write the target exception information based on the exception module identifier and exception type in the first exception information.
  • Reading the second abnormal information in the storage area does not require the abnormal module to report information based on the request, avoiding the delay caused by the transmission of the second abnormal information with a large amount of information (especially in complex abnormal scenarios), and further improving the recovery of abnormal speed.
  • the control module can determine the exception recovery processing operations that some exception-related modules need to perform based on the first exception information of the exception, while the exception recovery processing operations that other exception-related modules need to perform need to be based on the detailed
  • the second abnormal information can be determined. Therefore, in order to further improve the speed of exception recovery, in a possible implementation, after receiving the first exception information, the control module first drives the third module (module associated with the exception) based on the first exception information and the exception handling strategy Executing exception recovery processing operations (that is, performing abnormal recovery processing in advance); in parallel, the control module obtains second abnormal information based on the first abnormal information, so as to further drive the first module to perform abnormal recovery processing based on the second abnormal information.
  • the control module determines the third module and the exception recovery processing operations performed by each third module based on the first exception information and exception handling strategy, thereby driving each third module to perform exception recovery processing.
  • Resume processing operations the process of determining the modules performing exception recovery processing and the exception recovery processing operations performed by each module can refer to the above-mentioned embodiments, and this embodiment will not repeat them here.
  • the abnormality module reports the first abnormality information to the control module when an abnormality occurs, and the control module first drives module A to restart based on the first abnormality information, and synchronously sends An exception query message is sent to obtain the second exception information reported by the exception module. Further, based on the second abnormal information, the driving module drives the abnormal module, the restarted module A and module B to perform abnormal recovery processing. By intervening in advance to perform abnormal recovery processing, the restart operation of module A is executed in advance, which helps to speed up the abnormal recovery speed.
  • control device drives the first module to perform exception recovery processing, it first determines whether the current exception supports exception recovery processing based on the second exception information. If exception recovery processing is supported, the first module is driven to perform exception recovery processing based on the second exception information and exception processing strategy; if exception recovery processing is not supported, the operating system is switched to a bypass mode to cause the exception module to occur exceptions can be bypassed.
  • control module stores the corresponding relationship between abnormal parameters and abnormal recovery processing support conditions. After obtaining the second abnormal information, the control module calculates the abnormal parameters from the corresponding relationship Determines whether the current exception supports exception recovery handling.
  • control module can handle the abnormality through traditional abnormality handling methods, such as powering on again, and switching to the normal mode again after the abnormality is recovered.
  • a coprocessor and an application processor are set in the terminal, and the coprocessor is used to preprocess the original image data output by the camera module, so that the preprocessed The image data of the input AP for further processing.
  • the temperature control module reports a temperature abnormality to the CameraHAL (that is, the control module).
  • the CameraHAL determines that the abnormality cannot be recovered from the abnormality, it switches to the bypass mode and stops image processing through the coprocessor.
  • the raw image data is directly processed by the AP.
  • FIG. 12 shows a structural block diagram of an exception handling device provided by an embodiment of the present application.
  • the device can include:
  • the control module 1201 is configured to receive the first exception information reported by the exception module 1202 in the operating system;
  • the control module 1201 is further configured to acquire second exception information synchronized by the exception module 1202 based on the first exception information, the second exception information and the first exception information correspond to the same exception, and the first exception information
  • the information volume of the second abnormal information is greater than the information volume of the first abnormal information
  • the control module 1201 is further configured to drive the first module 1203 to perform exception recovery processing based on the second exception information and the exception handling strategy, and the first module is a module associated with the exception.
  • control module 1201 when obtaining the second abnormal information synchronized by the abnormal module 1202 based on the first abnormal information, the control module 1201 is specifically configured to:
  • the second exception information reported by the exception module 1202 based on the exception query message is received, and the second exception information is collected by the exception module when an exception occurs.
  • control module 1201 when sending an exception query message to the exception module 1202 based on the first exception information, the control module 1201 is specifically configured to:
  • an exception query message is sent to the exception module 1202 .
  • control module 1201 is also used for:
  • control module 1201 when obtaining the second abnormal information synchronized by the abnormal module 1202 based on the first abnormal information, the control module 1201 is specifically configured to:
  • the second exception information is read from the exception information storage area based on the first exception information, and the second exception information is collected by the exception module 1202 and written into the exception information storage area when an exception occurs.
  • control module 1201 when reading the second abnormal information from the abnormal information storage area based on the first abnormal information, the control module 1201 is specifically configured to:
  • the abnormal module identification is the identification of the abnormal module
  • control module 1201 when the first module 1203 is driven to perform exception recovery processing based on the second exception information and exception handling strategy, the control module 1201 is specifically configured to:
  • Each of the first modules 1203 is driven to execute the exception recovery processing operation.
  • control module 1201 is also used for:
  • a third module is driven to perform exception recovery processing, and the third module is a module associated with the exception.
  • control module 1201 when driving the third module to perform exception recovery processing based on the first exception information and the exception handling strategy, the control module 1201 is specifically configured to:
  • control module 1201 when driving the first module 1203 to perform exception recovery processing based on the second exception information and exception handling strategy, the control module 1201 is configured to:
  • the control module 1201 is also used for:
  • the operating system is switched to a bypass mode, and in the bypass mode, exceptions generated by the exception module 1202 are bypassed.
  • the abnormality module reports the first abnormality information of the abnormality to the control module, and the control module obtains more detailed second abnormality information based on the first abnormality information, so that based on the second Exception information and exception handling strategy, drive the module associated with the exception to perform exception recovery processing, so that the operating system can recover from the exception;
  • the exception information can be quickly synchronized between different modules through the handshake mechanism, improving The timeliness of abnormal recovery is improved; moreover, the control module performs unified scheduling based on abnormal information, which helps to improve the parallelism of abnormal recovery processing and further accelerates the speed of abnormal recovery.
  • control module instructs the abnormal module to further report detailed abnormal information by sending an abnormal query message, so that the control module can drive related modules to perform abnormal recovery processing based on detailed abnormal information, and improve the success rate of abnormal recovery .
  • control module when the control module receives the first abnormal information, it further determines whether to perform further abnormal query operations based on the first abnormal information, and directly drives the Relevant modules perform exception recovery processing without exception inquiry and detailed exception information reporting, which helps to improve the speed of exception recovery for minor or simple exceptions.
  • the abnormality module writes detailed second abnormality information into the target abnormality information storage area based on the abnormality type, so that the control module can subsequently write the target abnormality information based on the abnormality module identification and abnormality type in the first abnormality information Reading the second abnormal information in the storage area does not require the abnormal module to report information based on the request, avoiding the delay caused by the transmission of the second abnormal information with a large amount of information (especially in complex abnormal scenarios), and further improving the recovery of abnormal speed.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the exception handling method described in each of the above embodiments .
  • a computer program product comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the exception handling method provided in various optional implementation manners of the above aspect.
  • the "plurality” mentioned herein refers to two or more than two.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently.
  • the character "/” generally indicates that the contextual objects are an "or” relationship.
  • the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps. In some other embodiments, the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers The steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种异常处理方法、装置、计算机设备及存储介质,属于计算机技术领域。该方法包括:接收操作系统中异常模块上报的第一异常信息(401);基于第一异常信息获取异常模块同步的第二异常信息,第二异常信息和第一异常信息对应同一异常,且第二异常信息的信息量大于第一异常信息的信息量(402);基于第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,第一模块是与异常关联的模块(403)。采用本申请实施例提供的方案,不同模块之间通过握手机制能够实现异常信息快速同步,提高了异常恢复的及时性;并且,由控制模块基于异常信息进行统一调度,有助于提高异常恢复处理的并行度,进一步加快了异常恢复的速度。

Description

异常处理方法、装置、计算机设备及存储介质
本申请要求于2021年7月29日提交的申请号为202110866592.5、发明名称为“异常处理方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别涉及一种异常处理方法、装置、计算机设备及存储介质。
背景技术
系统(或程序)在运行过程中出现预料之外的情况被称为异常。轻微异常对系统运行的影响较小,而严重异常则会导致系统无法运行,因此如何对异常进行及时有效处理成为提高系统稳定性的关键。
发明内容
本申请实施例提供了一种异常处理方法、装置、计算机设备及存储介质。所述技术方案如下:
一方面,本申请实施例提供了一种异常处理方法,所述方法包括:
接收操作系统中异常模块上报的第一异常信息;
基于所述第一异常信息获取所述异常模块同步的第二异常信息,所述第二异常信息和所述第一异常信息对应同一异常,且所述第二异常信息的信息量大于所述第一异常信息的信息量;
基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,所述第一模块是与异常关联的模块。
另一方面,本申请实施例提供了一种异常处理装置,所述装置包括:
控制模块,用于接收操作系统中异常模块上报的第一异常信息;
所述控制模块,还用于基于所述第一异常信息获取所述异常模块同步的第二异常信息,所述第二异常信息和所述第一异常信息对应同一异常,且所述第二异常信息的信息量大于所述第一异常信息的信息量;
所述控制模块,还用于基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,所述第一模块是与异常关联的模块。
另一方面,本申请实施例提供了一种计算机设备,所述计算机设备包括:处理器和存储器;所述存储器存储有至少一段程序,所述至少一段程序用于被所述处理器执行以实现如上述方面所述的异常处理方法。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现上述方面所述的异常处理方法。
另一方面,本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中;计算机设备的 处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的异常处理方法。
附图说明
图1示出了本申请一个示例性实施例提供的计算机设备的结构方框图;
图2示出了本申请另一个示例性实施例提供的计算机设备的结构方框图;
图3示出了本申请另一个示例性实施例提供的计算机设备的结构方框图;
图4示出了本申请一个示例性实施例提供的异常处理方法的流程图;
图5是本申请一个示例性实施例示出的异常恢复处理过程的实施示意图;
图6示出了本申请另一个示例性实施例提供的异常处理方法的流程图;
图7是图6所示异常处理方法中模块间交互过程的交互流程图;
图8示出了本申请另一个示例性实施例提供的异常处理方法的流程图;
图9是本申请一个示例性实施例示出的异常信息存储区域的示意图;
图10是图8所示异常处理方法中模块间交互过程的交互流程图;
图11是本申请另一个实施例示出的异常处理方法中模块间交互过程的交互流程图;
图12示出了本申请一个实施例提供的异常处理装置的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
请参考图1,其示出了本申请一个示例性实施例提供的计算机设备的结构方框图。该计算机设备可以是智能手机、平板电脑、智能电视、个人计算机等运行有操作系统的电子设备。本申请中的计算机设备可以包括一个或多个如下部件:处理器110、存储器120和输入输出设备130。
处理器110可以包括一个或者多个处理核心。处理器110利用各种接口和线路连接整个计算机设备内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行计算机设备的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器120包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程 序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等,该操作系统可以是安卓(Android)系统(包括基于Android系统深度开发的系统)、苹果公司开发的IOS系统(包括基于IOS系统深度开发的系统)或其它系统。存储数据区还可以存储计算机设备在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
以操作系统为Android系统为例,存储器120中存储的程序和数据如图2所示,存储器120中可存储有Linux内核层220、系统运行库层240、应用框架层260和应用层280,其中,Linux内核层220、系统运行库层240和应用框架层260属于操作系统空间,应用层280属于用户空间。Linux内核层220为计算机设备的各种硬件提供了底层的驱动,如显示驱动、音频驱动、摄像头驱动、蓝牙驱动、Wi-Fi驱动、电源管理等。系统运行库层240通过一些C/C++库来为Android系统提供了主要的特性支持。如SQLite库提供了数据库的支持,OpenGL/ES库提供了3D绘图的支持,Webkit库提供了浏览器内核的支持等。在系统运行库层240中还提供有安卓运行时库(Android Runtime),它主要提供了一些核心库,能够允许开发者使用Java语言来编写Android应用。应用框架层260提供了构建应用程序时可能用到的各种应用程序接口(Application Programming Interface,API),开发者也可以通过使用这些API来构建自己的应用程序,比如活动管理、窗口管理、视图管理、通知管理、内容提供者、包管理、通话管理、资源管理、定位管理。应用层280中运行有至少一个应用程序,这些应用程序可以是操作系统自带的原生应用程序,比如联系人程序、短信程序、时钟程序、相机应用等;也可以是第三方开发者所开发的第三方应用程序,比如游戏类应用程序、即时通信程序、相片美化程序、购物程序等。
以操作系统为IOS系统为例,存储器120中存储的程序和数据如图3所示,IOS系统包括:核心操作系统层320(Core OS layer)、核心服务层340(Core Services layer)、媒体层360(Media layer)、可触摸层380(Cocoa Touch Layer)。核心操作系统层320包括了操作系统内核、驱动程序以及底层程序框架,这些底层程序框架提供更接近硬件的功能,以供位于核心服务层340的程序框架所使用。核心服务层340提供给应用程序所需要的系统服务和/或程序框架,比如基础(Foundation)框架、账户框架、广告框架、数据存储框架、网络连接框架、地理位置框架、运动框架等等。媒体层360为应用程序提供有关视听方面的接口,如图形图像相关的接口、音频技术相关的接口、视频技术相关的接口、音视频传输技术的无线播放(AirPlay)接口等。可触摸层380为应用程序开发提供了各种常用的界面相关的框架,可触摸层380负责用户在终端上的触摸交互操作。比如本地通知服务、远程推送服务、广告框架、游戏工具框架、消息用户界面接口(User Interface,UI)框架、用户界面UIKit框架、地图框架等等。
在图3所示出的框架中,与大部分应用程序有关的框架包括但不限于:核心服务层340中的基础框架和可触摸层380中的UIKit框架。基础框架提供许多基本的对象类和数据类型,为所有应用程序提供最基本的系统服务,和UI无关。 而UIKit框架提供的类是基础的UI类库,用于创建基于触摸的用户界面,iOS应用程序可以基于UIKit框架来提供UI,所以它提供了应用程序的基础架构,用于构建用户界面,绘图、处理和用户交互事件,响应手势等等。
输入输出设备130可以包括触摸显示屏,该触摸显示屏用于接收用户使用手指、触摸笔等任何适合的物体在其上或附近的触摸操作,以及显示各个应用程序的用户界面。触摸显示屏通常设置在计算机设备的前面板。触摸显示屏可被设计成为全面屏、曲面屏或异型屏。触摸显示屏还可被设计成为全面屏与曲面屏的结合,异型屏与曲面屏的结合,本申请实施例对此不加以限定。
除此之外,本领域技术人员可以理解,上述附图所示出的计算机设备的结构并不构成对计算机设备的限定,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,计算机设备中还包括射频电路、输入单元、传感器、音频电路、无线保真(Wireless Fidelity,WiFi)模块、电源、蓝牙模块等部件,在此不再赘述。
并且,为了方便表述,下述实施例中,以操作系统为安卓系统为例进行示意性说明,但并不对此构成限定。
请参考图4,其示出了本申请一个示例性实施例提供的异常处理方法的流程图,本申请实施例以该方法应用于计算机设备为例进行说明,该方法包括:
步骤401,接收操作系统中异常模块上报的第一异常信息。
在一种可能的实施方式中,计算机设备的操作系统中的各个模块之间遵循握手机制,且设置有统一的控制模块,该控制模块用于接收其它模块上报的异常信息,并基于异常信息控制相关模块进行异常恢复处理。当异常模块发生异常时,即通过握手机制向控制模块上报异常信息。
可选的,以安卓系统为例,该异常模块可以为操作系统中硬件抽象层(Hardware Abstraction Layer,HAL)中的管理模块,比如功耗管理模块、温控管理模块、消息管理模块等等,控制模块可以为HAL中的核心管理(coremanager)模块或者更加上层的模块。当然,该异常模块也可以是操作系统中其他系统层级中的模块,本申请实施例对异常模块并不作限定。
并且,为了避免直接向控制模块上报大数据量的异常信息,导致传输耗时较高的问题,异常模块发生异常并首次通过握手机制上报的第一异常信息为异常的基本信息,以便控制模块基于第一异常信息对异常模块中发生的异常进行初步判断。
可选的,不同异常模块上报的第一异常信息的信息类型相同。在一些实施例中,第一异常信息中包含必要异常信息,该必要异常信息至少包括异常类型以及异常模块标识。其中,该异常类型可以包括操作异常(RuntimeExcetpion)、传输异常(IOException)、功耗异常(PowerException)、温度异常(ThermalException)等等,本申请实施例异常类型不作限定。
当然,在其他可能的实施方式中,不同异常模块上报的第一异常信息中除了可以包含统一信息类型的异常信息(比如必要异常信息)外,还可以包含异常模块所特有的异常信息。比如,温控管理模块上报的第一异常信息中可以包 含温度信息,功耗管理模块上报的第一异常信息中可以包括功耗信息等等。本申请实施例并不对第一异常信息中包含的具体内容进行限定。
步骤402,基于第一异常信息获取异常模块同步的第二异常信息,第二异常信息和第一异常信息对应同一异常,且第二异常信息的信息量大于第一异常信息的信息量。
由于第一异常信息的信息量较低,控制模块可能无法确定出异常恢复的具体方式,因此控制模块基于第一异常信息进一步通过握手机制,获取异常模块同步的第二异常信息,实现异常模块与控制模块之间异常信息的同步。相较于第一异常信息,第二异常信息的信息量更大(即第二异常信息更加详细),相应的,控制模块基于第二异常信息可以对异常模块中发生的异常进行进一步判断。可选的,不同异常模块同步的第二异常信息的内容不同。
在一些实施例中,异常发生时,异常模块即收集第二异常信息,从而在控制模块需要进一步获取详细异常信息时,及时提供给控制模块。
关于控制模块获取第二异常信息的具体方式,下述实施例进行详述。
步骤403,基于第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,第一模块是与异常关联的模块。
在一种可能的实施方式中,控制模块中设置有异常处理策略,该异常处理策略用于指示在不同异常情况下进行异常恢复处理的方式。其中,该异常处理策略预先配置并支持更新。
可选的,该异常处理策略采用xml或txt格式的文件。
控制模块基于第二异常信息对异常做出进一步判断后,基于判断结果和异常处理策略,驱动与异常关联的第一模块进行异常恢复处理。其中,该第一模块可以包括异常模块,以及异常模块外其他与异常相关的模块,并且,针对不同类型的异常,控制模块确定的第一模块不同,且第一模块所执行的异常恢复处理操作也不同。
在一种可能的实施方式中,控制模块调度多个第一模块并行进行异常恢复处理,从而提高异常恢复的速度,降低异常对用户使用造成的影响。
相较于相关技术中的异常处理机制,采用本申请实施例提供的方案能够避免层层上抛异常信息导致的滞后性问题,提高异常信息的同步速度;此外,控制模块通过握手机制快速获取到异常的主要信息(即第一异常信息)后,可以根据需求获取更加详细的异常信息,并结合自身的异常处理策略控制相关模块进行同步异常恢复处理,进一步加快了异常恢复的速度,降低用户对系统异常的感知,有助于提升用户的使用体验。
综上所述,本申请实施例中,异常模块通过向控制模块上报所发生异常的第一异常信息,由控制模块基于第一异常信息获取更为详细的第二异常信息,从而基于该第二异常信息和异常处理策略,驱动与异常关联的模块进行异常恢复处理,使操作系统从异常中恢复;采用本申请实施例提供的方案,不同模块之间通过握手机制能够实现异常信息快速同步,提高了异常恢复的及时性;并且,由控制模块基于异常信息进行统一调度,有助于提高异常恢复处理的并行 度,进一步加快了异常恢复的速度。
可选的,基于第一异常信息获取异常模块同步的第二异常信息,包括:
基于第一异常信息向异常模块发送异常询问消息;
接收异常模块基于异常询问消息上报的第二异常信息,第二异常信息由异常模块在发生异常时收集得到。
可选的,基于第一异常信息向异常模块发送异常询问消息,包括:
获取第一异常信息中包含的异常类型以及异常模块标识,异常模块标识为异常模块的标识;
在基于异常类型和异常模块标识确定出存在异常询问需求的情况下,向异常模块发送异常询问消息。
可选的,获取第一异常信息中包含的异常类型以及异常模块标识之后,方法还包括:
在基于异常类型和异常模块标识确定出不存在异常询问需求的情况下,基于第一异常信息和异常处理策略,驱动第二模块进行异常恢复处理,第二模块是与异常关联的模块。
可选的,基于第一异常信息获取异常模块同步的第二异常信息,包括:
基于第一异常信息从异常信息存储区域中读取第二异常信息,第二异常信息由异常模块在发生异常时收集并写入异常信息存储区域。
可选的,基于第一异常信息从异常信息存储区域中读取第二异常信息,包括:
获取第一异常信息中包含的异常类型以及异常模块标识,异常模块标识为异常模块的标识;
基于异常类型和异常模块标识,确定目标异常信息存储区域,其中,不同异常模块标识和异常类型对应不同异常信息存储区域;
从目标异常信息存储区域中读取第二异常信息,第二异常信息由异常模块基于异常类型和异常模块标识写入目标异常信息存储区域。
可选的,基于第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,包括:
基于第二异常信息和异常处理策略,确定第一模块以及各个第一模块执行的异常恢复处理操作;
驱动各个第一模块执行异常恢复处理操作。
可选的,接收操作系统中异常模块上报的第一异常信息之后,方法还包括:
基于第一异常信息和异常处理策略,驱动第三模块进行异常恢复处理,第三模块是与异常关联的模块。
可选的,基于第一异常信息和异常处理策略,驱动第三模块进行异常恢复处理,包括:
基于第一异常信息和异常处理策略,确定第三模块以及各个第三模块执行的异常恢复处理操作;
驱动各个第三模块执行异常恢复处理操作。
可选的,基于第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,包括:
在第二异常信息指示支持异常恢复处理的情况下,基于第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理;
方法还包括:
在第二异常信息指示不支持异常恢复处理的情况下,将操作系统切换为旁路模式,旁路模式下,异常模块发生的异常被绕过。
关于驱动第一模块进行异常恢复处理的具体过程,在一种可能的实施方式中,控制模块首先基于第二异常信息和异常处理策略,确定第一模块以及各个第一模块执行的异常恢复处理操作,从而驱动各个第一模块执行异常恢复处理操作。
在一些实施例中,异常处理策略中包含异常参数、异常处理模块以及异常恢复处理操作之间的对应关系,控制模块获取到第二异常信息后,即根据第二异常信息中包含的异常参数(可以基于异常参数提取模板从第二异常信息中提取得到),从该对应关系中确定出各个异常处理模块,以及各个异常处理模块所需执行的异常恢复处理操作。示意性的,异常处理策略中包含的对应关系如表一所示。
表一
Figure PCTCN2022098325-appb-000001
当然,除了基于异常处理策略中的对应关系确定异常处理模块以及异常恢复处理操作外,控制模块还可以采用其他方式,本实施例并不对异常处理策略的具体形式,以及确定异常处理模块和异常恢复处理操作的具体方式进行限定。
在一个示意性的例子中,如图5所示,DebugManager基于异常信息和异常处理策略,驱动StrategyManager进行DebugCtl,驱动SceneManager进行DebugCtl,驱动3AStatsManager进行DebugCtl,驱动PowerManager进行DebugCtl,驱动MessageManager进行LogCtl和ExceptionSync,驱动Driver进行IOCtl,确定MMS进行ExceptionSync。
关于第二异常信息的具体获取方式,在一种可能的实施方式中,控制模块可以继续采用握手机制,指示异常模块上报第二异常信息。如图6所示,步骤402可以包括如下步骤。
步骤402A,基于第一异常信息向异常模块发送异常询问消息。
可选的,控制模块接收到第一异常信息后,基于第一异常信息通过握手机制向出现异常的异常模块发送异常询问消息,指示异常模块进一步上报异常的详细信息。比如,控制模块基于第一异常信息中包含的异常模块标识确定出异 常模块,并基于第一异常信息中包含的异常类型,生成异常询问消息,指示异常模块上报该异常类型的详细异常信息。
对于一些严重或复杂异常,控制模块基于简单的异常信息无法确定出具体异常原因以及异常恢复立方式,因而需要进一步指示异常模块上报详细异常信息,以提高异常恢复的成功率;而对于一些轻微或简单异常,控制模块基于简单的异常信息即可确定出异常原因以及异常恢复处理方式,这种情况下,控制模块指示异常模块上报详细异常信息将会影响异常恢复速度。
为了保证异常恢复的成功率,并提高异常恢复速度,主控制模块接收到第一异常信息后,首先基于第一异常信息确定是否存在异常询问需求,并在存在异常询问需求时,向异常模块发送异常询问消息。在一种可能的实施方式,本步骤可以包括如下步骤:
一、获取第一异常信息中包含的异常类型以及异常模块标识,异常模块标识为异常模块的标识。
可选的,控制模块基于第一异常信息中的异常类型以及异常模块标识,确定是否存在异常询问需求。在一些实施例中,控制模块中设置有异常类型、异常模块标识以及异常询问需求之间的对应关系,当接收到第一异常信息时,控制模块即根据第一异常信息和对应关系,确定是否存在异常询问需求。其中,该对应关系为预先配置,并支持更新。示意性的,该对应关系如表二所示。
表二
异常类型 异常模块标识 异常询问需求
操作异常 ModuleA
输入输出异常 ModuleA
操作异常 ModuleB
温度异常 ModuleB
结合表二所示的对应关系,在一个示意性的例子中,控制模块从第一异常信息中获取到异常类型为温度异常,且异常模块标识为ModuleB,从而确定出存在异常询问需求。
当然,在其他可能的实施方式中,控制模块还可以基于异常类型和异常模块标识以外的其他异常信息(即第一异常信息中的其他内容)进行异常询问需求判断,本实施例并不对此构成限定。
二、在基于异常类型和模块标识确定出存在异常询问需求的情况下,向异常模块发送异常询问消息。
进一步的,当存在异常询问需求时,控制模块即向异常模块发送异常询问消息,以便基于异常模块上报的详细异常信息进行进一步异常判断。
在一些实施例中,异常处理策略除了与详细异常信息共同确定异常恢复处理方式外,还可以与简单异常信息共同确定异常恢复处理方式,相应的,在基于异常类型和异常模块标识确定出不存在异常询问需求的情况下,控制模块基于第一异常信息和异常处理策略,驱动第二模块进行异常恢复处理,第二模块是与异常关联的模块。
其中,第二模块可以包括异常模块,以及异常模块外其他与异常相关的模块,并且,针对不同类型的异常,控制模块确定的第二模块不同,且第二模块所执行的异常恢复处理操作也不同。
对于同一异常模块出现的同一异常(轻微或简单异常),控制模块基于第一异常信息和异常处理策略进行异常恢复处理时驱动的第二模块,与基于第二异常信息和异常处理策略进行异常恢复处理时驱动的第一模块相同,即在无需获取详细异常信息的情况下,控制模块同样能够实现异常恢复处理,提高了异常恢复的速度。
步骤402B,接收异常模块基于异常询问消息上报的第二异常信息,第二异常信息由异常模块在发生异常时收集得到。
在一种可能的实施方式中,异常模块接收到异常询问消息后,将发生异常时收集到的第二异常信息填充至缓冲区(buffer),并上报至控制模块;相应的,控制模块从接收到的buffer中提取第二异常信息。
在一个示意性的例子中,如图7所示,异常模块在发生异常时向控制模块上报第一异常信息。控制模块基于第一异常信息,确定是否存在异常询问需求,即是否需要进一步获取详细异常信息。若不存在异常询问需求,即基于第一异常信息即可进行异常恢复,控制模块根据第一异常信息和异常处理策略,驱动异常模块以及与异常相关的其他模块进行异常恢复处理;若存在异常询问需求,则控制模块向异常模块发送异常询问消息,由异常模块接收到异常询问消息后,进一步向控制模块上报第二异常信息,从而由控制模块根据第二异常信息和异常处理策略,驱动异常模块以及与异常相关的其他模块进行异常恢复处理。
本实施例中,对于严重或复杂异常,控制模块通过下发异常询问消息,指示异常模块进一步上报详细异常信息,以便控制模块基于详细异常信息驱动相关模块进行异常恢复处理,提高异常恢复的成功率。
并且,控制模块在接收到第一异常信息时,进一步基于第一异常信息确定是否需要执行进一步异常问询操作,在无需执行进一步异常问询操作时,直接根据第一异常信息和异常处理策略驱动相关模块进行异常恢复处理,无需进行异常问询和详细异常信息上报,有助于提高轻微或简单异常的异常恢复速度。
对于严重或复杂异常,其详细异常信息的信息量通常较大,当控制模块采用异常问询方式获取详细异常信息时,详细异常信息的传输会消耗一定时间,影响异常恢复速度。
为了加快异常恢复速度,在另一种可能的实施方式中,异常模块可以在发生异常时收集第二异常信息,并将第二异常信息写入异常信息存储区域,由于底层模块和上层模块均具有异常信息存储区域的访问权限,因此当需要获取详细异常信息时,控制模块可以基于第一异常信息从异常信息存储区域中读取第二异常信息,无需异常模块上报。如图8所示,步骤402可以包括如下步骤。
步骤402C,获取第一异常信息中包含的异常类型以及异常模块标识,异常模块标识为异常模块的标识。
在一种可能的实施方式中,为了提高获取详细异常信息时的准确性以及效 率,异常模块基于约定的存储策略,根据异常模块标识以及异常类型,将详细异常信息存储到指定的异常存储区域。相应的,控制模块通过握手机制获取到第一异常信息后,即可根据其中包含的异常类型以及异常模块标识,从该指定的异常存储区域读取详细异常信息。
在一个示意性的例子中,如图9所示,不同异常模块中不同异常类型的异常信息被存储在不同异常存储区域。
步骤402D,基于异常类型和异常模块标识,确定目标异常信息存储区域,其中,不同异常模块标识和异常类型对应不同异常信息存储区域。
在一种可能的实施方式中,控制模块存储有异常模块标识、异常类型以及异常信息存储区域地址之间的对应关系,当需要进一步获取详细异常信息时,控制模块即根据异常类型和异常模块标识,从该对应关系中查询目标异常信息存储区域的地址。示意性的,该对应关系如表三所示。
表三
  类型1 类型2 类型3 类型4 类型5
模块A 地址001 地址002 地址003 地址004 地址005
模块B 地址006 地址007 地址008 地址009 地址010
模块C 地址011 地址012 地址013 地址014 地址015
比如,当获取到的异常模块标识“B”以及异常类型“类型4”时,控制模块基于上述对应关系,将地址009对应的异常信息存储区域确定为目标异常信息存储区域。
在一种可能的实施方式中,异常模块存储有异常类型与异常信息存储区域地址之间的对应关系(只需要自身模块的对应关系),当发生异常时,异常模块即根据异常类型,从该对应关系中确定出目标异常信息存储区域的地址,进而基于该地址将第二异常信息写入目标异常信息存储区域。
步骤402E,从目标异常信息存储区域中读取第二异常信息,第二异常信息由异常模块基于异常类型和异常模块标识写入目标异常信息存储区域。
进一步的,控制模块从目标异常信息存储区域读取异常模块写入的第二异常信息,从而基于第二异常信息进行异常恢复处理。
在一种可能的实施方式中,控制模块基于第一异常信息确定是否存在详细异常信息读取需求,若存在需求,执行上述确定目标异常信息存储区域以及读取第二异常信息的步骤,若不存在需求,则基于第一异常信息进行异常恢复处理。其中,确定是否存在需求的过程可以参考上述步骤402A,本实施例在此不再赘述。
在一些实施例中,异常信息存储区域中存储最近n次异常时收集到的异常信息,相应的,控制模块从异常信息存储区域读取最新写入的异常信息。
在一个示意性的例子中,如图10所示,异常模块在发生异常时向控制模块上报第一异常信息,并基于异常类型将详细的第二异常信息写入目标异常信息存储区域。控制模块基于第一异常信息,确定是否存在详细异常信息读取需求,即是否需要进一步获取详细异常信息。若不存在需求,即基于第一异常信息即 可进行异常恢复,控制模块则根据第一异常信息和异常处理策略,驱动异常模块以及与异常相关的其他模块进行异常恢复处理;若存在需求,控制模块则基于第一异常信息,从目标异常信息存储区域中读取第二异常信息,从而根据第二异常信息和异常处理策略,驱动异常模块以及与异常相关的其他模块进行异常恢复处理。
本实施例中,异常模块基于异常类型,将详细的第二异常信息写入目标异常信息存储区域,以便控制模块后续可以基于第一异常信息中的异常模块标识和异常类型,从该目标异常信息存储区域中读取第二异常信息,无需异常模块基于请求进行信息上报,避免因传输较大信息量的第二异常信息造成的延迟(尤其是在复杂异常场景下),进一步提高了异常恢复的速度。
对于部分异常而言,控制模块基于异常的第一异常信息,即可确定一部分异常相关模块所需执行的异常恢复处理操作,而另一部分异常相关模块所需执行的异常恢复处理操作则需要基于详细的第二异常信息才能够确定。因此为了进一步提高异常恢复的速度,在一种可能的实施方式中,接收到第一异常信息之后,控制模块首先基于第一异常信息和异常处理策略,驱动第三模块(与异常关联的模块)执行异常恢复处理操作(即提前进行异常恢复处理);并行的,控制模块基于第一异常信息获取第二异常信息,从而基于第二异常信息进一步驱动第一模块进行异常恢复处理。
可选的,驱动第三模块进行异常恢复处理时,控制模块基于第一异常信息和异常处理策略,确定第三模块以及各个第三模块执行的异常恢复处理操作,从而驱动各个第三模块执行异常恢复处理操作。其中,确定进行异常恢复处理的模块以及各个模块所执行异常恢复处理操作的过程可以参考上述实施例,本实施例在此不再赘述。
在一个示意性的例子中,如图11所示,异常模块在发生异常时向控制模块上报第一异常信息,控制模块基于第一异常信息,首先驱动模块A进行重启操作,并同步向异常模块发送异常询问消息,获取异常模块上报的第二异常信息。进一步的,驱动模块基于第二异常信息,驱动异常模块、重启后的模块A以及模块B进行异常恢复处理。通过提前介入进行异常恢复处理,使模块A的重启操作提前执行,有助于加快异常恢复的速度。
由于并非所有异常均能够通过异常恢复处理来解决,因此控制设备驱动第一模块进行异常恢复处理时,首先基于第二异常信息确定当前异常是否支持异常恢复处理。若支持异常恢复处理,则基于第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,若不支持异常恢复处理,则将操作系统切换为旁路(bypass)模式,使异常模块发生的异常能够被绕过。
在一些实施例中,控制模块存储有异常参数与异常恢复处理支持情况之间的对应关系,获取到第二异常信息后,控制模块即基于第二异常信息中的异常参数,从该对应关系中确定当前异常是否支持异常恢复处理。
可选的,旁路模式下,控制模块可以通过传统的异常处理方式对异常进行处理,比如重新上电,并在异常恢复后,重新切换为正常模式。
在一种可能的应用场景下,终端中设置有协处理器以及应用处理器(Application Processor,AP),该协处理器用于对摄像模组输出的原始图像数据进行预处理,从而将预处理后的图像数据输入AP进行进一步处理。协处理器进行图像处理过程中,温控模块向CameraHAL(即控制模块)上报温度异常,CameraHAL确定该异常无法进行异常恢复处理时,即切换至旁路模式,停止通过协处理器进行图像处理,直接由AP对原始图像数据进行处理。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图12,其示出了本申请一个实施例提供的异常处理装置的结构框图。该装置可以包括:
控制模块1201,用于接收操作系统中异常模块1202上报的第一异常信息;
所述控制模块1201,还用于基于所述第一异常信息获取所述异常模块1202同步的第二异常信息,所述第二异常信息和所述第一异常信息对应同一异常,且所述第二异常信息的信息量大于所述第一异常信息的信息量;
所述控制模块1201,还用于基于所述第二异常信息和异常处理策略,驱动第一模块1203进行异常恢复处理,所述第一模块是与异常关联的模块。
可选的,基于所述第一异常信息获取所述异常模块1202同步的第二异常信息时,所述控制模块1201具体用于:
基于所述第一异常信息向所述异常模块1202发送异常询问消息;
接收所述异常模块1202基于所述异常询问消息上报的所述第二异常信息,所述第二异常信息由所述异常模块在发生异常时收集得到。
可选的,基于所述第一异常信息向所述异常模块1202发送异常询问消息时,所述控制模块1201具体用于:
获取所述第一异常信息中包含的异常类型以及异常模块标识,所述异常模块标识为所述异常模块的标识;
在基于所述异常类型和所述异常模块标识确定出存在异常询问需求的情况下,向所述异常模块1202发送异常询问消息。
可选的,所述控制模块1201,还用于:
在基于所述异常类型和所述异常模块标识确定出不存在异常询问需求的情况下,基于所述第一异常信息和所述异常处理策略,驱动第二模块进行异常恢复处理,所述第二模块是与异常关联的模块。
可选的,基于所述第一异常信息获取所述异常模块1202同步的第二异常信息时,所述控制模块1201,具体用于:
基于所述第一异常信息从异常信息存储区域中读取所述第二异常信息,所述第二异常信息由所述异常模块1202在发生异常时收集并写入所述异常信息存储区域。
可选的,基于所述第一异常信息从异常信息存储区域中读取所述第二异常信息时,所述控制模块1201,具体用于:
获取所述第一异常信息中包含的异常类型以及异常模块标识,所述异常模 块标识为所述异常模块的标识;
基于所述异常类型和所述异常模块标识,确定目标异常信息存储区域,其中,不同异常模块标识和异常类型对应不同异常信息存储区域;
从所述目标异常信息存储区域中读取所述第二异常信息,所述第二异常信息由所述异常模块1202基于所述异常类型和所述异常模块标识写入所述目标异常信息存储区域。
可选的,所述基于所述第二异常信息和异常处理策略,驱动第一模块1203进行异常恢复处理时,所述控制模块1201,具体用于:
基于所述第二异常信息和所述异常处理策略,确定所述第一模块1203以及各个所述第一模块1203执行的异常恢复处理操作;
驱动各个所述第一模块1203执行所述异常恢复处理操作。
可选的,所述控制模块1201,还用于:
基于所述第一异常信息和所述异常处理策略,驱动第三模块进行异常恢复处理,所述第三模块是与异常关联的模块。
可选的,所述基于所述第一异常信息和所述异常处理策略,驱动第三模块进行异常恢复处理时,所述控制模块1201,具体用于:
基于所述第一异常信息和所述异常处理策略,确定所述第三模块以及各个所述第三模块执行的异常恢复处理操作;
驱动各个所述第三模块执行所述异常恢复处理操作。
可选的,基于所述第二异常信息和异常处理策略,驱动第一模块1203进行异常恢复处理时,所述控制模块1201,用于:
在所述第二异常信息指示支持异常恢复处理的情况下,基于所述第二异常信息和所述异常处理策略,驱动所述第一模块1203进行异常恢复处理;
所述控制模块1201,还用于:
在所述第二异常信息指示不支持异常恢复处理的情况下,将所述操作系统切换为旁路模式,所述旁路模式下,所述异常模块1202发生的异常被绕过。
综上所述,本申请实施例中,异常模块通过向控制模块上报所发生异常的第一异常信息,由控制模块基于第一异常信息获取更为详细的第二异常信息,从而基于该第二异常信息和异常处理策略,驱动与异常关联的模块进行异常恢复处理,使操作系统从异常中恢复;采用本申请实施例提供的方案,不同模块之间通过握手机制能够实现异常信息快速同步,提高了异常恢复的及时性;并且,由控制模块基于异常信息进行统一调度,有助于提高异常恢复处理的并行度,进一步加快了异常恢复的速度。
本实施例中,对于严重或复杂异常,控制模块通过下发异常询问消息,指示异常模块进一步上报详细异常信息,以便控制模块基于详细异常信息驱动相关模块进行异常恢复处理,提高异常恢复的成功率。
并且,控制模块在接收到第一异常信息时,进一步基于第一异常信息确定是否需要执行进一步异常问询操作,在无需执行进一步异常问询操作时,直接根据第一异常信息和异常处理策略驱动相关模块进行异常恢复处理,无需进行 异常问询和详细异常信息上报,有助于提高轻微或简单异常的异常恢复速度。
本实施例中,异常模块基于异常类型,将详细的第二异常信息写入目标异常信息存储区域,使控制模块后续可以基于第一异常信息中的异常模块标识和异常类型,从该目标异常信息存储区域中读取第二异常信息,无需异常模块基于请求进行信息上报,避免因传输较大信息量的第二异常信息造成的延迟(尤其是在复杂异常场景下),进一步提高了异常恢复的速度。
需要说明的是:上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如上各个实施例所述的异常处理方法。
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的异常处理方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种异常处理方法,所述方法包括:
    接收操作系统中异常模块上报的第一异常信息;
    基于所述第一异常信息获取所述异常模块同步的第二异常信息,所述第二异常信息和所述第一异常信息对应同一异常,且所述第二异常信息的信息量大于所述第一异常信息的信息量;
    基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,所述第一模块是与异常关联的模块。
  2. 根据权利要求1所述的方法,其中,所述基于所述第一异常信息获取所述异常模块同步的第二异常信息,包括:
    基于所述第一异常信息向所述异常模块发送异常询问消息;
    接收所述异常模块基于所述异常询问消息上报的所述第二异常信息,所述第二异常信息由所述异常模块在发生异常时收集得到。
  3. 根据权利要求2所述的方法,其中,所述基于所述第一异常信息向所述异常模块发送异常询问消息,包括:
    获取所述第一异常信息中包含的异常类型以及异常模块标识,所述异常模块标识为所述异常模块的标识;
    在基于所述异常类型和所述异常模块标识确定出存在异常询问需求的情况下,向所述异常模块发送异常询问消息。
  4. 根据权利要求3所述的方法,其中,所述获取所述第一异常信息中包含的异常类型以及异常模块标识之后,所述方法还包括:
    在基于所述异常类型和所述异常模块标识确定出不存在异常询问需求的情况下,基于所述第一异常信息和所述异常处理策略,驱动第二模块进行异常恢复处理,所述第二模块是与异常关联的模块。
  5. 根据权利要求1所述的方法,其中,所述基于所述第一异常信息获取所述异常模块同步的第二异常信息,包括:
    基于所述第一异常信息从异常信息存储区域中读取所述第二异常信息,所述第二异常信息由所述异常模块在发生异常时收集并写入所述异常信息存储区域。
  6. 根据权利要求5所述的方法,其中,所述基于所述第一异常信息从异常信息存储区域中读取所述第二异常信息,包括:
    获取所述第一异常信息中包含的异常类型以及异常模块标识,所述异常模块标识为所述异常模块的标识;
    基于所述异常类型和所述异常模块标识,确定目标异常信息存储区域,其中,不同异常模块标识和异常类型对应不同异常信息存储区域;
    从所述目标异常信息存储区域中读取所述第二异常信息,所述第二异常信息由所述异常模块基于所述异常类型和所述异常模块标识写入所述目标异常信 息存储区域。
  7. 根据权利要求1至6任一所述的方法,其中,所述基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,包括:
    基于所述第二异常信息和所述异常处理策略,确定所述第一模块以及各个所述第一模块执行的异常恢复处理操作;
    驱动各个所述第一模块执行所述异常恢复处理操作。
  8. 根据权利要求1至6任一所述的方法,其中,所述接收操作系统中异常模块上报的第一异常信息之后,所述方法还包括:
    基于所述第一异常信息和所述异常处理策略,驱动第三模块进行异常恢复处理,所述第三模块是与异常关联的模块。
  9. 根据权利要求8所述的方法,其中,所述基于所述第一异常信息和所述异常处理策略,驱动第三模块进行异常恢复处理,包括:
    基于所述第一异常信息和所述异常处理策略,确定所述第三模块以及各个所述第三模块执行的异常恢复处理操作;
    驱动各个所述第三模块执行所述异常恢复处理操作。
  10. 根据权利要求1至6任一所述的方法,其中,所述基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,包括:
    在所述第二异常信息指示支持异常恢复处理的情况下,基于所述第二异常信息和所述异常处理策略,驱动所述第一模块进行异常恢复处理;
    所述方法还包括:
    在所述第二异常信息指示不支持异常恢复处理的情况下,将所述操作系统切换为旁路模式,所述旁路模式下,所述异常模块发生的异常被绕过。
  11. 一种异常处理装置,所述装置包括:
    控制模块,用于接收操作系统中异常模块上报的第一异常信息;
    所述控制模块,还用于基于所述第一异常信息获取所述异常模块同步的第二异常信息,所述第二异常信息和所述第一异常信息对应同一异常,且所述第二异常信息的信息量大于所述第一异常信息的信息量;
    所述控制模块,还用于基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理,所述第一模块是与异常关联的模块。
  12. 根据权利要求11所述的装置,其中,基于所述第一异常信息获取所述异常模块同步的第二异常信息时,所述控制模块具体用于:
    基于所述第一异常信息向所述异常模块发送异常询问消息;
    接收所述异常模块基于所述异常询问消息上报的所述第二异常信息,所述第二异常信息由所述异常模块在发生异常时收集得到。
  13. 根据权利要求12所述的装置,其中,基于所述第一异常信息向所述异常模块发送异常询问消息时,所述控制模块具体用于:
    获取所述第一异常信息中包含的异常类型以及异常模块标识,所述异常模块标识为所述异常模块的标识;
    在基于所述异常类型和所述异常模块标识确定出存在异常询问需求的情况 下,向所述异常模块发送异常询问消息。
  14. 根据权利要求13所述的装置,其中,所述控制模块,还用于:
    在基于所述异常类型和所述异常模块标识确定出不存在异常询问需求的情况下,基于所述第一异常信息和所述异常处理策略,驱动第二模块进行异常恢复处理,所述第二模块是与异常关联的模块。
  15. 根据权利要求11所述的装置,其中,基于所述第一异常信息获取所述异常模块同步的第二异常信息时,所述控制模块具体用于:
    基于所述第一异常信息从异常信息存储区域中读取所述第二异常信息,所述第二异常信息由所述异常模块在发生异常时收集并写入所述异常信息存储区域。
  16. 根据权利要求15所述的装置,其中,基于所述第一异常信息从异常信息存储区域中读取所述第二异常信息时,所述控制模块,具体用于:
    获取所述第一异常信息中包含的异常类型以及异常模块标识,所述异常模块标识为所述异常模块的标识;
    基于所述异常类型和所述异常模块标识,确定目标异常信息存储区域,其中,不同异常模块标识和异常类型对应不同异常信息存储区域;
    从所述目标异常信息存储区域中读取所述第二异常信息,所述第二异常信息由所述异常模块基于所述异常类型和所述异常模块标识写入所述目标异常信息存储区域。
  17. 根据权利要求11至16任一所述的装置,其中,所述基于所述第二异常信息和异常处理策略,驱动第一模块进行异常恢复处理时,所述控制模块,具体用于:
    基于所述第二异常信息和所述异常处理策略,确定所述第一模块以及各个所述第一模块执行的异常恢复处理操作;
    驱动各个所述第一模块执行所述异常恢复处理操作。
  18. 一种计算机设备,所述计算机设备包括:处理器和存储器;所述存储器存储有至少一段程序,所述至少一段程序用于被所述处理器执行以实现如权利要求1至10任一所述的异常处理方法。
  19. 一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如权利要求1至10任一所述的异常处理方法。
  20. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述计算机设备的处理器执行如权利要求1至10任一所述的异常处理方法。
PCT/CN2022/098325 2021-07-29 2022-06-13 异常处理方法、装置、计算机设备及存储介质 Ceased WO2023005459A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110866592.5 2021-07-29
CN202110866592.5A CN115686894A (zh) 2021-07-29 2021-07-29 异常处理方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023005459A1 true WO2023005459A1 (zh) 2023-02-02

Family

ID=85058538

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/098325 Ceased WO2023005459A1 (zh) 2021-07-29 2022-06-13 异常处理方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN115686894A (zh)
WO (1) WO2023005459A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809030A (zh) * 2015-05-19 2015-07-29 上海斐讯数据通信技术有限公司 一种基于Android的异常处理系统及处理方法
CN112069034A (zh) * 2020-09-22 2020-12-11 深圳市欢太科技有限公司 快应用的异常处理方法、装置、电子设备以及存储介质
CN112114994A (zh) * 2020-09-28 2020-12-22 平安普惠企业管理有限公司 异常处理方法、装置、设备及介质
CN112698980A (zh) * 2021-01-05 2021-04-23 网宿科技股份有限公司 异常处理方法、电子设备、存储介质
CN113079151A (zh) * 2021-03-26 2021-07-06 深信服科技股份有限公司 一种异常处理方法、装置、电子设备及可读存储介质
US20210224383A1 (en) * 2018-06-28 2021-07-22 Nec Corporation Abnormality detection device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809030A (zh) * 2015-05-19 2015-07-29 上海斐讯数据通信技术有限公司 一种基于Android的异常处理系统及处理方法
US20210224383A1 (en) * 2018-06-28 2021-07-22 Nec Corporation Abnormality detection device
CN112069034A (zh) * 2020-09-22 2020-12-11 深圳市欢太科技有限公司 快应用的异常处理方法、装置、电子设备以及存储介质
CN112114994A (zh) * 2020-09-28 2020-12-22 平安普惠企业管理有限公司 异常处理方法、装置、设备及介质
CN112698980A (zh) * 2021-01-05 2021-04-23 网宿科技股份有限公司 异常处理方法、电子设备、存储介质
CN113079151A (zh) * 2021-03-26 2021-07-06 深信服科技股份有限公司 一种异常处理方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN115686894A (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
CN108491275B (zh) 程序优化方法、装置、终端及存储介质
US11681432B2 (en) Method and terminal for displaying input method virtual keyboard
US11451619B2 (en) App remote control method and related devices
WO2020147665A1 (zh) 文件处理方法、装置、终端及存储介质
US11782756B2 (en) Method and apparatus for scheduling processor core, and storage medium
WO2020038163A1 (zh) 图标的显示方法、装置、终端及存储介质
CN106648496B (zh) 电子设备及用于控制电子设备的显示器的方法
KR20130027499A (ko) 다수의 디바이스의 디스플레이들을 결합하기 위한 방법, 장치 및 컴퓨터 프로그램 제품
CN108496198A (zh) 一种图像处理方法及设备
CN108279966A (zh) 网页截图方法、装置、终端及存储介质
CN107506123A (zh) 调节操作执行方法、装置及终端
WO2015176448A1 (zh) 一种终端智能分屏方法及装置
CN110968395B (zh) 一种在模拟器中处理渲染指令的方法及移动终端
CN112055072A (zh) 云端音频输入方法、装置、云系统、电子设备与存储介质
CN111124668B (zh) 内存释放方法、装置、存储介质及终端
US11314391B2 (en) Navigation bar controlling method and terminal
CN109522131A (zh) 资源配置方法、装置及设备
CN113286349B (zh) 个人热点连接方法、装置、终端及存储介质
CN113419650B (zh) 一种数据移动方法、装置、存储介质及电子设备
CN115756534A (zh) 卡片界面更新方法、装置、电子设备以及存储介质
WO2023005459A1 (zh) 异常处理方法、装置、计算机设备及存储介质
CN117130516B (zh) 一种显示方法及电子设备
CN117061837A (zh) 视频通信方法、装置、电子设备及存储介质
CN115314588B (zh) 背景同步方法、装置、终端、设备、系统及存储介质
EP4647917A1 (en) Animation effect display method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22848068

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22848068

Country of ref document: EP

Kind code of ref document: A1