Abnormality processing method and device, equipment and medium

By monitoring the operating status in the smart device and entering the safe operation mode, the complex recovery problem of the smart device in abnormal situations is solved, automated exception handling and remote firmware updates are realized, reducing maintenance costs and improving user experience.

CN119512795APending Publication Date: 2025-02-25SHANGHAI MXCHIP INFORMATION TECHN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411654350.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The recovery operation of smart devices in abnormal situations is high, the maintenance cost is high, and the user experience is poor, so it is difficult for the existing technology to effectively solve these problems.

Method used

By monitoring the operating status of the equipment, when the preset abnormal conditions are met, the intelligent device enters the safe operation mode, turns off non-critical functions, retains communication and OTA upgrade functions, reports abnormal information to the cloud, and completes the OTA upgrade of the new version of firmware.

Benefits of technology

It reduces the complexity of recovery operation of smart devices in abnormal situations, reduces maintenance costs, improves user experience, and realizes automated exception handling and remote firmware updates of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512795A_ABST
    Figure CN119512795A_ABST
Patent Text Reader

Abstract

The invention discloses an exception handling method and device, equipment and a medium. The exception handling method comprises the steps of monitoring the running state of the equipment; when it is monitored that the equipment operation state meets a preset abnormal condition, a safe operation mode is entered, and the safe operation mode is a working mode in which a non-critical function is closed and a communication function and an OTA upgrading function are reserved; the abnormal information is reported to a cloud server, so that the cloud server pushes the new version firmware to the intelligent device; and receiving the new version firmware pushed by the cloud server, and carrying out OTA upgrading based on the new version firmware. In this way, complex operation is not needed, the operation complexity of recovery of the intelligent device under the abnormal condition can be reduced, the maintenance cost is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of exception handling, and in particular to an exception handling method, device, equipment and medium. Background Art

[0002] Smart devices are different from mobile phones, computers and other networked devices. They do not have user input ports (such as keyboards and touch screens) or external communication interfaces (such as USB (Universal Serial Bus)). For example, a Wi-Fi (Wireless Fidelity) smart ceiling light is installed on the ceiling and users cannot perform any operations on it. Therefore, when a smart device is abnormal, it may lose the ability to continuously and stably communicate with the cloud, making it difficult to recover from the abnormality.

[0003] Currently, in this situation, the recovery of smart devices is usually carried out in the following ways: Return processing: Since the device cannot be restored to normal function, the user has to return it, resulting in poor user experience, damaged brand reputation, and increased after-sales service and logistics costs; Disassembly of the device to re-burn the firmware: The device needs to be disassembled for hardware-level intervention, such as re-burning the firmware by connecting the programming interface or using specific tools. This method is not only complicated and requires professional technical support, but may also cause physical damage to the device or invalidate the warranty. In summary, the existing smart device recovery solutions are not only cumbersome and time-consuming, but also increase the cost of device maintenance and management, limiting the popularity and user acceptance of smart devices. How to reduce the operational complexity of smart device recovery under abnormal circumstances, reduce maintenance costs, and improve user experience is a problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the purpose of this application is to provide an exception handling method, device, equipment and medium, which can reduce the operational complexity of smart device recovery under abnormal conditions, reduce maintenance costs, and improve user experience. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses an exception handling method, which is applied to a smart device, comprising:

[0006] Monitor equipment operating status;

[0007] When it is detected that the operating state of the device meets the preset abnormal conditions, the device enters a safe operation mode, wherein the safe operation mode is a working mode in which non-critical functions are turned off, communication functions and OTA upgrade functions are retained;

[0008] Reporting abnormal information to the cloud server so that the cloud server can push the new version of firmware to the smart device;

[0009] Receive the new version of the firmware pushed by the cloud server, and perform OTA upgrade based on the new version of the firmware.

[0010] Optionally, the monitoring device operating status includes:

[0011] Monitoring the number of abnormal startups and / or system logs of the smart device, wherein the abnormal startup refers to the time interval between two consecutive startups being less than a preset time interval;

[0012] Accordingly, the device operation status satisfies a preset abnormal condition, including: the number of abnormal startups reaches a preset number threshold, and / or a preset type of error appears in the system log.

[0013] Optionally, the monitoring of the number of abnormal startups of the smart device includes:

[0014] Read the count value of the startup counter to obtain the number of abnormal startups of the smart device;

[0015] The startup counter increases its count value after the smart device is started, and is cleared when the running time of the smart device reaches the preset time interval.

[0016] Optionally, after receiving the new version of the firmware pushed by the cloud server, the method further includes:

[0017] Integrity verification and signature verification are performed on the new version of the firmware. If the new version of the firmware passes the integrity verification and signature verification, the step of performing OTA upgrade based on the new version of the firmware is triggered.

[0018] Optionally, after the OTA upgrade based on the new version of the firmware is performed, the method further includes:

[0019] Automatically restart and enter a normal operating mode, wherein the normal operating mode is a working mode in which the non-critical functions, the communication function, and the OTA upgrade function are all enabled.

[0020] Optionally, after entering the safe operation mode, the method further includes:

[0021] The abnormal information is sent to the operation and maintenance personnel terminal through a preset communication channel so that the operation and maintenance personnel terminal can push the new version of the firmware to the cloud server.

[0022] Optionally, reporting the abnormal information to the cloud server includes:

[0023] Broadcasting abnormal information via Bluetooth, so that when a Bluetooth gateway device receives the abnormal information, the abnormal information is reported to a cloud server;

[0024] Correspondingly, the receiving of the new version of the firmware pushed by the cloud server includes: establishing a Bluetooth connection with a Bluetooth gateway device, and receiving the new version of the firmware pushed by the cloud server through the Bluetooth gateway device based on the Bluetooth connection.

[0025] In a second aspect, the present application discloses an exception handling device, which is applied to a smart device, comprising:

[0026] Operation status monitoring module, used to monitor the operation status of equipment;

[0027] An operation mode control module, configured to control the smart device to enter a safe operation mode when the operation status monitoring module detects that the operation status of the device meets a preset abnormal condition, wherein the safe operation mode is a working mode in which non-critical functions are turned off and communication functions and OTA upgrade functions are retained;

[0028] An abnormal information reporting module, used to report abnormal information to a cloud server so that the cloud server can push a new version of the firmware to the smart device;

[0029] A new version firmware receiving module, used to receive the new version firmware pushed by the cloud server;

[0030] The new version firmware upgrade module is used to perform OTA upgrade based on the new version firmware.

[0031] In a third aspect, the present application discloses an electronic device, including a memory and a processor, wherein:

[0032] The memory is used to store the computer program;

[0033] The processor is used to execute the computer program to implement the above-mentioned exception handling method.

[0034] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned exception handling method when executed by a processor.

[0035] It can be seen from the above scheme that the present application provides an exception handling method, which is applied to smart devices, including: monitoring the operating status of the device; when it is monitored that the operating status of the device meets the preset abnormal conditions, entering a safe operation mode, wherein the safe operation mode is a working mode that shuts down non-critical functions, retains communication functions and OTA upgrade functions; reporting abnormal information to a cloud server so that the cloud server can push a new version of firmware to the smart device; receiving the new version of firmware pushed by the cloud server, and performing an OTA upgrade based on the new version of firmware.

[0036] It can be seen that the beneficial effects of the present application are: when the smart device detects an abnormal operating status of the device, it enters a safe operating mode, shuts down non-essential functions, reduces device power consumption, avoids further failures, retains communication functions and OTA upgrade functions, reports abnormal information to the cloud server, and completes the OTA upgrade of the new version of the firmware. In this way, there is no need for complicated operations, which can reduce the operational complexity of the smart device's recovery in abnormal situations, reduce maintenance costs, and improve user experience.

[0037] Correspondingly, an exception handling device, equipment and readable storage medium provided by the present application also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0039] Figure 1 A flow chart of an exception handling method provided in an embodiment of the present application;

[0040] Figure 2 A flowchart of abnormal startup processing provided in an embodiment of the present application;

[0041] Figure 3 An exception handling timing diagram provided in an embodiment of the present application;

[0042] Figure 4 Another exception handling timing diagram provided in an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the structure of an exception handling device provided in an embodiment of the present application;

[0044] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] See also Figure 1As shown, the embodiment of the present application discloses an exception handling method, which is applied to a smart device, including:

[0047] Step S11: monitor the operating status of the equipment.

[0048] In the embodiments of the present application, the smart device can be understood as a device with computing and processing capabilities, and the firmware update channel is OTA (Over-The-Air, air download technology) upgrade. Smart devices may include but are not limited to smart home devices, networked home appliances and other smart hardware devices that need to be remotely managed and updated. For example, smart lighting systems, smart security equipment, smart speakers, smart home appliances, health monitoring equipment, etc. Smart devices can be Bluetooth Mesh devices, that is, devices that support the Bluetooth Mesh network protocol.

[0049] In the embodiment of the present application, a real-time monitoring module can be run in the program of the smart device to monitor the device operation status. The device operation status can be understood as various working states of the smart device.

[0050] In an optional implementation, the number of abnormal startups of the smart device and / or the system log may be monitored, wherein the abnormal startup is when the time interval between two consecutive startups is less than a preset time interval. It is understandable that the present embodiment may monitor the startup time, and determine whether the smart device is abnormally started by monitoring the startup time, for example, the preset time interval is 3 minutes. The system log contains the operating status of the smart device, and by monitoring the system log, it is possible to determine whether the device is abnormal.

[0051] Step S12: When it is monitored that the operating state of the device meets the preset abnormal conditions, the safe operation mode is entered, wherein the safe operation mode is a working mode that shuts down non-critical functions, retains communication functions and OTA upgrade functions.

[0052] In this embodiment, the device operation status satisfies a preset abnormal condition, which may include: the number of abnormal startup times reaches a preset number threshold, and / or a preset type of error appears in the system log.

[0053] The preset number threshold can be set according to actual conditions, for example, 6 times. The preset type, such as Bluetooth communication error, can be identified by analyzing the error code in the system log. When a preset number of error codes corresponding to the same error type appear in the system log, it can be judged that an error of the preset type occurs. The preset number can be 1 or more times, and multiple times can be understood as greater than or equal to 2 times. That is, when it is found that a specific error code appears multiple times in the system log, it is determined that the preset abnormal condition is met.

[0054] In an optional embodiment, monitoring the number of abnormal startups of a smart device may include: reading the count value of a startup counter to obtain the number of abnormal startups of the smart device; wherein the count value of the startup counter increases after the smart device is started, and is cleared when the running time of the smart device reaches the preset time interval.

[0055] That is, if the preset time interval is not reached and the restart is performed, the count value is increased by 1. When the preset number threshold is reached, the safe operation mode is entered. If the preset time interval is reached and the restart is not performed, the normal operation mode is entered. For example, see Figure 2 As shown, Figure 2 This is a flowchart of abnormal startup processing provided by an embodiment of the present application. A counter mechanism is used: each time the startup is started, the counter value is increased, and the startup count is increased by 1. When the counter value reaches the set threshold (for example, the startup count is greater than 6), the safe mode (i.e., safe operation mode) is entered. Before entering the safe mode, it is in the normal working mode. After the startup work exceeds 3 minutes, it can be considered a normal startup, and the startup count is reset to zero.

[0056] The communication function can be understood as the function of the smart device communicating with the external device, and the OTA upgrade function can be understood as the function of performing OTA upgrade on the external device. The OTA upgrade needs to retain the communication function.

[0057] Step S13: reporting the abnormal information to the cloud server so that the cloud server can push the new version of the firmware to the smart device.

[0058] Among them, the abnormal information can be understood as the description information of the abnormal situation, which can characterize the specific abnormal type, for example, frequent restart. In the embodiment of the present application, the abnormal information and the device identification of the smart device can be uploaded to the cloud server, so that the cloud server can push the new version of the firmware to the corresponding smart device based on the device identification.

[0059] In an optional implementation, after entering the safe operation mode, it also includes: sending the abnormal information to the operation and maintenance personnel terminal through a preset communication channel, so that the operation and maintenance personnel terminal pushes the new version of the firmware to the cloud server.

[0060] The preset communication channel may be a mobile phone App (i.e., Application), an email, etc. The cloud server may send the abnormal information to the mobile phone App or email of the operation and maintenance personnel's terminal. It should be noted that the operation and maintenance personnel may upload the new version of the firmware to the cloud server after updating the firmware, including but not limited to receiving the abnormal information, and may also upload the new version to the cloud server for daily research and development.

[0061] Step S14: receiving the new version of the firmware pushed by the cloud server, and performing OTA upgrade based on the new version of the firmware.

[0062] In an optional implementation, after receiving the new version of the firmware pushed by the cloud server, the new version of the firmware may also be subjected to integrity verification and signature verification. If the new version of the firmware passes the integrity verification and signature verification, the step of performing an OTA upgrade based on the new version of the firmware is triggered. By performing integrity verification and signature verification on the new version of the firmware, the security of the firmware upgrade can be improved.

[0063] Furthermore, after the OTA upgrade based on the new version of the firmware, it also includes: automatically restarting and entering a normal operating mode, wherein the normal operating mode is a working mode in which the non-critical functions, the communication function, and the OTA upgrade function are all enabled. After the firmware upgrade, automatically restarting and entering the normal operating mode can restore the operation of the smart device and reduce the complexity of user operations.

[0064] For example, see Figure 3 As shown, Figure 3 This is an exception handling timing diagram disclosed in an embodiment of the present application. Based on real-time monitoring of the operating status of smart devices, through specific anomaly detection algorithms, smart devices can automatically identify and handle abnormal situations. After entering safe mode, the device shuts down all non-critical functions, maintains minimal system operation, and continues to communicate with the cloud to receive OTA updates. In this way, it can ensure that even when a serious failure occurs in the device, normal functions can still be restored through remote updates, reducing the user's operational complexity and maintenance costs.

[0065] Among them, an abnormal detection mechanism is adopted: a real-time monitoring module is running in the program of the smart device, which monitors key system parameters (such as startup time, system log, error code, etc.). Once multiple abnormal restarts are detected, such as the interval between two startups is less than 3 minutes, the system will record the abnormal event. The abnormal detection algorithm includes: counter mechanism: each time the startup, the counter value is increased. When the counter value reaches the set threshold, the abnormal response mechanism is triggered. After the startup work exceeds 3 minutes, it can be considered a normal startup and the count value is reset to zero. In addition, system log analysis can be performed to analyze the error information in the system log and identify specific abnormal patterns (such as the high frequency of specific error codes). In the automatic safety mode switching, when the device finds an abnormal mode, it will automatically enter the safe mode. For example: if the device finds a high-frequency Bluetooth communication error during operation, it may be that the Bluetooth driver has an unrecoverable problem and will automatically enter the safe mode. When the abnormal detection module confirms that the device is trapped in an abnormal loop, the device will automatically enter the safe mode. In this mode, non-essential functional modules will be disabled to reduce the system load and the risk of abnormalities, and only basic communication and cloud OTA update functions will be retained.

[0066] In safe mode, the device maintains a connection with the cloud server to receive update instructions. The specific implementation steps include: Maintain basic network connection: maintain a communication channel with the cloud through the built-in networking module of the device, and regularly send heartbeat signals to the server. Send a notification through the communication channel with the cloud to inform the cloud that it has entered safe mode. OTA update mechanism: Once the cloud detects that the device has entered safe mode, it can push a new firmware version. After the device receives the update package, it ensures the security of the firmware by verifying the integrity and signature. The update process is to perform an OTA update after the device downloads and verifies the new firmware. After the update is completed, the device automatically restarts and enters normal operating mode. In addition, the embodiment of the present application can adopt a user notification and feedback mechanism. When the device enters safe mode, the program will notify the company's after-sales through a preset communication channel (such as a mobile phone app, email, etc.). The company's after-sales can make corresponding strategies, such as pushing firmware upgrades and analyzing abnormal causes.

[0067] That is, through the anomaly detection mechanism, a logic is provided to identify anomalies that occur during the startup and operation of the device (such as startup failure, system crash, etc.), and to determine whether the device is trapped in an infinite loop of startup, abnormality, and restart. When a specific number or pattern of abnormalities is detected, the device can automatically switch to safe mode to prevent further system crashes or damage. After the device enters safe mode, it still maintains a communication connection with the cloud for remote diagnosis and OTA firmware updates. Through the notification and feedback mechanism, when the device enters safe mode, the company's after-sales service (through applications, emails, etc.) is notified of the current device status. In this way, an automated recovery process is provided to ensure device stability and user experience, and maintenance costs and complexity are significantly reduced through cloud management and remote updates.

[0068] In an optional implementation, the reporting of the abnormal information to the cloud server includes: broadcasting the abnormal information via Bluetooth, so that when the Bluetooth gateway device receives the abnormal information, the abnormal information is reported to the cloud server; correspondingly, the receiving of the new version of the firmware pushed by the cloud server includes: establishing a Bluetooth connection with the Bluetooth gateway device, and receiving the new version of the firmware pushed by the cloud server through the Bluetooth gateway device based on the Bluetooth connection. In addition, the new version of the firmware can be pushed when the cloud server receives a firmware update request from the user terminal.

[0069] In this embodiment, after entering the safe mode, the smart device can start the Bluetooth broadcast function and send an abnormal alarm to the nearby Bluetooth gateway device. It contains the identification information and abnormal information of the smart device so that the Bluetooth gateway device can identify and take subsequent measures. The Bluetooth gateway device receives the broadcast information of the smart device, parses the broadcast information, identifies the abnormal information, and records the status and identification of the smart device. After confirming that the abnormal alarm has been received, the Bluetooth gateway device is ready to upload the information to the cloud server. The Bluetooth gateway device and the cloud server are connected to the network. The Bluetooth gateway device packages the received abnormal information and sends it to the cloud server to ensure that the cloud can understand the current abnormal situation of the device. After receiving the abnormal information sent by the Bluetooth gateway device, the cloud server will process and analyze the abnormal data of the smart device, generate a push notification, and pass the abnormal information to the mobile application on the user side. Remind the user that the device is in an abnormal state and suggest that the user take corresponding measures (such as firmware update). The mobile application receives the abnormal notification from the cloud server, parses the data and displays the abnormal information to the user interface. At the same time, an update button is provided, and the user clicks the button to start the firmware update process. The mobile application requests the cloud server to obtain the latest firmware version information, and the cloud server is ready to transmit the firmware to the Bluetooth gateway device. The Bluetooth gateway device establishes a connection with the smart device, and gradually transfers the new version of the firmware to the smart device through the Bluetooth connection. During the transmission process, the Bluetooth gateway device and the smart device will verify the correctness of each part of the data in real time to ensure that the firmware file is complete and correct.

[0070] For example, see Figure 4 As shown, Figure 4 Another exception handling sequence diagram provided in the embodiment of the present application. The exception handling and firmware update process of the Bluetooth sub-device (i.e., smart device), Bluetooth gateway, cloud and App is described in detail:

[0071] Bluetooth sub-device startup: The Bluetooth sub-device starts after being powered on, and runs the device initialization process, including loading the driver, checking the system status, enabling necessary services, and starting the Bluetooth communication module.

[0072] Monitoring module monitors abnormalities: The monitoring module of the sub-device continuously monitors various status indicators of the device (such as the number of restarts, error codes, etc.). Once an abnormal situation is detected, the monitoring module records the abnormal data and decides whether to enter the safe mode to ensure the stability of the basic functions of the device and prevent further problems.

[0073] Entering safe mode: When an abnormality is confirmed, the sub-device automatically enters safe mode. In safe mode, the sub-device will shut down non-essential functions and only retain Bluetooth communication and OTA upgrade functions.

[0074] Send broadcast notification to the gateway: After the sub-device enters the safe mode, it starts the Bluetooth broadcast function and sends abnormal alerts to nearby Bluetooth gateway devices. This broadcast notification will contain the identification information and abnormal information of the sub-device so that the gateway can identify and take subsequent measures.

[0075] Bluetooth gateway receives broadcast: The Bluetooth gateway device receives the abnormal broadcast of the sub-device. The gateway parses the broadcast information, identifies the abnormal information, and records the status and identification of the sub-device. After confirming that the abnormal alarm has been received, the gateway prepares to upload the information to the cloud server. The abnormal broadcast uses the connectable undirected broadcast packet of the Bluetooth standard, and the format is shown in Table 1:

[0076] Table 1

[0077]

[0078] Gateway notifies the cloud: The Bluetooth gateway is connected to the cloud server. The gateway packages the received sub-device abnormal information and sends it to the cloud server to ensure that the cloud can understand the current abnormal situation of the sub-device.

[0079] Cloud Notification App After receiving the abnormal report from the gateway, the cloud server will process and analyze the abnormal data of the sub-device, generate a push notification, and pass the abnormal information to the user's mobile application (App). This notification will remind the user that the device is in an abnormal state and suggest that the user take corresponding measures (such as firmware update).

[0080] App displays notifications: The App receives abnormal notifications from the cloud, parses the data and displays clear information on the user interface, such as "Your device frequently restarts, and it is recommended to update the firmware to restore normal operation." At the same time, the App provides an update button, which the user can click to start the firmware update process.

[0081] User firmware update: After receiving the abnormal notification from the App, the user confirms the firmware update requirement and starts the firmware update process through the App interface. The App requests the cloud to obtain the latest firmware version information and prepares to transmit the firmware to the Bluetooth gateway.

[0082] Bluetooth gateway establishes connection with sub-device: After receiving the firmware update instruction from the App or the cloud, the Bluetooth gateway attempts to establish a Bluetooth connection with the sub-device. After the connection is successful, the gateway will enter the firmware transfer mode and prepare to send the latest firmware file to the sub-device.

[0083] Transferring new firmware: The Bluetooth gateway gradually transfers the new firmware to the sub-device via Bluetooth connection. During the transmission process, the gateway and sub-device will verify the correctness of each part of the data in real time to ensure that the firmware file is complete and correct.

[0084] Bluetooth slave device restart: After receiving the complete firmware file, the slave device starts to update the firmware. After the firmware update is successful, the slave device will automatically restart to load the new firmware and resume normal mode operation.

[0085] Sub-device resumes normal operation: After the restart is complete, the sub-device restarts all functional modules, exits the safe mode, and returns to normal operation. The monitoring module rechecks various parameters, and after confirming that the device has returned to normal, it sends the status update to the gateway and the cloud, ending this exception handling and update process.

[0086] The exception handling solution provided in this application can be applied to the fields of Internet of Things (IoT) and consumer electronics, such as: smart home, home appliances, lighting, electrical engineering and other IoT system equipment control application fields, especially smart home devices, networked home appliances and other smart hardware devices that need to be remotely managed and updated. It can be widely used in, including but not limited to, smart lighting systems, smart security equipment, smart speakers, smart home appliances, health monitoring equipment, etc., and can improve the stability, maintainability and user experience of the equipment. It involves the anomaly detection and firmware recovery technology of smart devices, including anomaly detection algorithms, automatic security mode switching mechanisms, and systems that maintain device operability through OTA firmware updates, especially Wi-Fi smart devices. In the case of abnormal startup, system crash or instability, the continuous availability of the device is ensured by automatically detecting and entering the safe mode.

[0087] It can be seen that when the smart device in the embodiment of the present application detects an abnormal operating status of the device, it enters a safe operation mode, shuts down non-essential functions, reduces device power consumption, avoids further failures, retains communication functions and OTA upgrade functions, reports abnormal information to the cloud server, and completes the OTA upgrade of the new version of the firmware. In this way, there is no need for complicated operations, which can reduce the operational complexity of the smart device's recovery under abnormal circumstances, reduce maintenance costs, and improve user experience.

[0088] See also Figure 5 As shown, an exception handling device is applied to a smart device, comprising:

[0089] The operation status monitoring module 11 is used to monitor the operation status of the equipment;

[0090] The operation mode control module 12 is used to control the smart device to enter a safe operation mode when the operation status monitoring module detects that the operation status of the device meets a preset abnormal condition, wherein the safe operation mode is a working mode in which non-critical functions are turned off and communication functions and OTA upgrade functions are retained;

[0091] The abnormal information reporting module 13 is used to report the abnormal information to the cloud server so that the cloud server can push the new version of the firmware to the smart device;

[0092] A new version firmware receiving module 14, used to receive the new version firmware pushed by the cloud server;

[0093] The new version firmware upgrade module 15 is used to perform OTA upgrade based on the new version firmware.

[0094] Among them, the operation status monitoring module 11 is specifically used to: monitor the number of abnormal startups and / or system logs of the smart device, wherein the abnormal startup means that the time interval between two consecutive startups is less than the preset time interval; accordingly, the device operation status meets the preset abnormal conditions, including: the number of abnormal startups reaches a preset number threshold, and / or a preset type of error appears in the system log.

[0095] Furthermore, the operation status monitoring module 11 can be specifically used to read the count value of the startup counter to obtain the number of abnormal startups of the smart device; wherein the count value of the startup counter increases after the smart device is started, and is cleared when the running time of the smart device reaches the preset time interval.

[0096] The device may also include a verification module for performing integrity verification and signature verification on the new version of firmware after the new version of firmware receiving module 14 receives the new version of firmware pushed by the cloud server. If the new version of firmware passes the integrity verification and signature verification, the step of performing OTA upgrade based on the new version of firmware is triggered.

[0097] Furthermore, the device also includes a startup control module, which is used to automatically restart and enter a normal operating mode after the new version firmware upgrade module 15 performs OTA upgrade based on the new version firmware, wherein the normal operating mode is a working mode in which the non-critical functions, the communication function and the OTA upgrade function are all enabled.

[0098] Furthermore, the device also includes a notification module, which is used to send the abnormal information to the operation and maintenance personnel terminal through a preset communication channel after entering the safe operation mode, so that the operation and maintenance personnel terminal can push the new version of the firmware to the cloud server.

[0099] In an optional implementation, the abnormal information reporting module 13 may specifically broadcast the abnormal information via Bluetooth, so that when the Bluetooth gateway device receives the abnormal information, the abnormal information is reported to the cloud server;

[0100] Correspondingly, the new version firmware receiving module 14 is specifically used to establish a Bluetooth connection with a Bluetooth gateway device, and receive the new version firmware pushed by the cloud server through the Bluetooth gateway device based on the Bluetooth connection.

[0101] It can be seen that when the smart device in the embodiment of the present application detects an abnormal operating status of the device, it enters a safe operation mode, shuts down non-essential functions, reduces device power consumption, avoids further failures, retains communication functions and OTA upgrade functions, reports abnormal information to the cloud server, and completes the OTA upgrade of the new version of the firmware. In this way, there is no need for complicated operations, which can reduce the operational complexity of the smart device's recovery under abnormal circumstances, reduce maintenance costs, and improve user experience.

[0102] See also Figure 6 As shown, an embodiment of the present application discloses an electronic device 20, including a processor 21 and a memory 22; wherein the memory 22 is used to store a computer program; the processor 21 is used to execute the computer program, and the exception handling method disclosed in the above embodiment.

[0103] For the specific process of the above exception handling method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0104] Furthermore, the memory 22 as a carrier for storing resources may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the storage method may be temporary storage or permanent storage.

[0105] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; wherein the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0106] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the exception handling method disclosed in the aforementioned embodiment.

[0107] For the specific process of the above exception handling method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0108] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0109] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0110] The above is a detailed introduction to an exception handling method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An exception handling method, characterized in that: Applied to smart devices, including: Monitor equipment operating status; When it is detected that the operating state of the device meets the preset abnormal conditions, the device enters a safe operation mode, wherein the safe operation mode is a working mode in which non-critical functions are turned off, communication functions and OTA upgrade functions are retained; Reporting abnormal information to the cloud server so that the cloud server can push the new version of firmware to the smart device; Receive the new version of the firmware pushed by the cloud server, and perform OTA upgrade based on the new version of the firmware.

2. The exception handling method according to claim 1, characterized in that: The monitoring device operation status includes: Monitoring the number of abnormal startups and / or system logs of the smart device, wherein the abnormal startup refers to the time interval between two consecutive startups being less than a preset time interval; Accordingly, the device operation status satisfies a preset abnormal condition, including: the number of abnormal startups reaches a preset number threshold, and / or a preset type of error appears in the system log.

3. The exception handling method according to claim 2, characterized in that: The monitoring of abnormal startup times of the smart device includes: Read the count value of the startup counter to obtain the number of abnormal startups of the smart device; The startup counter increases its count value after the smart device is started, and is cleared when the running time of the smart device reaches the preset time interval.

4. The exception handling method according to claim 1, characterized in that: After receiving the new version of the firmware pushed by the cloud server, the method further includes: Integrity verification and signature verification are performed on the new version of the firmware. If the new version of the firmware passes the integrity verification and signature verification, the step of performing OTA upgrade based on the new version of the firmware is triggered.

5. The exception handling method according to claim 1, characterized in that: After the OTA upgrade is performed based on the new version of the firmware, the method further includes: Automatically restart and enter a normal operating mode, wherein the normal operating mode is a working mode in which the non-critical functions, the communication function, and the OTA upgrade function are all enabled.

6. The exception handling method according to claim 1, characterized in that: After entering the safe operation mode, the method further includes: The abnormal information is sent to the operation and maintenance personnel terminal through a preset communication channel so that the operation and maintenance personnel terminal can push the new version of the firmware to the cloud server.

7. The exception handling method according to any one of claims 1 to 6, characterized in that: The reporting of abnormal information to the cloud server includes: Broadcasting abnormal information via Bluetooth, so that when a Bluetooth gateway device receives the abnormal information, the abnormal information is reported to a cloud server; Correspondingly, the receiving the new version of the firmware pushed by the cloud server includes: establishing a Bluetooth connection with a Bluetooth gateway device, and receiving the new version of the firmware pushed by the cloud server through the Bluetooth gateway device based on the Bluetooth connection.

8. An exception handling device, characterized in that: Applied to smart devices, including: Operation status monitoring module, used to monitor the operation status of equipment; An operation mode control module, configured to control the smart device to enter a safe operation mode when the operation status monitoring module detects that the operation status of the device meets a preset abnormal condition, wherein the safe operation mode is a working mode in which non-critical functions are turned off and communication functions and OTA upgrade functions are retained; An abnormal information reporting module, used to report abnormal information to a cloud server so that the cloud server can push a new version of the firmware to the smart device; A new version firmware receiving module, used to receive the new version firmware pushed by the cloud server; The new version firmware upgrade module is used to perform OTA upgrade based on the new version firmware.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the exception handling method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the exception handling method according to any one of claims 1 to 7 is implemented.