An electronic device
By employing a software solution involving a status management module and a control module, and utilizing a USB interface to receive external signals for anomaly recovery, the problem of wearable devices relying on high-cost external hardware is solved. This enables convenient anomaly monitoring and handling, improving user experience and product maintainability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2026-03-31
AI Technical Summary
Existing wearable devices rely on high-cost external hardware components for anomaly detection and handling, and their physical pathway design cannot be changed, resulting in the devices' irreplaceability and limitations in use.
The software solution employs a status management module and a control module. By generating and feeding back valid or invalid reset signals, it enables the monitoring and handling of electronic device anomalies. It utilizes a USB interface to receive external signals for anomaly recovery without relying on external devices with specific functions or modifications to physical pathways.
It enables low-cost and convenient anomaly monitoring and handling, improves user experience and product maintainability, and avoids changes to physical paths and dependence on external hardware.
Smart Images

Figure CN114443454B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to an electronic device. Background Technology
[0002] As more and more wearable devices enter the market, they can bring convenience to people's work, life, and entertainment, and are gradually being accepted by the general public.
[0003] Currently, due to factors such as cost, product size, and product design, some wearable devices, such as fitness trackers, are typically designed with non-removable batteries, mostly without physical buttons, and powered on via external charging. These types of products usually employ external hardware to monitor the device's chip, a function known as a "hardware watchdog." During user operation, this external hardware periodically monitors the main chip's performance to detect and resolve potential issues such as display lag or unresponsive screen scrolling.
[0004] However, implementing a "hardware watchdog" function requires additional external hardware devices to support it, which are costly and have limited applicability. Furthermore, implementing this "hardware watchdog" function necessitates designing a physical communication path between the device and its main chip, which cannot be changed once designed, resulting in the device's irreplaceability.
[0005] Therefore, how to effectively and conveniently monitor and handle anomalies in electronic devices remains an urgent problem to be solved. Summary of the Invention
[0006] This application provides an electronic device that facilitates effective and convenient monitoring and handling of anomalies in electronic devices.
[0007] In a first aspect, embodiments of this application provide an electronic device, which may include a control module and a status management module. The status management module is configured to generate a first signal when the software of the electronic device malfunctions, and send the first signal to the control module, wherein the first signal is used to indicate that the software is malfunctioning. The control module is configured to generate a valid reset signal based on the first signal, and send the valid reset signal to the status management module. The status management module is further configured to restart the software based on the valid reset signal.
[0008] This solution allows the state management module in an electronic device to monitor for software anomalies. When an anomaly occurs, the module sends a first signal to the control module. The control module then generates a valid reset signal based on this signal and feeds it back to the state management module. This allows the state management module to restart the software, enabling the device to recover from anomalies. When applied to low-end electronic devices such as wearables, the recovery process no longer relies on external devices with specific functions, nor does it require significant modifications to the internal physical pathways of the electronic device. This provides an effective and convenient way to monitor and handle anomalies in electronic devices.
[0009] In one possible design, the state management module is further configured to generate a second signal when the software is running normally, and send the second signal to the control module, the second signal being used to indicate that the software is running normally; the control module is further configured to generate an invalid reset signal based on the second signal, and send the invalid reset signal to the state management module; the state management module is further configured to not restart the software based on the invalid reset signal.
[0010] This solution allows the state management module to send a second signal to the control module when the software is running normally. The control module can then generate a valid reset signal based on this second signal and send it back to the state management module. Since it is an invalid reset signal, the state management module will not restart the software based on it, thus not affecting the normal operation of the software or electronic devices.
[0011] In one possible design, the electronic device further includes an interface for receiving external signals input from other devices and transmitting the external signals to the control module; the control module, when generating the valid reset signal based on the first signal, is specifically configured to: generate the valid reset signal based on the first signal and the external signal; the control module, when generating the invalid reset signal based on the second signal, is specifically configured to: generate the invalid reset signal based on the second signal and the external signal.
[0012] This solution combines external signals input from other devices to control the generation of valid or invalid reset signals, enabling the monitoring and handling of electronic device anomalies. When an electronic device malfunctions, the user only needs to input external signals through the device's interface to handle the anomaly, without complex application scenario limitations, ensuring a good user experience. For example, the interface can be a Universal Serial Bus (USB) interface. When this solution is applied to electronic devices of different forms or types, the specific implementation of USB can also differ, such as USB Type-A, USB Type-B, USB Type-C, etc., which this application does not limit. Due to the standardization and widespread use of USB interfaces, with the necessary interface for connection, users can input external signals using any suitable other device. The processing method is simple and does not rely on external hardware devices with specific functions, nor does it require significant modifications to the internal physical path design of the electronic device. This allows for low-cost, effective, and convenient anomaly monitoring and handling of electronic devices, ensuring their normal operation.
[0013] In one possible design, the interface is further configured to transmit the external signal to the state management module; the state management module is specifically configured to: generate the first signal when the software malfunctions within a first duration after receiving the external signal; and generate the second signal when the software runs normally within the first duration. In one possible design, the external signal is valid within a second duration, and considering signal transmission delay, the second duration can be shorter than the first duration.
[0014] This solution allows for the pre-configuration of exception handling strategies, including: 1) The interface will not transmit external signals to the state management module and control module when no external signals from other devices are detected, but will transmit the external signals to the state management module and control module when external signals from other devices are detected. 2) The state management module will transmit a first signal to the control module when no external signal is received and the software is running normally; it will transmit a second signal to the control module for a first duration when an external signal is received and the software is running normally; and it will transmit the first signal to the control module for a first duration when an external signal is received and the software is malfunctioning.
[0015] Based on this strategy, the state management module can combine received external signals to control the generation of a first or second signal and transmit it to the control module. When the control module receives an external signal from the interface and the first or second signal from the state management module, it generates a valid or invalid reset signal accordingly through signal control and feeds it back to the state management module. This allows the state management module to monitor and handle anomalies in the electronic device based on the valid or invalid reset signal. Therefore, anomaly recovery in low-end electronic devices no longer relies on external devices with specific functions, nor does it require significant modifications to the internal physical pathways of the electronic device, enabling effective and convenient anomaly monitoring and handling.
[0016] It is understood that in the embodiments of this application, the above-mentioned exception handling strategy can be set according to business needs or the performance or application scenario of the electronic device, and this application does not limit it. In some embodiments, the above-mentioned exception handling strategy can also be based on high and low level modes to implement signal control. The exception handling strategy may include, for example, the following: 1) When the interface does not detect external signals input from other devices, it transmits an external signal in a first state (e.g., a low-level signal) to the state management module and the control module, and when it detects external signals input from other devices, it transmits an external signal in a second state (e.g., a high-level signal) to the state management module and the control module within a set signal period. 2) The state management module does not process the external signal in the first state after receiving it, and within a first time period after receiving the external signal in the second state, it transmits a high-level signal to the control module when the software is running abnormally, and transmits a low-level signal to the control module when the software is running normally. The signal period is less than the first time period, and this application does not limit it.
[0017] In one possible design, the first signal is a high-level signal, and the second signal is a low-level signal; the external signal is a high-level signal; when the control module generates the valid reset signal based on the first signal and the external signal, it is specifically used to: perform NAND processing on the first signal and the external signal to generate the valid reset signal, wherein the valid reset signal is a low-level signal; when the control module generates the invalid reset signal based on the second signal and the external signal, it is specifically used to: perform NAND processing on the second signal and the external signal to generate the invalid reset signal, wherein the invalid reset signal is a high-level signal.
[0018] This solution enables signal control based on high / low level modes. The control module can generate valid or invalid reset signals according to the high / low level signals from the interface and the state management module, and feed them back to the state management module. This allows the state management module to monitor and handle anomalies in the electronic device based on the valid or invalid reset signal. Specifically, through NAND processing, when both the signals transmitted from the interface and the state management module to the control module are high-level signals, the control module generates a valid reset signal, triggering anomaly handling behavior in the electronic device, such as software restart. Signal control allows for simple anomaly handling of the electronic device without relying on external devices with specific functions or requiring significant modifications to the internal physical pathways of the electronic device. This provides effective and convenient anomaly monitoring and handling. Furthermore, this signal control ensures that when a user connects a power source for charging, it does not trigger the anomaly handling process, guaranteeing the normal operation of the electronic device. In one possible design, the control module is a physical device that communicates with the main chip of the electronic device; for example, the control module can be a logic device. It is understood that the logic device may be, for example, a NAND gate or other suitable logic device, and this application does not limit it.
[0019] This solution allows for the design of physical devices that connect to the main chip of electronic devices as control modules, and the implementation of signal control based on these physical devices. This eliminates the need for significant modifications to the internal physical pathways of electronic devices, enabling effective and convenient monitoring and handling of anomalies in electronic devices.
[0020] Secondly, embodiments of this application provide an electronic device, which includes a memory, a processor, and a controller. The memory stores a program. In order to realize abnormal recovery processing of the electronic device, the processor can read the program in the memory and run the software; when the software malfunctions, it generates a first signal and sends the first signal to the controller. The first signal is used to indicate that the software malfunctions; the controller can generate a valid reset signal according to the first signal and send the valid reset signal to the processor; the processor is also used to restart the software according to the valid reset signal.
[0021] In one possible design, the processor is further configured to generate a second signal when the software is running normally, and send the second signal to the controller, the second signal indicating that the software is running normally; the controller is further configured to generate an invalid reset signal based on the second signal, and send the invalid reset signal to the processor; the processor is further configured to not restart the software based on the invalid reset signal.
[0022] In one possible design, the electronic device further includes an interface for receiving external signals input from other devices and transmitting the external signals to the controller; when the controller generates a valid reset signal based on the first signal, it is specifically configured to: generate the valid reset signal based on the first signal and the external signal; when the controller generates an invalid reset signal based on the second signal, it is specifically configured to: generate the invalid reset signal based on the second signal and the external signal.
[0023] In one possible design, the interface is further configured to transmit the external signal to the processor; the processor is specifically configured to: generate the first signal when the software malfunctions within a first duration after receiving the external signal; and generate the second signal when the software malfunctions within the first duration.
[0024] In one possible design, the external signal is a periodic signal, and the signal period of the external signal is less than the first duration.
[0025] In one possible design, the first signal is a high-level signal, and the second signal is a low-level signal; the external signal is a high-level signal; when the controller generates the valid reset signal based on the first signal and the external signal, it is specifically configured to: perform NAND processing on the first signal and the external signal to generate the valid reset signal, wherein the valid reset signal is a low-level signal; when the controller generates the invalid reset signal based on the second signal and the external signal, it is specifically configured to: perform NAND processing on the second signal and the external signal to generate the invalid reset signal, wherein the invalid reset signal is a high-level signal.
[0026] In one possible design, the controller is a physical device that communicates with the main chip of the electronic device.
[0027] Thirdly, embodiments of this application also provide a chip that is applied in the electronic device described in the first or second aspect above.
[0028] Based on the implementations provided in the above aspects, this application can be further combined to provide more implementations. Attached Figure Description
[0029] Figure 1 This application provides an example structural diagram of an electronic device.
[0030] Figure 2A This is an example diagram illustrating the structure of another electronic device provided in an embodiment of this application;
[0031] Figure 2B This is a schematic diagram of the signal control logic provided in an embodiment of this application;
[0032] Figure 3 This is a schematic flowchart of an anomaly monitoring and handling method provided in an embodiment of this application.
[0033] Figure 4 A schematic diagram of signal control provided for an embodiment of this application;
[0034] Figure 5 A schematic diagram illustrating another signal control method provided in an embodiment of this application;
[0035] Figure 6 This is a structural diagram of another electronic device provided in an embodiment of this application. Detailed Implementation
[0036] This application provides an electronic device for effectively and conveniently handling abnormalities in electronic devices. The method and the electronic device are based on the same technical concept. Since the methods and electronic devices solve problems based on similar principles, their implementations can be mutually referenced, and repeated details will not be elaborated further.
[0037] In the solution provided in this application embodiment, the electronic device may include a control module and a state management module. The state management module monitors the operating state of the electronic device's software and sends corresponding signals to the control module based on the different operating states of the software. This allows the control module to generate a valid or invalid reset signal based on the signals received from the state management module and feed it back to the state management module. Subsequently, the state management module can restart the software based on the received valid reset signal, thereby achieving abnormal recovery processing of the electronic device. Therefore, by combining the electronic device's own software and hardware, abnormal monitoring and processing of the electronic device can be achieved without relying on external hardware devices with specific functions or making significant modifications to the physical path data inside the electronic device. This allows for low-cost, effective, and convenient abnormal processing of the electronic device.
[0038] The following explanations will clarify some of the terms used in this application to facilitate understanding by those skilled in the art.
[0039] 1) Electronic equipment, also known as terminal equipment or user equipment (UE), is a device that provides specific functions to users.
[0040] It is understood that this application does not limit the specific type of electronic device. As an example, the electronic device may be one that is unsuitable for self-processing abnormalities, such as an electronic device with a non-removable battery, no physical buttons, or requiring an external charging device to power on; or, the electronic device may be one that is unable to recover from an abnormality on its own, such as one whose physical buttons are not functioning. For example, the electronic device may be a wearable device, such as a watch, bracelet, helmet, or headphones.
[0041] Optionally, the electronic device may include an interface through which it can receive external signals input from other devices and perform fault recovery processing based on the external signals. As an example, the interface may be a Universal Serial Bus (USB) interface.
[0042] 2) Other devices, which are devices that can connect to electronic devices via a USB interface. Optionally, these other devices may include adapters, headphones, external hard drives, printers, Universal Serial Bus (USB) flash drives (USB flash drives), etc.
[0043] 3) The USB interface enables electronic devices to connect with other devices, providing interfaces for data transfer, charging, and other functions. The USB interface contains a USB connector and a power delivery (PD) chip; each pin of the PD chip connects to the USB connector.
[0044] A USB connector is a plug-in device placed in an electronic device that can transmit current and signals after connecting to other active devices.
[0045] The PD chip includes multiple pins, such as TX+, TX-, RX+, RX-, VBUS, CC, D+, D-, and GND. The PD chip can use these pins to detect whether the USB connector is connected to other devices, thereby enabling data transmission or charging / discharging functions.
[0046] Traditionally, PD chips remain in a toggle mode, meaning their CC pin outputs a rectangular wave with high and low levels. When a USB connector is connected to another device, the introduced voltage, current, or equivalent resistance causes a change in the waveform output on the CC pin. The PD chip can detect this waveform change to determine if the USB connector is connected to another device. If the PD chip detects this connection, it sends a signal to the status management module in the electronic device to notify it to perform a series of subsequent operations to ensure the normal operation of the electronic device.
[0047] 4) Status management module, used to control and manage the PD chip. Traditionally, when the PD chip detects that the USB connector is connected to another device, it sends a corresponding signal to the status management module, which then performs a series of subsequent operations upon receiving the signal.
[0048] Optionally, the state management module can be a processor (i.e., a central processing unit, CPU) in an electronic device, or other devices with processing functions independent of the processor. For example, the state management module can be a field-programmable gate array (FPGA), a complex programmable logic device (CPLD), an application-specific integrated circuit (ASIC), or a system-on-a-chip (SOC), or other programmable chips.
[0049] In addition, it should be understood that in the description of this application, the words "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.
[0050] The embodiments of this application will now be described with reference to the accompanying drawings.
[0051] Figure 1 This is a structural example diagram of an electronic device 100 provided in an embodiment of this application. For example... Figure 1 As shown, the electronic device 100 may include a status management module 110 and a control module 120. The status management module 110 and the control module 120 can communicate with each other and work together to monitor and handle anomalies in the electronic device. It is understood that... Figure 1For simplicity, only two functional modules involved in the embodiments of this application are shown, and this does not constitute any limitation on the structure or function of the electronic device of the embodiments of this application. The functions of each module of the electronic device are described below.
[0052] In one example, the state management module 110 is configured to generate a first signal when the software of the electronic device malfunctions, and send the first signal to the control module 120, the first signal indicating the software malfunction. The control module 120 is configured to generate a valid reset signal based on the first signal, and send the valid reset signal to the state management module 110. The state management module 110 is further configured to restart the software based on the valid reset signal.
[0053] In another example, the state management module 110 is further configured to generate a second signal when the software is running normally, and send the second signal to the control module 120, the second signal indicating that the software is running normally; the control module 120 is further configured to generate an invalid reset signal based on the second signal, and send the invalid reset signal to the state management module 110. The state management module 110 is further configured not to restart the software based on the invalid reset signal.
[0054] Through the above scheme, the state management module can monitor the operating status of the electronic device's software and send corresponding signals to the control module according to the different operating statuses of the software. This enables the control module to generate a valid or invalid reset signal based on the signal received from the state management module and feed it back to the state management module. Then, the state management module can restart the software based on the received valid reset signal to realize the abnormal recovery processing of the electronic device, while not restarting the software if an invalid reset signal is received.
[0055] Therefore, by combining the software and hardware of the electronic device itself, anomaly monitoring and handling can be achieved. The handling methods are simple, do not rely on external hardware devices with specific functions, and do not require significant modifications to the internal physical pathways of the electronic device. This allows for low-cost, effective, and convenient anomaly monitoring and handling, ensuring the normal operation of the electronic device. Since anomaly monitoring and handling are achieved by monitoring the software of the electronic device, the anomaly monitoring and handling functions can be modified according to subsequent software iterations, without being limited by the inherent physical pathways of the electronic device. This further improves product maintainability and enhances the user experience.
[0056] Figure 2A This is a structural example diagram of another electronic device provided in an embodiment of this application. For example... Figure 2A As shown, the electronic device 200 may include a status management module 210, a control module 220, and an interface 230.
[0057] See Figure 2A Interface 230 can be used to receive external signals input from other devices and transmit the received external signals to the status management module 210 and the control module 220.
[0058] In this embodiment, the pre-configured exception handling strategy includes: 1) The interface does not transmit external signals to the state management module and the control module when no external signals from other devices are detected, but transmits the external signals to the state management module and the control module when external signals from other devices are detected. 2) The state management module transmits a first signal to the control module when no external signal is received and the software is running normally; transmits a second signal to the control module for a first duration when an external signal is received and the software is running normally; and transmits the first signal to the control module for a first duration when an external signal is received and the software is running abnormally.
[0059] The status management module 210 can generate a first signal when the software is running abnormally and a second signal when the software is running normally after receiving an external signal, and send the generated first signal or second signal to the control module 220.
[0060] See Figure 2B The control module can be a logic device, specifically a NAND gate. This NAND gate can perform an AND-OR operation on an external signal from the interface and a first or second signal from the state management module to generate a valid reset signal or an invalid reset signal, which is then fed back to the state management module. When generating the valid reset signal based on the first signal, the control module 220 can specifically be used to: generate the valid reset signal based on the first signal and the external signal; when generating the invalid reset signal based on the second signal, the control module 220 can specifically be used to: generate the invalid reset signal based on the second signal and the external signal.
[0061] Furthermore, the control module 220 can feed back the generated valid or invalid reset signal to the status management module 210. The status management module 210 can then perform appropriate processing based on the received valid or invalid reset signal to ensure the normal operation of the electronic device.
[0062] Therefore, the monitoring and handling of anomalies in electronic devices no longer relies on external devices with specific functions, nor does it require significant modifications to the internal physical pathways of the electronic devices. This enables effective and convenient monitoring and handling of anomalies in electronic devices. It is understandable that... Figure 1 and Figure 2A, Figure 2B The arrows in the diagram are merely illustrative examples of signal transmission between modules of the electronic device and do not constitute any limitation on the function of any module. For details on the functional implementation of the status management module 210 and the control module 220, please refer to [link to relevant documentation]. Figure 1 The relevant descriptions will not be repeated here.
[0063] It is understood that the above is merely an example of the exception handling strategy of this application and not a limitation thereof. In other embodiments, the above exception handling strategy can be set according to business needs or the performance or application scenario of the electronic device, etc., and this application does not limit it. For example, in some embodiments, the above exception handling strategy can also be based on high and low level modes to implement signal control. The exception handling strategy may include, for example, the following: 1) When the interface does not detect external signals input from other devices, it transmits an external signal in a first state (e.g., a low-level signal) to the state management module and the control module, and when it detects external signals input from other devices, it transmits an external signal in a second state (e.g., a high-level signal) to the state management module and the control module within a set second time period. 2) The state management module does not process the external signal in the first state after receiving it, and within a first time period after receiving the external signal in the second state, it transmits a high-level signal to the control module when the software is running abnormally, and transmits a low-level signal to the control module when the software is running normally. The second time period is shorter than the first time period, and this application does not limit it.
[0064] In one example, the state management module can be located on the main chip of the electronic device, and the control module can be a physical device that communicates with the main chip of the electronic device. For example, the control module can be a logic device, such as a NAND gate. In practical applications, appropriate control modules and corresponding exception handling strategies can be set according to business requirements, the performance of the electronic device, or the application scenario; this application does not impose any limitations on this.
[0065] In one example, the external signals transmitted to the state management module and the control module can be periodic signals. Accordingly, the state management module 210 can control the generation of the first signal or the second signal based on the set signal period. Then, the control module 220 can control the generation of a valid reset signal or an invalid reset signal based on the received external signals and the first signal or the second signal, so as to ensure the normal operation of the electronic device.
[0066] It is understandable that, since abnormal handling of electronic devices only requires a short time, the periodic external signals mentioned here are only to distinguish them from the device charging scenario. That is, by controlling the duration of the external signals acting on the state management module and the control module, the abnormal handling can be completed quickly within a limited time. After the abnormal handling is completed, even if the interface can still receive external signals input from other devices (such as power adapters), no signals that can trigger the abnormal handling process will be generated, so as to avoid unnecessary abnormal handling behavior from adversely affecting the normally operating electronic devices.
[0067] For easier understanding, please refer to the following: Figure 3 The flowchart shown illustrates the method, using NAND gates as the control module and combining it with signal control based on high / low level (toggle) modes. Specifically, Figure 3 The flowchart shown can be derived from... Figure 1 or Figure 2A The various modules of the electronic device shown work together. For clarity, the following mainly focuses on... Figure 2A The electronic device shown is used as an example for illustration.
[0068] like Figure 3 As shown, the method includes the following steps:
[0069] S301: After the electronic device is powered on, the state management module can be configured to output a high-level signal to the control module by default when the electronic device's software is running normally. It is understood that this can be configured by the user or during initialization based on relevant configuration data from the electronic device or software; this application does not impose any restrictions on this.
[0070] S302: The state management module monitors whether a valid external signal has been received through the interface. Based on a pre-set exception handling strategy, when no other device is inserted at the interface, no external signal may be transmitted to the state management module and control module, or a low-level external signal may be transmitted. When another device is inserted, a high-level external signal is transmitted to the state management module and control module. Since high / low external signals will affect the control module and thus the validity of the final generated reset signal, in this embodiment, a low-level external signal can be referred to as an invalid external signal, and a high-level external signal as a valid external signal. Furthermore, to differentiate from device charging scenarios, the interface can be configured to transmit a valid external signal to the state management module and control module within a second time period when another device is inserted.
[0071] If a valid external signal is received, proceed to S303. If no valid external signal is received, proceed to S306 to end this process, meaning that related exception handling operations such as restarting the software will not be performed.
[0072] S303: After receiving a valid external signal, the status management module can perform the following configurations: start a software timer and output a low-level signal to the control module within a set first duration. Considering the signal transmission delay, the second duration can be set to be less than the first duration to configure an appropriate exception handling time for the electronic device.
[0073] Based on the above settings, if the software is running normally, the status management module can generate a low-level signal (i.e., the second signal) and send it to the control module when the software timer starts timing and the cumulative timing does not exceed the first duration, and the control module makes a decision on whether to restart the software.
[0074] S304: Determine whether the cumulative timing of the software timer exceeds the first duration T1. If the cumulative timing of the software timer does not exceed T1, continue to generate a low-level signal and send it to the control module. If the cumulative timing of the software timer exceeds T1, enter S305.
[0075] S305: After the software timer times out beyond the first duration, the signal output by the status management module to the control module resumes to a high-level signal, and this process ends normally and exits. Since the interface transmits a valid external signal to the status management module and the control module within the second duration after another device is inserted, and resumes to an invalid external signal after the second duration ends, and the status management module outputs a high-level signal to the control module after the first duration. At this time, even if an external signal input by another device (such as a power adapter) can still be received at the interface, since the transmitted signal to the status management module and the control module is an invalid external signal, and the signal transmitted by the status management module to the control module is a high-level signal, no signal that can trigger the exception handling process will be generated, so as to avoid adverse effects on the normally operating electronic device caused by unnecessary exception handling behaviors. As [[ID=!]] Figure 4 shown, assume that the control module is a NAND gate, the external signal is a valid signal within the second duration T2, and T2 < T1. When the software is running normally, the collaborative control of the status management module and the control module includes the following situations:
[0076] 1) When no external signal is detected, the external signal transmitted by the interface to the status management module and the control module is a low-level invalid external signal. When the software is running normally, the signal output by the status management module to the control module is a high-level signal (i.e., the first signal). The control module performs a NAND operation on the first signal from the status management module and the low-level external signal from the interface to generate an invalid reset signal, i.e., a high-level signal, then the software is not restarted, and both the electronic device and the software are used normally.
[0077] 2) When an external signal is detected, the interface transmits a valid external signal with a high level to the state management module and the control module within T2. The state management module generates a low-level signal, i.e., the second signal, within the first duration T1. Within T1, since the external signal is a high-level signal within T2, the control module performs a NAND operation on the second signal and the high-level external signal to generate an invalid reset signal, i.e., a high-level signal, so the software is not restarted, and both the electronic device and the software are used normally.
[0078] 3) After T2 has elapsed, the interface transmits an invalid external signal with a low level to the state management module and the control module within the second duration T2. The signal output by the state management module to the control module after T1 resumes to a high-level signal (i.e., the first signal). The control module performs a NAND operation on the first signal and the low-level external signal to generate an invalid reset signal, i.e., a high-level signal, so the software is not restarted, and both the electronic device and the software are used normally.
[0079] If the software runs abnormally, the state management module cannot start the software timer after receiving the external signal. Since the default output signal of the state management module is a high-level signal (i.e., the first signal), the signal output by the state management module to the control module at this time is a high-level signal.
[0080] As Figure 5 shown, assume that the control module is a NAND gate, the external signal is a valid signal within the second duration T2, and T2 < T1. In the case of abnormal software operation, due to the abnormal software operation, the signal output by the state management module to the control module is a high-level signal, i.e., the first signal. The coordinated control of the state management module and the control module includes the following situations:
[0081] 4) When no external signal is detected, the external signal transmitted by the interface to the state management module and the control module is an invalid signal with a low level. The control module performs a NAND operation on the first signal and the invalid external signal to generate an invalid reset signal, i.e., a high-level signal, so the software is not restarted.
[0082] 5) When an external signal is detected, the interface transmits a valid external signal with a high level to the state management module and the control module within T2. The control module performs a NAND operation on the first signal and the high-level external signal to generate a valid reset signal, i.e., a low-level signal. After the state management module receives the valid reset signal fed back by the control module, it restarts the software according to the valid reset signal to implement the abnormal recovery process of the electronic device and ensure the normal operation of the electronic device.
[0083] Therefore, by combining the software and hardware of the electronic device itself, anomaly monitoring and handling can be achieved. Users only need to connect other devices through an interface to obtain external signals to handle anomalies. The handling method is simple and does not rely on external hardware devices with specific functions, nor does it require significant modifications to the internal physical path design of the electronic device. This allows for low-cost, effective, and convenient anomaly monitoring and handling to ensure the normal operation of the electronic device. Since anomaly monitoring and handling of the electronic device is achieved by monitoring the software for anomalies, the implementation of anomaly monitoring and handling functions can be modified according to software versions during subsequent software product iterations, without being limited by the inherent physical path of the electronic device. This further improves product maintainability and enhances the user experience.
[0084] It is understood that the solutions in this application embodiment can be modified and optimized according to the capabilities of the electronic device itself or the software version of the electronic device when applied to different electronic devices, in order to adapt the corresponding exception handling duration to different electronic devices, including a first duration T1 and a second duration T2. The first duration can be any suitable threshold value (e.g., 1 second), and the second duration can be any suitable value less than the first duration. This application does not limit this. In addition, the electronic devices to which this application embodiment is applicable can be wearable devices or any suitable electronic device with this requirement. This application does not limit this either.
[0085] It should be understood that, in practical applications, electronic devices may include more than Figure 1 or Figure 2A The number of more or fewer components shown in the embodiments of this application is not limited. Figure 1 The electronic device shown in Figure 2A is merely an example, and the electronic device may have more or fewer components than those shown, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0086] It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or have two or more units integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0088] Based on the above embodiments, this application also provides an electronic device.
[0089] See Figure 6 As shown, the electronic device 600 includes a memory 601, a processor 602, and a controller 603.
[0090] The memory 601 stores a program. Specifically, the program may include program code, which includes instructions for computer operation. The memory 601 may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. The processor 602 and the controller 603 can read the program from the memory and perform corresponding control to ensure the normal operation of the electronic device.
[0091] In one example, the electronic device may further include an interface 604. This interface 604 can receive external signals input from other devices and transmit these signals to the processor 602 and controller 603, so that the processor 602 and controller 603 can combine the received external signals to perform corresponding control, thereby ensuring the normal operation of the electronic device.
[0092] The memory 601, processor 602, controller 603, and interface 604 are interconnected. Optionally, the memory 601, processor 602, controller 603, and interface 604 are interconnected via bus 605; bus 605 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0093] Optionally, the electronic device may further include a transceiver for wireless communication with network devices or other electronic devices in a mobile communication system.
[0094] The processor 602 integrates, for example, Figure 1 or Figure 2A The state management module in the illustrated electronic device is capable of performing the following operations:
[0095] When the software of the electronic device malfunctions, a first signal is generated and sent to the controller 603. The first signal is used to indicate that the software is malfunctioning. The controller 603 can generate a valid reset signal based on the first signal and send the valid reset signal to the processor 602. The processor 602 is also used to restart the software based on the valid reset signal.
[0096] In one implementation, the process 602 is further configured to generate a second signal when the software is running normally, and send the second signal to the controller, the second signal being used to indicate that the software is running normally; the controller is further configured to generate an invalid reset signal based on the second signal, and send the invalid reset signal to the processor; the processor is further configured to not restart the software based on the invalid reset signal.
[0097] In one implementation, the electronic device further includes an interface for receiving external signals input from other devices and transmitting the external signals to the controller. When the controller generates a valid reset signal based on the first signal, it is specifically configured to generate the valid reset signal based on the first signal and the external signal. When the controller generates an invalid reset signal based on the second signal, it is specifically configured to generate the invalid reset signal based on the second signal and the external signal.
[0098] In one implementation, the interface 604 is further configured to transmit the external signal to the processor; the processor is specifically configured to: generate the first signal when the software is malfunctioning within a first time period after receiving the external signal; and generate the second signal when the software is running normally within the first time period.
[0099] In one implementation, the external signal is a valid signal for a second duration, which is shorter than the first duration.
[0100] In one implementation, the first signal is a high-level signal, and the second signal is a low-level signal; the external signal is a high-level signal; when the controller generates the valid reset signal based on the first signal and the external signal, it is specifically configured to: perform NAND processing on the first signal and the external signal to generate the valid reset signal, wherein the valid reset signal is a low-level signal; when the controller generates the invalid reset signal based on the second signal and the external signal, it is specifically configured to: perform NAND processing on the second signal and the external signal to generate the invalid reset signal, wherein the invalid reset signal is a high-level signal.
[0101] In one implementation, the controller is a physical device that communicates with the main chip of the electronic device.
[0102] Based on the above embodiments, this application also provides a chip, which can be applied to, for example... Figure 1 , Figure 2A or Figure 6 In the electronic device shown.
[0103] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the functions involved in the electronic device in the methods provided above. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete components.
[0104] In summary, the solution provided in this application embodiment allows the electronic device to include a control module and a state management module. The state management module monitors the operating state of the electronic device's software and sends corresponding signals to the control module based on the different operating states of the software. This enables the control module to generate a valid or invalid reset signal based on the signals received from the state management module and feed it back to the state management module. Furthermore, the state management module can restart the software based on the received valid reset signal, thereby achieving abnormal recovery processing of the electronic device. Thus, by combining the electronic device's own software and hardware, abnormal monitoring and processing of the electronic device can be achieved without relying on external hardware devices with specific functions or requiring significant modifications to the physical path data within the electronic device. This allows for low-cost, effective, and convenient abnormal processing of the electronic device.
[0105] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0107] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0108] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0109] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. An electronic device, comprising: The electronic device comprises: a control module and a state management module, wherein the state management module is configured to generate a first signal when the software of the electronic device runs abnormally, and send the first signal to the control module, the first signal being used to indicate that the software runs abnormally; the control module is configured to generate a valid reset signal according to the first signal, and send the valid reset signal to the state management module; the state management module is further configured to restart the software according to the valid reset signal; the state management module is further configured to generate a second signal when the software runs normally, and send the second signal to the control module, the second signal being used to indicate that the software runs normally; the control module is further configured to generate an invalid reset signal according to the second signal, and send the invalid reset signal to the state management module; the state management module is further configured to not restart the software according to the invalid reset signal.
2. The electronic device of claim 1, wherein, The electronic device further comprises an interface configured to receive an external signal input by another device, and transmit the external signal to the control module; when the control module generates the valid reset signal according to the first signal, the control module is specifically configured to: generate the valid reset signal according to the first signal and the external signal; when the control module generates the invalid reset signal according to the second signal, the control module is specifically configured to: generate the invalid reset signal according to the second signal and the external signal.
3. The electronic device according to claim 2, wherein the interface is further configured to transmit the external signal to the state management module; the state management module is specifically configured to: generate the first signal when the software runs abnormally within a first time length after the external signal is received; generate the second signal when the software runs normally within the first time length.
4. The electronic device of claim 3, wherein, The external signal is a valid signal within a second time length, and the second time length is less than the first time length.
5. The electronic device of any of claims 2-4, wherein, The first signal is a high-level signal, the second signal is a low-level signal, and the external signal is a high-level signal; when the control module generates the valid reset signal according to the first signal and the external signal, the control module is specifically configured to: perform NAND processing on the first signal and the external signal to generate the valid reset signal, wherein the valid reset signal is a low-level signal; when the control module generates the invalid reset signal according to the second signal and the external signal, the control module is specifically configured to: perform NAND processing on the second signal and the external signal to generate the invalid reset signal, wherein the invalid reset signal is a high-level signal.
6. The electronic device of any of claims 1-5, wherein, The control module is a physical device in communication with a main chip of the electronic device.
7. An electronic device, comprising: The electronic device comprises: a memory configured to store a program; a processor configured to read the program in the memory, and run software; generate a first signal when the software runs abnormally, and send the first signal to a controller, the first signal being used to indicate that the software runs abnormally; The controller is configured to generate a valid reset signal according to the first signal, and send the valid reset signal to the processor. The processor is further configured to restart the software according to the valid reset signal. The processor is further configured to generate a second signal when the software is running normally, and send the second signal to the controller, where the second signal is used to indicate that the software is running normally. The controller is further configured to generate an invalid reset signal according to the second signal, and send the invalid reset signal to the processor. The processor is further configured to not restart the software according to the invalid reset signal.
8. The electronic device of claim 7, wherein, The electronic device further comprises an interface configured to receive an external signal input by another device, and transmit the external signal to the controller. When the controller generates the valid reset signal according to the first signal, the controller is specifically configured to: generate the valid reset signal according to the first signal and the external signal. When the controller generates the invalid reset signal according to the second signal, the controller is specifically configured to: generate the invalid reset signal according to the second signal and the external signal.
9. The electronic device of claim 8, wherein: the interface is further configured to transmit the external signal to the processor. The processor is specifically configured to: generate the first signal when the software is running abnormally within a first time period after receiving the external signal; generate the second signal when the software is running normally within the first time period.
10. The electronic device of claim 9, wherein, The external signal is a valid signal within a second time period, and the second time period is less than the first time period.
11. The electronic device of any of claims 8-10, wherein, The first signal is a high-level signal, the second signal is a low-level signal, and the external signal is a high-level signal. When the controller generates the valid reset signal according to the first signal and the external signal, the controller is specifically configured to: perform an AND NOT operation on the first signal and the external signal to generate the valid reset signal, where the valid reset signal is a low-level signal. When the controller generates the invalid reset signal according to the second signal and the external signal, the controller is specifically configured to: perform an AND NOT operation on the second signal and the external signal to generate the invalid reset signal, where the invalid reset signal is a high-level signal.
12. The electronic device of any of claims 7-11, wherein, The controller is a physical device in communication with a main chip of the electronic device.
13. A chip, characterized by The chip is applied to the electronic device of any one of claims 1-6 or 7-12.
Citation Information
Patent Citations
Processor control method and device and storage medium
CN111324494A
Method and device for diagnosing abnormal reset of main control module and main control module
CN111813590A