Abnormality recovery method and apparatus, and electronic device
By monitoring the running status of the image processing chip on the main control chip and performing self-recovery operations, the problem of application crash caused by abnormal image processing chip is solved, and the user experience and application stability are improved.
Patent Information
- Application Number
- PCT/CN2024/119919
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-27
- Filing Date
- 2024-09-20
- Publication Date
- 2025-04-03
AI Technical Summary
When an abnormality occurs in the image processing chip, applications that use the image processing chip for processing are prone to crashes, resulting in poor user experience.
By monitoring the running status of the image processing chip on the main control chip and performing recovery operations when an abnormality is detected, avoiding flashbacks when the application depends on the image processing chip.
It effectively avoids the application crash when the image processing chip is abnormal, improves the user experience, and ensures that the application's functions continue to operate normally.
Smart Images

Figure CN2024119919_03042025_PF_FP_ABST
Abstract
Description
Abnormal recovery method, device and electronic equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202311271885.4 filed in China on September 27, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of communication technology, and specifically relates to an abnormality recovery method, device and electronic equipment. Background Art
[0004] With the development of electronic technology, more and more users are using electronic devices to capture videos and photos. At the same time, as user demands increase, the demand for electronic devices' image processing capabilities is increasing. Related technologies improve electronic devices' image processing capabilities by adding external image processing chips. However, when an image processing chip experiences an anomaly, applications that use it for processing may crash, resulting in a poor user experience.
[0005] Summary of the Invention
[0006] The purpose of the embodiments of the present application is to provide an abnormality recovery method, device and electronic device that can solve the problem of flash back of applications processed by an image processing chip.
[0007] In a first aspect, an embodiment of the present application provides an abnormality recovery method, which is applied to a main control chip connected to an image processing chip. The method includes:
[0008] monitoring the operating state of the image processing chip when the first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing;
[0009] When it is detected that the operating state of the image processing chip is abnormal, a recovery operation is performed on the image processing chip.
[0010] In a second aspect, an embodiment of the present application provides an abnormality recovery device, which is applied to a main control chip connected to an image processing chip, and includes:
[0011] a monitoring module, configured to monitor the operating status of the image processing chip when a first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing;
[0012] The recovery module is used to perform a recovery operation on the image processing chip when it is detected that the operating state of the image processing chip is abnormal.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0016] In an embodiment of the present application, when a first application is in a first mode, the operating status of the image processing chip is monitored. In this first mode, the first application uses the image processing chip for processing. If an abnormal operating status of the image processing chip is detected, a recovery operation is performed on the image processing chip. In this way, by monitoring the operating status of the image processing chip and performing a self-recovery operation when the operating status is abnormal, it is possible to avoid crashes in applications that use the image processing chip for processing when an abnormality occurs, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] FIG1 is a flowchart of an abnormality recovery method provided in an embodiment of the present application;
[0018] FIG2 is a schematic diagram of a structure of an electronic device provided in an embodiment of the present application;
[0019] FIG3 is a second flowchart of an abnormality recovery method provided in an embodiment of the present application;
[0020] FIG4 is a schematic structural diagram of an abnormality recovery device provided in an embodiment of the present application;
[0021] FIG5 is a second structural diagram of an electronic device provided in an embodiment of the present application;
[0022] FIG6 is a third structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0024] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0025] The following describes in detail the abnormality recovery method, device, and electronic device provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0026] An embodiment of the present application provides an abnormality recovery method, which can be applied to a main control chip in an electronic device, where the main control chip is connected to an image processing chip.
[0027] Referring to FIG1 , FIG1 is a flow chart of an abnormality recovery method provided in an embodiment of the present application. The method is applied to a main control chip, as shown in FIG1 , and includes the following steps:
[0028] Step 101: When a first application is in a first mode, monitor the running state of the image processing chip. In the first mode, the first application uses the image processing chip for processing.
[0029] The image processing chip may be an external chip, and the image processing chip is independently provided from the main control chip.
[0030] Among them, in the first mode, the first application uses the image processing chip for processing, which can be understood as, in the first mode, the operation of the first application depends on the image processing chip. Taking the first application as a camera application as an example, in the first mode, the camera application relies on the image processing chip to process the captured image, that is, the main control chip will transmit the data of the camera application to the image processing chip for processing during the operation of the camera application; taking the first application as a video application as an example, in the first mode, the video application relies on the image processing chip to process or display the video, that is, the main control chip will transmit the data of the video application to the image processing chip for processing during the operation of the video application; taking the first application as a game application as an example, in the first mode, the game application relies on the image processing chip to process or display the game interface, that is, the main control chip will transmit the data of the game application to the image processing chip for processing during the operation of the game application; and so on.
[0031] In addition, when the first application is in the first mode, monitoring the operating status of the image processing chip may include: when it is monitored that the image processing chip is successfully powered on and initialized, starting a listening thread in the first mode; monitoring the operating status of the image processing chip based on the listening thread; or may include: starting a listening thread in the first mode; monitoring the operating status of the image processing chip based on the listening thread.
[0032] Optionally, when the first application is in the first mode, before monitoring the operating state of the image processing chip, the method further includes:
[0033] Triggering the image processing chip to perform power-on processing and initialization processing;
[0034] When it is detected that the image processing chip fails to power on or initialize, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
[0035] Among them, in the second mode, the first application does not use the image processing chip for processing. It can be understood that in the second mode, the operation of the first application does not rely on the image processing chip, but may rely on the main control chip for processing. Taking the first application as a camera application as an example, in the second mode, the camera application does not rely on the image processing chip to process the captured image, that is, the main control chip will not transmit the camera application's data to the image processing chip for processing; taking the first application as a video application as an example, in the second mode, the video application does not rely on the image processing chip to process or display the video, that is, the main control chip will not transmit the video application's data to the image processing chip for processing; taking the first application as a game application as an example, in the second mode, the game application does not rely on the image processing chip to process or display the game interface, that is, the main control chip will not transmit the game application's data to the image processing chip for processing; and so on.
[0036] In addition, switching the first application from the first mode to the second mode can be understood as switching the running state of the first application, so that the running of the first application is switched from a state dependent on the image processing chip to a state not dependent on the image processing chip.
[0037] In this embodiment, the image processing chip is triggered to perform power-on processing and initialization processing. When it is detected that the image processing chip fails to power on or initialize, the first application is switched from the first mode to the second mode. In this way, when the image processing chip fails to power on or initialize, the first application exits the second mode that depends on the image processing chip, so that the functions of the application can continue to operate normally without being affected by the abnormality of the image processing chip, which can further improve the user experience.
[0038] Optionally, before triggering the image processing chip to perform power-on processing and initialization processing, the method further includes:
[0039] launching the first application based on a first input from a user;
[0040] The triggering of the image processing chip to perform power-on processing and initialization processing includes:
[0041] When it is determined that the first mode has been entered, the image processing chip is triggered to perform power-on processing and initialization processing.
[0042] The first input is used to start the first application. For example, the first input may be an operation of a user clicking an icon of the first application. The main control chip may start the first application when the touch panel receives the first input from the user.
[0043] Alternatively, after launching the first application, the first mode may be entered by default, i.e., the operation of the first application may be assumed to be dependent on the image processing chip. Alternatively, after launching the first application, the method may further include: receiving a second input, the second input being used to confirm entry into the first mode. After launching the first application, a confirmation message may be displayed on the interface of the first application, the confirmation message being used to determine whether to enter the first mode, and the second input may be an operation on the confirmation message.
[0044] In this embodiment, the first application is launched based on a first input from a user; if it is determined that the first mode has been entered, the image processing chip is triggered to power on and initialize; if it is detected that the image processing chip has failed to power on or initialize, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing. In this way, when the first application enters the first mode in which it relies on the image processing chip, the image processing chip is powered on and initialized, thereby reducing the power consumption of the image processing chip.
[0045] Optionally, when the first application is in the first mode, monitoring the operating state of the image processing chip includes:
[0046] When monitoring that the image processing chip is successfully powered on and initialized, starting a monitoring thread in the first mode;
[0047] The operating status of the image processing chip is monitored based on the listening thread.
[0048] Among them, the listening thread can be a status listening thread. Taking the first application as a camera application as an example, the camera processing module in the main control chip can call the status listening thread in the image processing chip driver module in the main control chip to monitor the operating status of the image processing chip; taking the first application as a video application or a game application as an example, the display processing module in the main control chip can call the status listening thread in the image processing chip driver module in the main control chip to monitor the operating status of the image processing chip. The camera processing module is used to drive the image sensor, the display processing module is used to drive the display processing unit (DPU), and the image processing chip driver module is used to drive the image processing chip.
[0049] In this embodiment, upon detecting that the image processing chip has successfully powered on and initialized, a monitoring thread is started in the first mode; the operating status of the image processing chip is monitored based on the monitoring thread. Thus, upon determining that the image processing chip has successfully powered on and initialized, the monitoring thread is used to monitor the operating status of the image processing chip. This eliminates the possibility of an image processing chip power-on or initialization failure, and allows recovery from the abnormality detected by the monitoring of the image processing chip using a strategy appropriate to the abnormal status.
[0050] Step 102: When it is detected that the operating state of the image processing chip is abnormal, a recovery operation is performed on the image processing chip.
[0051] The abnormal operation state of the image processing chip may include abnormal operation of the image processing chip software or abnormal operation of the image processing chip hardware. The recovery operation of the image processing chip when the abnormal operation state of the image processing chip is detected may include: determining the abnormal state of the image processing chip when the abnormal operation state of the image processing chip is detected, and when it is determined that the image processing chip is in a first abnormal state, recovering the image processing chip using a preset recovery strategy; or may include: determining the abnormal state of the image processing chip when the abnormal operation state of the image processing chip is detected, and when it is determined that the image processing chip is in a second abnormal state, switching the first application from the first mode to the second mode, wherein in the second mode, the first application does not use the image processing chip for processing; or may include: recovering the image processing chip when the abnormal operation state of the image processing chip is detected, and when it is determined that the image processing chip is in a second abnormal state; etc. This embodiment does not limit this.
[0052] Optionally, when the operating state of the image processing chip is detected to be abnormal, performing a recovery operation on the image processing chip includes:
[0053] When the operating state of the image processing chip is detected to be abnormal, determining the abnormal state of the image processing chip;
[0054] When it is determined that the image processing chip is in a first abnormal state, a preset recovery strategy is used to perform recovery processing on the image processing chip;
[0055] When it is determined that the image processing chip is in a second abnormal state, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
[0056] The abnormal state of the image processing chip can be determined by monitoring the operating state of the image processing chip. The first abnormal state may refer to abnormal operation of the image processing chip software. It should be noted that when the image processing chip software is abnormal, the main control chip can monitor the abnormal operation of the software through a monitoring thread. For example, when the image processing chip software is abnormal, a first interrupt signal is generated. The main control chip can determine that the image processing chip software is abnormal when monitoring the first interrupt signal.
[0057] In addition, the preset recovery strategy may include restarting the image processing chip, or reinitializing the image processing chip, etc. This embodiment does not limit the preset recovery strategy.
[0058] Alternatively, the second abnormal state may refer to a hardware abnormality of the image processing chip. It should be noted that when the image processing chip hardware is abnormal, the main control chip can detect the hardware abnormality through the monitoring thread. For example, when the image processing chip hardware is abnormal, a second interrupt signal is generated. Upon monitoring the second interrupt signal, the main control chip can determine that the image processing chip hardware is abnormal.
[0059] It should be noted that when it is monitored that the operating status of the image processing chip is abnormal, and it is determined that the image processing chip is neither in the first abnormal state nor in the second abnormal state, for example, the abnormality of the image processing chip cannot be identified, the first application can be switched from the first mode to the second mode, wherein, in the second mode, the first application does not use the image processing chip for processing.
[0060] In this embodiment, if the image processing chip is determined to be in a first abnormal state, a preset recovery strategy is used to restore the image processing chip. If the image processing chip is determined to be in a second abnormal state, the first application is switched from the first mode to the second mode, wherein in the second mode, the first application does not use the image processing chip for processing. In this way, by identifying the abnormal state of the image processing chip and using a strategy corresponding to the abnormal state for abnormality handling, the application's functions can continue to operate normally without being affected by the abnormal state of the image processing chip, further improving the user experience.
[0061] In one embodiment, when the image processing chip is detected to be operating abnormally, performing a recovery operation on the image processing chip includes: when the image processing chip is detected to be operating abnormally, using a preset recovery strategy to recover the image processing chip; and when it is determined that the image processing chip has not recovered successfully, switching the first application from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing. The preset recovery strategy may include restarting the image processing chip or reinitializing the image processing chip; etc. This embodiment does not limit the preset recovery strategy.
[0062] In an embodiment of the present application, when a first application is in a first mode, the operating status of the image processing chip is monitored. In this first mode, the first application uses the image processing chip for processing. If an abnormal operating status of the image processing chip is detected, a recovery operation is performed on the image processing chip. In this way, by monitoring the operating status of the image processing chip and performing a self-recovery operation when the operating status is abnormal, it is possible to avoid crashes in applications that use the image processing chip for processing when an abnormality occurs, thereby improving the user experience.
[0063] Currently, with the development of chip technology, more and more mobile phone manufacturers have begun to independently design and manufacture their own chips, such as plug-in chips. These plug-in chips are combined with the main control chip of the mobile phone to achieve stronger image processing, video processing, and game processing capabilities, thereby improving user experience and product competitiveness. With the increasing number of use cases for plug-in chips, if the hardware or software status of the plug-in chip is abnormal, it will cause the application function in that scenario to freeze or even crash, seriously affecting the user experience.
[0064] The embodiment of the present application provides an automatic recovery solution after an exception occurs during the initialization or operation of an external chip (i.e., an external image processing chip). By monitoring the operating status of the external chip in real time during the operation of the application, the abnormal recovery solution is started when an abnormality occurs during the initialization or operation of the external chip to ensure that the functions of the application can continue to operate normally without being affected by the external chip. The embodiment of the present application adds a real-time monitoring mechanism for the external chip status, and promptly notifies the upper module to perform abnormal processing when the external chip status is abnormal; the embodiment of the present application adds an intelligent recognition mechanism for the external chip status, which can dynamically identify whether the abnormal state of the external chip can be restored; the embodiment of the present application adds a self-recovery mechanism for the external chip in the camera processing module / display processing module. If it is identified that the abnormal state of the external chip is recoverable, the external chip hardware is restarted to quickly restore the normal operating state of the external chip; the embodiment of the present application adds a self-recovery mechanism in the application. If it is identified that the external chip status is not recoverable, the current external chip mode is turned off and switched to the non-external chip mode.
[0065] As a specific embodiment, by automatically recovering the external chip (i.e., the external image processing chip) when it runs abnormally, the system is actively restored when the external chip fails to initialize or runs abnormally to avoid problems such as software abnormal flashbacks. In this embodiment, the abnormal recovery method can be applied to an electronic device, the framework of which is shown in Figure 2. The electronic device includes a main control chip, an image sensor, and an external chip, which can be an image processing chip. The main control chip includes an abnormal recovery device and a display processing unit (DPU).
[0066] Among them, the abnormality recovery device includes: a display processing module, a camera processing module and an external chip driving module.
[0067] Among them, the display processing module is used to control the hardware function implementation of the display processing unit (DPU). Specifically, the display processing module sends the image sent by the application software to the screen for display; and / or, the display processing module controls the function implementation of the external chip by calling the external chip driver module; and / or, the display processing module sends the image sent by the camera processing module to the external chip for processing through the Mobile Industry Processor Interface (MIPI) Display Serial Interface (DSI) interface.
[0068] The camera processing module is used to control the hardware functions of the image signal processor (ISP) and image sensor. Specifically, the camera processing module receives images from the image sensor and sends them to the ISP for image processing; and / or the camera processing module controls the functions of the external chip by calling the external chip driver module.
[0069] Among them, the external chip driver module is used to control the hardware function implementation of the external chip and is responsible for real-time monitoring of the external chip's operating status.
[0070] As shown in FIG3 , the abnormality recovery method of this embodiment includes the following process:
[0071] Step 101: A user opens a first application and enters an integrated circuit (IC) recording / video / game mode;
[0072] The first application is a camera / video / game application, and the IC video / video / game mode refers to the camera / video / game application using an external chip to process images. Taking the IC video mode as an example, the IC video mode refers to the use of an external chip to process captured images when the camera application is running.
[0073] Step 102: The camera processing module / display processing module notifies the external chip to power on and initialize.
[0074] It should be noted that the camera processing module / display processing module refers to different processing modules for different applications. For camera applications, the camera processing module calls the external chip driver module to control the external chip's functionality. For video applications and game applications, the display processing module calls the external chip driver module to control the external chip's functionality. If the first application in step 101 is a camera application, the camera processing module / display processing module in subsequent steps refers to the camera processing module. If the first application in step 101 is a video application or a game application, the camera processing module / display processing module in subsequent steps refers to the display processing module.
[0075] Step 103: The external chip is powered on and initialized successfully, and the application enters the IC camera / video / game mode.
[0076] Step 104: The camera processing module / display processing module starts the external chip status monitoring thread to monitor the operating status of the external chip in real time.
[0077] After starting the external chip, the camera processing module / display processing module calls the status monitoring thread in the external chip driver module to monitor the operating status of the external chip in real time.
[0078] Step 105: If the external chip is operating normally, the first application maintains the current operating logic until the user actively exits the first application.
[0079] Step 106: If the external chip is operating abnormally, the monitoring thread reports the abnormal status to the camera processing module / display processing module;
[0080] Among them, when the monitoring thread detects that the external chip is running abnormally, it needs to report the abnormal status to the camera processing module / display processing module for subsequent abnormal processing.
[0081] Step 107: The camera processing module / display processing module determines whether the abnormal state of the external chip can be restored;
[0082] If it is determined that the abnormal state of the current plug-in chip is relatively minor, the normal state can be restored by restarting the plug-in chip, and step 108 is executed;
[0083] If it is determined that the current abnormal state of the external chip is serious and the external chip system is frozen and cannot respond normally, step 109 is executed.
[0084] Step 108: The external chip status can be restored, and the camera processing module / display processing module restarts the external chip and reinitializes the external chip;
[0085] The camera processing module / display processing module restarts the external chip and initializes it, and then jumps to step 105 .
[0086] Step 109 : The external chip status cannot be restored, and the camera processing module / display processing module reports the abnormal status of the external chip to the first application program, and then executes step 112 .
[0087] Step 110: If the external chip fails to power on or initialize, the chip status is reported to the camera processing module / display processing module.
[0088] Step 111: The camera processing module / display processing module notifies the first application program that the plug-in chip fails to start.
[0089] Step 112: The first application exits the IC camera / video / game mode and enters the non-IC camera / video / game mode until the user actively exits the first application.
[0090] Among them, the non-IC recording / video / game mode means that the camera / video / game application does not use an external chip to process the image. Taking the non-IC recording mode as an example, the non-IC recording mode means that when the camera application is running, no external chip is used to process the captured image.
[0091] 4 , which is a schematic diagram of the structure of an abnormality recovery device provided in an embodiment of the present application, wherein the device 200 includes:
[0092] A monitoring module 201 is configured to monitor the operating status of the image processing chip when a first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing;
[0093] The recovery module 202 is configured to recover the image processing chip when detecting that the image processing chip is in an abnormal operating state.
[0094] Optionally, the recovery operation is specifically used to:
[0095] When the operating state of the image processing chip is detected to be abnormal, determining the abnormal state of the image processing chip;
[0096] When it is determined that the image processing chip is in a first abnormal state, a preset recovery strategy is used to perform recovery processing on the image processing chip;
[0097] When it is determined that the image processing chip is in a second abnormal state, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
[0098] Optionally, the device further comprises:
[0099] A processing module, used for triggering the image processing chip to perform power-on processing and initialization processing;
[0100] A switching module is used to switch the first application from the first mode to the second mode when it is detected that the image processing chip fails to power on or initialize, wherein in the second mode, the first application does not use the image processing chip for processing.
[0101] Optionally, the device further comprises:
[0102] A starting module, configured to start the first application based on a first input from a user;
[0103] The processing module is specifically used for:
[0104] When it is determined that the first mode has been entered, the image processing chip is triggered to perform power-on processing and initialization processing.
[0105] Optionally, the monitoring module is specifically configured to:
[0106] When monitoring that the image processing chip is successfully powered on and initialized, starting a monitoring thread in the first mode;
[0107] The operating status of the image processing chip is monitored based on the listening thread.
[0108] In an embodiment of the present application, the monitoring module monitors the operating status of the image processing chip when a first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing; and the recovery module performs a recovery operation on the image processing chip when an abnormal operating status of the image processing chip is detected. In this way, by monitoring the operating status of the image processing chip and performing a self-recovery operation when its operating status is abnormal, it is possible to avoid the application program that uses the image processing chip for processing from crashing when an abnormality occurs in the image processing chip, thereby improving the user experience.
[0109] The abnormality recovery device in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiments of the present application do not specifically limit this.
[0110] The abnormality recovery device in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0111] The abnormality recovery device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 1. To avoid repetition, it will not be described here.
[0112] Optionally, as shown in Figure 5, an embodiment of the present application also provides an electronic device 300, including a processor 301, a memory 302, and a program or instruction stored in the memory 302 and executable on the processor 301. When the program or instruction is executed by the processor 301, each process of the above-mentioned abnormal recovery method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0113] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0114] FIG6 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0115] The electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410 and an image processing chip 411, wherein the processor is a main control chip.
[0116] Those skilled in the art will appreciate that the electronic device 400 may further include a power source (e.g., a battery) to power various components. The power source may be logically connected to the processor 410 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG6 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components or arrange the components differently, which will not be described in detail here.
[0117] The processor 410 is configured to:
[0118] monitoring the operating state of the image processing chip when the first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing;
[0119] When it is detected that the operating state of the image processing chip is abnormal, a recovery operation is performed on the image processing chip.
[0120] Optionally, the processor 410 is configured to perform, when detecting that the operating state of the image processing chip is abnormal, a recovery operation on the image processing chip, including:
[0121] When the operating state of the image processing chip is detected to be abnormal, determining the abnormal state of the image processing chip;
[0122] When it is determined that the image processing chip is in a first abnormal state, a preset recovery strategy is used to perform recovery processing on the image processing chip;
[0123] When it is determined that the image processing chip is in a second abnormal state, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
[0124] Optionally, the processor 410 is further configured to:
[0125] Triggering the image processing chip to perform power-on processing and initialization processing;
[0126] When it is detected that the image processing chip fails to power on or initialize, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
[0127] Optionally, the processor 410 is further configured to:
[0128] launching the first application based on a first input from a user;
[0129] The triggering of the image processing chip to perform power-on processing and initialization processing includes:
[0130] When it is determined that the first mode has been entered, the image processing chip is triggered to perform power-on processing and initialization processing.
[0131] Optionally, the processor 410 is configured to monitor the operating state of the image processing chip when the first application is in the first mode, including:
[0132] When monitoring that the image processing chip is successfully powered on and initialized, starting a monitoring thread in the first mode;
[0133] The operating status of the image processing chip is monitored based on the listening thread.
[0134] In an embodiment of the present application, the processor 410 monitors the operating status of the image processing chip when the first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing; and upon detecting an abnormal operating status of the image processing chip, the processor 410 performs a recovery operation on the image processing chip. In this way, by monitoring the operating status of the image processing chip and performing a self-recovery operation when the operating status is abnormal, it is possible to avoid crashes in applications that use the image processing chip for processing when an abnormality occurs in the image processing chip, thereby improving the user experience.
[0135] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The graphics processor 4041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here. The memory 409 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.
[0136] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned abnormal recovery method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0137] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.
[0138] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned abnormal recovery method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0139] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0140] An embodiment of the present application further provides a computer program / computer program product, which is stored in a storage medium. The computer program / computer program product is executed by at least one processor to implement the various processes of the above-mentioned abnormal recovery method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0141] An embodiment of the present application further provides an abnormal recovery device / equipment, including the device / equipment (configured to) be used to execute the various processes of the above-mentioned abnormal recovery method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0142] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0144] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. An abnormality recovery method, applied to a main control chip, the main control chip is connected to an image processing chip, the method comprising: monitoring the operating state of the image processing chip when the first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing; When it is detected that the operating state of the image processing chip is abnormal, a recovery operation is performed on the image processing chip.
2. The method according to claim 1, wherein: When the image processing chip is detected to be in an abnormal operating state, the image processing chip is restored, including: In the case where it is detected that the operating state of the image processing chip is abnormal, determining the abnormal state of the image processing chip; When it is determined that the image processing chip is in a first abnormal state, a preset recovery strategy is used to perform recovery processing on the image processing chip; When it is determined that the image processing chip is in a second abnormal state, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
3. The method according to claim 1, wherein: Before monitoring the running state of the image processing chip when the first application is in the first mode, the method further includes: Triggering the image processing chip to perform power-on processing and initialization processing; When it is detected that the image processing chip fails to power on or initialize, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
4. The method according to claim 3, wherein: Before triggering the image processing chip to perform power-on processing and initialization processing, the method further includes: launching the first application based on a first input from a user; The triggering the image processing chip to perform power-on processing and initialization processing includes: When it is determined to enter the first mode, the image processing chip is triggered to perform power-on processing and initialization processing.
5. The method according to claim 3, wherein: When the first application is in the first mode, monitoring the operating state of the image processing chip includes: When it is detected that the image processing chip is powered on and initialized successfully, starting a monitoring thread in the first mode; The operating status of the image processing chip is monitored based on the listening thread.
6. An abnormality recovery device, applied to a main control chip, the main control chip is connected to an image processing chip, the device comprising: a monitoring module, configured to monitor the operating state of the image processing chip when the first application is in a first mode, wherein in the first mode, the first application uses the image processing chip for processing; The recovery module is used to perform recovery operations on the image processing chip when it is detected that the operating state of the image processing chip is abnormal.
7. The device according to claim 6, wherein: The recovery operation is specifically used for: In the case where it is detected that the operating state of the image processing chip is abnormal, determining the abnormal state of the image processing chip; When it is determined that the image processing chip is in a first abnormal state, a preset recovery strategy is used to perform recovery processing on the image processing chip; When it is determined that the image processing chip is in a second abnormal state, the first application is switched from the first mode to a second mode, wherein in the second mode, the first application does not use the image processing chip for processing.
8. The device according to claim 6, wherein: The device also includes: A processing module, used for triggering the image processing chip to perform power-on processing and initialization processing; A switching module is used to switch the first application from the first mode to the second mode when it is detected that the image processing chip fails to power on or initialize, wherein in the second mode, the first application does not use the image processing chip for processing.
9. An electronic device, wherein: It comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the abnormality recovery method as described in any one of claims 1 to 5.
10. A readable storage medium, wherein: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the abnormality recovery method according to any one of claims 1 to 5 are implemented.
11. A chip comprising a processor and a communication interface, wherein: The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the abnormality recovery method according to any one of claims 1 to 5.
12. A computer program product, wherein: The computer program product is stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the steps of the abnormality recovery method according to any one of claims 1 to 5.
13. An abnormal recovery device / equipment, characterized in that: The device / equipment is configured to execute the steps of the abnormality recovery method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Graphic processing method, guest operating system (os) and guest os system
CN105122204A
Image processing chip and exception handling method applied to image processing chip
CN115442586A
Graphics processor module abnormity self-recovery method and device, equipment and storage medium
CN116627725A
Abnormal recovery method and device and electronic equipment
CN117520028A