WO2023103755A1 - Terminal starting method, electronic device, and computer-readable storage medium - Google Patents

Terminal starting method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
WO2023103755A1
WO2023103755A1 PCT/CN2022/133132 CN2022133132W WO2023103755A1 WO 2023103755 A1 WO2023103755 A1 WO 2023103755A1 CN 2022133132 W CN2022133132 W CN 2022133132W WO 2023103755 A1 WO2023103755 A1 WO 2023103755A1
Authority
WO
WIPO (PCT)
Prior art keywords
flash memory
terminal
abnormality
file system
startup
Prior art date
Application number
PCT/CN2022/133132
Other languages
French (fr)
Chinese (zh)
Inventor
郭涛
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023103755A1 publication Critical patent/WO2023103755A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1417Boot up procedures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata

Definitions

  • Embodiments of the present disclosure relate to but are not limited to the communication field, and in particular, relate to a method for starting a terminal, an electronic device, and a computer-readable storage medium.
  • Terminal products need to constantly modify various parameter configurations during operation, such as wireless fidelity (Wi-Fi, Wireless Fidelity), Bluetooth and other related parameter configurations.
  • Wi-Fi wireless fidelity
  • Wireless Fidelity Wireless Fidelity
  • Bluetooth wireless Fidelity
  • the modification of some parameter configurations will cause the modification of the file system (FS, File System) in the flash memory.
  • FS File System
  • the file system in the flash memory will be abnormal, and the terminal cannot be restarted normally.
  • the present disclosure provides a method for starting a terminal, an electronic device, and a computer-readable storage medium.
  • an embodiment of the present disclosure provides a method for starting a terminal, including: in the case of a start-up exception, judging whether the start-up exception is caused by an abnormality in the flash memory of the terminal, wherein the flash memory stores There is a file system and a current variable parameter configuration, wherein the current variable parameter configuration is a variable parameter configured before the abnormality is started; when the judgment result is yes, the content of the flash memory is restored, and the content includes The file system and current varargs configuration.
  • an embodiment of the present disclosure provides an electronic device, the electronic device includes: at least one processor; a memory on which at least one program is stored, when the at least one program is processed by the at least one executed by a processor, so that the at least one processor implements the terminal startup method described in any one of the first aspect; at least one I/O interface, connected between the processor and the memory, is configured to implement the processing Information exchange between the device and the memory.
  • an embodiment of the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any item in the first aspect is implemented. The method for starting the terminal.
  • Fig. 1 is a flowchart of a method for starting a terminal provided by an embodiment of the present disclosure.
  • Fig. 2 is a flowchart of some steps in a method for starting a terminal provided by an embodiment of the present disclosure.
  • Fig. 3 is a flowchart of some steps in a method for starting a terminal provided by an embodiment of the present disclosure.
  • Fig. 4 is a flow chart of a method for starting a terminal provided by an embodiment of the present disclosure.
  • Fig. 5 is a flowchart of a backup method provided by an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of a backup method provided by an embodiment of the present disclosure.
  • Fig. 7 is a schematic flow chart of judging the cause of abnormal startup according to the fault phenomenon provided by the embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of a file system restoration process in a method for starting a terminal provided by an embodiment of the present disclosure.
  • FIG. 9 is a schematic flowchart of a backup manner provided by an embodiment of the present disclosure.
  • Fig. 10 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
  • Fig. 11 is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
  • non-volatile flash memory (flash) storage devices are often used on terminal equipment to store system files and user data.
  • flash non-volatile flash memory
  • NAND flash non-type flash memory
  • this device has excellent characteristics such as small size, fast access speed, low power and shock resistance.
  • the device is accidentally powered off, due to its unpredictability, the contents of the NAND flash may be lost or confused.
  • the file system will face the risk of collapse, which poses a great threat to the reliability and stability of the device and greatly reduces the user experience.
  • the inventors have found that for non-volatile flash memory, taking NAND flash as an example, the file system abnormality is first detected through a comprehensive detection mechanism, and the In the final analysis, the abnormality of the file system is the problem that the abnormal flash causes the system to fail to start normally. According to the abnormal phenomenon, the corresponding flash content can be erased and rewritten to restore the flash content.
  • NAND flash can be divided into partitions, and different partitions store different content. For security reasons, specific partitions can be made read-only. However, during the normal operation of the file system, these partitions need to be read and written. Therefore, partitions with file systems and business-related partitions cannot be read-only. Aiming at the abnormal problem of the file system of these readable and writable partitions, the inventor’s solution is divided into two steps: first, detect the fault of flash abnormality through software; second, restore it when such fault is detected, and can Normally restore the content in the flash to ensure the normal startup of the system. Specifically, the inventor proposes a solution to automatically solve the abnormality of the flash memory file system during the startup process of the terminal.
  • Different problem phenomena determine whether the fault is related to the abnormality of the flash memory, and then restore the contents of the flash memory, and finally complete the solution to this type of fault.
  • the content of the files backed up in the flash memory can be updated through the update mechanism, and the content saved during the use of the file system can also be restored to the latest state, reducing data loss and maintaining system stability.
  • an embodiment of the present disclosure provides a method for starting a terminal, as shown in FIG. 1 , including the following steps:
  • step S100 in the case of a startup abnormality, it is judged whether the startup abnormality is caused by an abnormality in the flash memory of the terminal, wherein the flash memory stores a file system and the current variable parameter configuration, wherein the current The variable parameter configuration is the variable parameter configured before the exception is started;
  • step S200 when the judgment result is yes, the content of the flash memory is restored, and the content includes the file system and the current variable parameter configuration.
  • the present disclosure is aimed at startup abnormalities related to flash memory abnormalities, and such startup abnormal problems can be solved by restoring the contents of the flash memory. If the startup abnormality has nothing to do with the abnormality of the flash memory, and even restoring the contents of the flash memory cannot solve the problem, you need to solve the specific cause of the fault. Therefore, the first thing to do in this disclosure is to start with the cause of the startup abnormality, determine which fault phenomena are related to the abnormality of the flash memory, and then when the system detects that the startup abnormality occurs, record the fault phenomenon in the log, startup information, etc.
  • the software Carry out analysis and automatically judge whether the cause of the startup abnormality is caused by the abnormality of the flash memory according to the correlation between the fault phenomenon and the abnormality of the flash memory.
  • the detected startup abnormality is caused by an abnormal flash memory, it triggers a restoration operation using the backup flash memory content, and restarts the system to return to normal after the restoration is complete.
  • the contents of the backed up flash memory also include parameter configurations modified during operation, so as to ensure the continuity and stability of the system operation.
  • the solution adopted in the present disclosure does not add more hardware, which saves hardware cost and hardware space.
  • the solution adopted in this application can not only back up the file system but also back up the current variable parameter configuration, so when restoring, the file system can be restored to the most recent state, without having to return to the parameter configuration at the factory.
  • the flash memory is NAND flash.
  • non-volatile NAND flash is taken as an example to explain the cause judgment of startup abnormality, restoration process, data backup and other processes.
  • the judging whether the startup abnormality is caused by an abnormality in the flash memory of the terminal includes:
  • step S111 it is judged whether the number of restarts caused by the failure to initialize the file system content during startup reaches a predetermined number of times;
  • step S112 when the determination result is yes, it is determined that the startup abnormality is caused by the abnormality of the flash memory.
  • the judging whether the startup abnormality is caused by an abnormality in the flash memory of the terminal includes:
  • step S121 analyze the system log
  • step S122 if there is a log satisfying the predetermined condition, it is determined that the startup abnormality is caused by an abnormality in the flash memory.
  • the underlying driver of the flash memory is abnormal, and data bits in the kernel are flipped.
  • abnormal flash faults There are two types of abnormal flash faults. (1) There is a crash in the underlying driver of the flash, or a data bit flip occurs in the kernel. At this time, it is possible to detect which part of the content has changed from the analysis of the log of the crash, so as to determine that it can be solved by means of backup and restoration. (2) The content of the file system is damaged. If there is a file system content initialization failure at boot time, the number of boot times when the file system content initialization failure occurs is logged. If it is detected that the system has been restarted multiple times during the boot phase, it means that the content in the file system has been damaged, and the file system restoration function needs to be triggered and executed.
  • the recovery methods for the two types of exceptions mentioned above can also be divided into two situations.
  • One situation is that other readable and writable partitions other than the file system cannot be loaded normally due to abnormal data, resulting in a crash.
  • the restoration mechanism is started, and the device is restarted after the restoration is completed and the device can be started normally.
  • Another situation is that an abnormality occurs in the file system.
  • it is necessary to set a partition in the partition in advance to store the startup abnormality flag in advance. System exceptions are counted when file system initialization failures occur. The system will reboot after initialization failure.
  • the boot phase After restarting, the boot phase will read the exception flag from the partition storing the exception flag. If the number of reboots recorded by this flag reaches the preset threshold of reboots (for example, the threshold of reboots is 5 and the number of reboots reaches 5), start the file system restoration mechanism in the boot phase to refresh the file system, and then reboot equipment. If it starts normally, the fault problem is solved.
  • the preset threshold of reboots for example, the threshold of reboots is 5 and the number of reboots reaches 5
  • the first category is that the device freezes.
  • the content of the flash partition was flipped during the kernel loading process. From the process of starting the kernel, it can be detected which partition cannot be executed and crashes. At this time, you can write the failed flag to the flash partition where the mount failed, and then read the failed flag type after starting from the boot stage again, call the restore mechanism, and refresh the content of the corresponding partition.
  • This flag type can be defined according to different readable and writable partitions, so that the corresponding partitions can be restored during the startup phase.
  • the second category is that the file system is abnormal.
  • the file system is an independent partition, which is mainly used to store parameters related to the device's Internet access or Wi-Fi and Bluetooth. This partition is constantly having read and write operations during system operation. If an abnormal power failure such as unstable power supply occurs, it is easy to destroy the content of the file system that is undergoing read and write operations, making the system unable to work normally, resulting in crashes and continuous restarts.
  • This type of failure has a characteristic, that is, because the file system is abnormal, an error will occur when the file system is initialized during the startup process. Take advantage of this feature to count system exceptions where file system initialization fails.
  • the device restarts repeatedly and is detected during the boot phase after the restart. When multiple abnormal startups are detected, it is confirmed that the file system is abnormal. At this time, the restoration function of the file system can be executed in the boot stage, and the abnormal flag can be cleared. After the restoration is complete, the contents of the file system are repaired and can be started normally.
  • the restarting method of the terminal before steps S100 and S200, the restarting method of the terminal further includes:
  • step S300 the content of the flash memory is saved to the backup partition of the flash memory, wherein the content of the flash memory includes the file system and the current variable parameter configuration, which is used to perform the restoration of the content of the flash memory step.
  • the content of the flash memory also includes: partition data other than the file system.
  • variable parameter configuration includes but not limited to: Wi-Fi parameter configuration and/or Bluetooth parameter configuration.
  • the solution to the two types of faults mentioned above is that the content of the flash is abnormal. According to the characteristics of NAND flash, if there is an error in the content, the problem can be completely solved only after the content is erased and rewritten. The resolution of both types of failures requires a restore operation. Because the partition with content error must be readable and writable, the content of the flash will change greatly during the operation of the system. If it is not updated in time, the content of the backup can only be the content of the original backup, or even the content of the factory. Variable parameter configurations modified during system operation, Wi-Fi parameter configurations and/or Bluetooth parameter configurations, and new content and business data in partitions other than the file system.
  • the content of described flash memory is saved to the backup partition of flash memory, comprising:
  • step S311 the upgrade version of the file system is found by downloading the FOTA (Firmware Over-The-Air) mode of the firmware over the air;
  • FOTA Wireless Over-The-Air
  • step S312 after saving the content of the flash memory to the backup partition, upgrade the file system saved in the backup partition to the upgraded version.
  • saving the contents of the flash memory to the backup partition of the flash memory includes:
  • step S321 periodically save the current contents of the flash memory to the backup partition.
  • the embodiment of the present disclosure provides two ways to update flash content.
  • the FOTA upgrade time interval in the above method (1) is long, and the system has been running for a long time, but still cannot get a timely backup, then during this period, there may be more users and Internet users on the file system. information.
  • a periodic timer is added according to a certain period, and when the timer expires, it is triggered to update the backup content in the backup partition according to the content of the readable and writable partition. After the backup is complete, reset the timer to prepare for the next backup.
  • the saving the contents of the flash memory to the backup partition of the flash memory includes:
  • the embodiment of the present disclosure also combines the two methods, taking into account the advantages of both, and obtains the third update method: while adding the content of the backup partition to the FOTA update mechanism, a periodic update task is also started.
  • Backup can be triggered not only through FOTA upgrade, but also through periodic timer.
  • the periodic timer will also be reset. In this way, the backup system can be upgraded in time according to the FOTA upgrade mechanism, and the problem of untimely backup caused by the possible long interval of FOTA upgrade can be solved.
  • an exception occurs during the normal operation of the system, and the system cannot be started normally.
  • the system startup software detects an abnormality and judges the cause of the abnormality.
  • the processing process can also be divided into two cases.
  • One situation is that other readable and writable partitions other than the file system cannot be loaded normally due to abnormal data, resulting in a crash, and the software detects that a certain partition fails to mount.
  • the recovery mechanism is triggered after an abnormality is detected in the kernel.
  • the restore mechanism detected abnormal partition contents. After the restoration is complete, restart the device, and it can start normally; in another case, the contents of the file system are abnormal, initialization fails, and the system restarts repeatedly.
  • the restoration method performed in this embodiment is also divided into two situations.
  • the first type of startup exception is that the device crashes.
  • the content of the flash partition was flipped during the kernel loading process.
  • This flag type can be defined according to different readable and writable partitions, so that the corresponding partitions can be restored during the startup phase.
  • the second type of startup exception is that the file system is abnormal.
  • a partition for reading and writing exception flag bits is added in the flash. Read the abnormal flag during the boot phase to determine the way to restart.
  • the file system is an independent partition, which is mainly used to store related parameters such as device Internet access or Wi-Fi and Bluetooth. This partition is constantly having read and write operations during system operation. If an abnormal power failure such as unstable power supply occurs, it is easy to destroy the content of the file system that is undergoing read and write operations, so that the system cannot work normally, and then crashes and restarts repeatedly. This type of failure has a characteristic. If the file system is abnormal and restarts repeatedly, an error will occur when initializing the file system during the startup process.
  • the system can sense the new system version in time, and first automatically back up the content in the flash, including the file system, parameter configuration, and data in other partitions other than the file system partition. After the backup is completed, perform FOTA online upgrade .
  • the backed up system has been upgraded through FOTA upgrade and the flash content has been backed up once before the FOTA upgrade, in order to avoid too frequent backups in the two ways of FOTA online upgrade and periodic update, after the FOTA upgrade triggers the backup, regardless of Whether or not the time interval of the periodic timer expires, the periodic timer will be reset, and the timer will count again.
  • the time interval between two FOTA upgrades may be long. Even if FOTA has not been upgraded for a long time, the backup function will be triggered when the periodic timer expires, and the content of the backup partition will be updated. After the update is completed, reset the periodic Timer to prepare for the next backup.
  • an embodiment of the present disclosure provides an electronic device, as shown in FIG. 10 , which includes:
  • At least one processor 501 At least one processor 501;
  • Memory 502 on which at least one program is stored, and when at least one program is executed by at least one processor, at least one processor implements the method for starting a terminal as described in any one of the above first aspects;
  • At least one I/O interface 503 is connected between the processor and the memory, and is configured to realize information exchange between the processor and the memory.
  • the processor 501 is a device with data processing capability, which includes but not limited to a central processing unit (CPU), etc.
  • the memory 502 is a device with data storage capability, which includes but not limited to random access memory (RAM, more specifically such as SDRAM, DDR, etc.), read-only memory (ROM), electrified erasable programmable read-only memory (EEPROM), flash memory (FLASH); I/O interface (read-write interface) 503 is connected in processor 501 Between the processor 501 and the memory 502, information exchange between the processor 501 and the memory 502 can be realized, which includes but not limited to a data bus (Bus) and the like.
  • a data bus Buss
  • the processor 501 , the memory 502 and the I/O interface 503 are connected to each other through the bus 504 , and further connected to other components of the computing device.
  • an embodiment of the present disclosure provides a computer-readable storage medium. As shown in FIG. 11 , a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned first aspects is implemented. The method for starting the terminal.
  • the terminal startup method proposed in this disclosure when the terminal device starts abnormally, judges through the software according to the fault phenomenon whether the startup abnormality is caused by an abnormality in the flash memory of the terminal, and then automatically restores the file system and the variable parameter configuration modified during system operation, Repair the file system and restart the terminal normally. It is also possible to restore the content saved during the use of the file system to the latest state by updating the backup file, reducing data loss and maintaining system stability.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute.
  • Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit .
  • a processor such as a central processing unit, digital signal processor, or microprocessor
  • Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Retry When Errors Occur (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a terminal starting method, an electronic device, and a computer-readable storage medium. The terminal starting method comprises: when a start anomaly occurs, determining whether the start anomaly is caused by an anomaly of a flash memory of a terminal, a file system and a current variable parameter configuration being stored in the flash memory; and if yes, restoring the content of the flash memory, the content comprising the file system and the current variable parameter configuration.

Description

终端的启动方法、电子设备和计算机可读存储介质Terminal startup method, electronic device, and computer-readable storage medium
相关公开的交叉引用Related Publication Cross-References
本公开要求在2021年12月10日提交国家知识产权局、公开号为CN202111509385.0、发明名称为“终端的启动方法、电子设备和计算机可读存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application submitted to the State Intellectual Property Office on December 10, 2021, with the publication number CN202111509385.0, and the title of the invention is "Terminal startup method, electronic device and computer-readable storage medium". The entire content of the application is incorporated by reference in this disclosure.
技术领域technical field
本公开的实施例涉及但不限于通信领域,尤其涉及一种终端的启动方法、电子设备和计算机可读存储介质。Embodiments of the present disclosure relate to but are not limited to the communication field, and in particular, relate to a method for starting a terminal, an electronic device, and a computer-readable storage medium.
背景技术Background technique
终端产品在运行时都需要不断地修改各种参数配置,比如无线保真(Wi-Fi,Wireless Fidelity)、蓝牙等相关的参数配置。其中,对一些参数配置的修改,会引起对闪存中文件***(FS,File System)的修改。在频繁的修改过程中,若终端产品掉电,则会导致闪存中的文件***发生异常,进而导致无法正常重启终端。Terminal products need to constantly modify various parameter configurations during operation, such as wireless fidelity (Wi-Fi, Wireless Fidelity), Bluetooth and other related parameter configurations. Among them, the modification of some parameter configurations will cause the modification of the file system (FS, File System) in the flash memory. During the frequent modification process, if the terminal product is powered off, the file system in the flash memory will be abnormal, and the terminal cannot be restarted normally.
发明内容Contents of the invention
本公开提供一种终端的启动方法、电子设备和计算机可读存储介质。The present disclosure provides a method for starting a terminal, an electronic device, and a computer-readable storage medium.
第一方面,本公开的一个实施例提供了一种终端的启动方法,包括:在发生启动异常的情况下,判断是否因终端的闪存发生异常导致所述启动异常,其中,所述闪存中存储有文件***和当前的可变参数配置,其中,所述当前的可变参数配置为启动异常前配置完成的可变参数;当判断结果为是时,还原所述闪存的内容,所述内容包括所述文件***和当前的可变 参数配置。In the first aspect, an embodiment of the present disclosure provides a method for starting a terminal, including: in the case of a start-up exception, judging whether the start-up exception is caused by an abnormality in the flash memory of the terminal, wherein the flash memory stores There is a file system and a current variable parameter configuration, wherein the current variable parameter configuration is a variable parameter configured before the abnormality is started; when the judgment result is yes, the content of the flash memory is restored, and the content includes The file system and current varargs configuration.
第二方面,本公开的一个实施例提供了一种电子设备,所述电子设备包括:至少一个处理器;存储器,其上存储有至少一个程序,当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现第一方面中任意一项所述的终端的启动方法;至少一个I/O接口,连接在所述处理器与存储器之间,配置为实现所述处理器与存储器的信息交互。In the second aspect, an embodiment of the present disclosure provides an electronic device, the electronic device includes: at least one processor; a memory on which at least one program is stored, when the at least one program is processed by the at least one executed by a processor, so that the at least one processor implements the terminal startup method described in any one of the first aspect; at least one I/O interface, connected between the processor and the memory, is configured to implement the processing Information exchange between the device and the memory.
第三方面,本公开的一个实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面中任意一项所述的终端的启动方法。In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any item in the first aspect is implemented. The method for starting the terminal.
附图说明Description of drawings
图1是本公开实施例提供的一种终端的启动方法的流程图。Fig. 1 is a flowchart of a method for starting a terminal provided by an embodiment of the present disclosure.
图2是本公开实施例提供的一种终端的启动方法中部分步骤的流程图。Fig. 2 is a flowchart of some steps in a method for starting a terminal provided by an embodiment of the present disclosure.
图3是本公开实施例提供的一种终端的启动方法中部分步骤的流程图。Fig. 3 is a flowchart of some steps in a method for starting a terminal provided by an embodiment of the present disclosure.
图4是本公开实施例提供的一种终端的启动方法的流程图。Fig. 4 is a flow chart of a method for starting a terminal provided by an embodiment of the present disclosure.
图5是本公开实施例提供的一种备份方式的流程图。Fig. 5 is a flowchart of a backup method provided by an embodiment of the present disclosure.
图6是本公开实施例提供的一种备份方式的流程图。FIG. 6 is a flowchart of a backup method provided by an embodiment of the present disclosure.
图7是本公开实施例提供的根据故障现象判断启动异常原因的流程示意图。Fig. 7 is a schematic flow chart of judging the cause of abnormal startup according to the fault phenomenon provided by the embodiment of the present disclosure.
图8是本公开实施例提供的一种终端的启动方法中文件***还原流程示意图。FIG. 8 is a schematic diagram of a file system restoration process in a method for starting a terminal provided by an embodiment of the present disclosure.
图9是本公开实施例提供的一种备份方式的流程示意图。FIG. 9 is a schematic flowchart of a backup manner provided by an embodiment of the present disclosure.
图10是本公开实施例提供的一种电子设备的示意图。Fig. 10 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
图11是本公开实施例提供的一种计算机可读存储介质的示意图。Fig. 11 is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。It should be understood that the specific embodiments described here are only used to explain the present disclosure, not to limit the present disclosure.
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本公开的说明,其本身没有特有的意义。因此,“模块”、“部件”或“单元”可以混合地使用。In the subsequent description, use of suffixes such as 'module', 'part' or 'unit' for denoting elements is only for facilitating description of the present disclosure and has no specific meaning by itself. Therefore, 'module', 'part' or 'unit' may be used in combination.
目前终端设备上常采用非易失性闪存(flash)存储器件来存储***文件和用户数据。常见的存储芯片与非型闪存(NAND flash),该器件具有体积小、访问速度快、功率小及抗震等优良特性。但是如果设备在意外掉电时,由于其不可预知性,可能会导致NAND flash的内容丢失或者发生错乱。一旦发生错乱,文件***就会面临崩溃的风险,对设备的可靠性和稳定性造成很大的威胁,大大降低了用户体验。At present, non-volatile flash memory (flash) storage devices are often used on terminal equipment to store system files and user data. Common memory chips and non-type flash memory (NAND flash), this device has excellent characteristics such as small size, fast access speed, low power and shock resistance. However, if the device is accidentally powered off, due to its unpredictability, the contents of the NAND flash may be lost or confused. Once a disorder occurs, the file system will face the risk of collapse, which poses a great threat to the reliability and stability of the device and greatly reduces the user experience.
在相关的技术中,在软件上和硬件上有一些相应的解决方案。例如,硬件上在电路中增加一个大的电容。如果出现异常掉电时,电容的电压还能维持让flash的操作执行完成,这样不至于让flash的操作进行到一半就出现断电的情况。但是这个方案提高了硬件成本。又例如,软件上加密文件***(EFS,Encrypting File System)分区做备份。如果启动时检测到是EFS分区的内容被损坏导致死机的,那么通过将EFS分区重新擦除,并将出厂时备份的EFS分区内容还原到EFS分区,再让设备重启来解决该问题。但EFS使用期间存储的内容则无法还原。目前的这些方法并不能覆盖所有的flash异常的情况,针对以上的不足,发明人研究发现,对于非易失性闪存,以NAND flash为例,通过全面的检测机制先检测到文件***异常,而文件***的异常归根到底就是flash异常导致***无法正常启动的问题,可以根据异常现象对相应的flash内容进行擦写操作,重新还原flash的内容。In related technologies, there are some corresponding solutions in terms of software and hardware. For example, adding a large capacitor to the circuit in hardware. If there is an abnormal power failure, the voltage of the capacitor can still be maintained to allow the flash operation to complete, so that the flash operation will not be cut off halfway through. But this solution increases the hardware cost. Another example is the Encrypting File System (EFS, Encrypting File System) partition on the software for backup. If it is detected that the content of the EFS partition is damaged and the system crashes during startup, then the problem can be solved by re-erasing the EFS partition, restoring the contents of the EFS partition that was backed up at the factory to the EFS partition, and restarting the device. However, the content stored during EFS use cannot be restored. These current methods cannot cover all flash abnormalities. In view of the above deficiencies, the inventors have found that for non-volatile flash memory, taking NAND flash as an example, the file system abnormality is first detected through a comprehensive detection mechanism, and the In the final analysis, the abnormality of the file system is the problem that the abnormal flash causes the system to fail to start normally. According to the abnormal phenomenon, the corresponding flash content can be erased and rewritten to restore the flash content.
NAND flash可以进行分区划分,不同的分区存放不同的内容。为了安全起见,可以对特定的分区做只读化处理。但是在文件***正常工作中,需要对这些分区进行读写操作,因此有文件***的分区以及和业务相关的分区,是不能做只读化处理的。针对这些可读写分区的文件***异常的问题,发明人的解决思路分为两个步骤:第一,通过软件检测出flash异常的 故障;第二,当检测出该类故障时进行还原,能够正常地还原flash中的内容,保证***正常启动。具体地,发明人提出了一种在终端启动过程中自动解决闪存文件***异常的方案,其基本构思为:先通过故障现象或者死机日志等问题的现场记录下的信息,对故障进行分类,针对不同的问题现象判断故障是否与闪存异常有关,然后对闪存中的内容进行还原操作,最终全面完成该类故障的解决。此外,还可以通过更新机制对闪存中备份的文件内容进行更新,将文件***使用期间保存的内容也恢复到最近的状态,减少数据丢失,维持***稳定。NAND flash can be divided into partitions, and different partitions store different content. For security reasons, specific partitions can be made read-only. However, during the normal operation of the file system, these partitions need to be read and written. Therefore, partitions with file systems and business-related partitions cannot be read-only. Aiming at the abnormal problem of the file system of these readable and writable partitions, the inventor’s solution is divided into two steps: first, detect the fault of flash abnormality through software; second, restore it when such fault is detected, and can Normally restore the content in the flash to ensure the normal startup of the system. Specifically, the inventor proposes a solution to automatically solve the abnormality of the flash memory file system during the startup process of the terminal. Different problem phenomena determine whether the fault is related to the abnormality of the flash memory, and then restore the contents of the flash memory, and finally complete the solution to this type of fault. In addition, the content of the files backed up in the flash memory can be updated through the update mechanism, and the content saved during the use of the file system can also be restored to the latest state, reducing data loss and maintaining system stability.
第一方面,本公开实施例提供一种终端的启动方法,如图1所示,包括如下步骤:In a first aspect, an embodiment of the present disclosure provides a method for starting a terminal, as shown in FIG. 1 , including the following steps:
在步骤S100中,在发生启动异常的情况下,判断是否因终端的闪存发生异常导致所述启动异常,其中,所述闪存中存储有文件***和当前的可变参数配置,其中,所述当前的可变参数配置为启动异常前配置完成的可变参数;In step S100, in the case of a startup abnormality, it is judged whether the startup abnormality is caused by an abnormality in the flash memory of the terminal, wherein the flash memory stores a file system and the current variable parameter configuration, wherein the current The variable parameter configuration is the variable parameter configured before the exception is started;
在步骤S200中,当判断结果为是时,还原所述闪存的内容,所述内容包括所述文件***和当前的可变参数配置。In step S200, when the judgment result is yes, the content of the flash memory is restored, and the content includes the file system and the current variable parameter configuration.
需要说明的是,本公开所针对的是与闪存异常相关的启动异常,可通过还原闪存的内容解决此类启动异常问题。如果启动异常与闪存异常无关,即使还原闪存的内容也不能解决,则需针对具体的故障原因进行解决。因此,本公开首先要做的是根据启动异常产生的原因入手,确定哪些故障现象与闪存异常有关,之后在***检测到发生了启动异常时,通过软件对日志、启动信息等记录下的故障现象进行分析,根据故障现象与闪存异常的关联关系自动判断出本次启动异常的产生原因是否由闪存异常所导致。当检测到的启动异常是由闪存异常所导致时,触发用备份的闪存内容执行还原操作,还原结束后重启***恢复正常。其中,所备份的闪存内容除了包括文件***之外,还包括运行过程中修改过的参数配置,以保证***运行的连续性、稳定性。It should be noted that the present disclosure is aimed at startup abnormalities related to flash memory abnormalities, and such startup abnormal problems can be solved by restoring the contents of the flash memory. If the startup abnormality has nothing to do with the abnormality of the flash memory, and even restoring the contents of the flash memory cannot solve the problem, you need to solve the specific cause of the fault. Therefore, the first thing to do in this disclosure is to start with the cause of the startup abnormality, determine which fault phenomena are related to the abnormality of the flash memory, and then when the system detects that the startup abnormality occurs, record the fault phenomenon in the log, startup information, etc. through the software Carry out analysis, and automatically judge whether the cause of the startup abnormality is caused by the abnormality of the flash memory according to the correlation between the fault phenomenon and the abnormality of the flash memory. When the detected startup abnormality is caused by an abnormal flash memory, it triggers a restoration operation using the backup flash memory content, and restarts the system to return to normal after the restoration is complete. Wherein, besides the file system, the contents of the backed up flash memory also include parameter configurations modified during operation, so as to ensure the continuity and stability of the system operation.
与现有的硬件解决方案相比,本公开所采用的方案没有添加更多的硬件,节省了硬件成本和硬件空间。与现有的软件解决方案相比,本申请所 采用的方案不但可以备份文件***而且还备份当前的可变参数配置,因此在还原时,能够按照已备份的参数配置将文件***恢复到近期的状态,而不必重新回到出厂时的参数配置。Compared with the existing hardware solution, the solution adopted in the present disclosure does not add more hardware, which saves hardware cost and hardware space. Compared with existing software solutions, the solution adopted in this application can not only back up the file system but also back up the current variable parameter configuration, so when restoring, the file system can be restored to the most recent state, without having to return to the parameter configuration at the factory.
可选地,所述闪存为与非型闪存NAND flash。Optionally, the flash memory is NAND flash.
下文中均以非易失性的NAND flash为例对启动异常的原因判断、还原过程、数据备份等过程进行说明。In the following, non-volatile NAND flash is taken as an example to explain the cause judgment of startup abnormality, restoration process, data backup and other processes.
在一些实施例中,如图2所示,所述判断是否因终端的闪存发生异常导致所述启动异常,包括:In some embodiments, as shown in FIG. 2, the judging whether the startup abnormality is caused by an abnormality in the flash memory of the terminal includes:
在步骤S111中,判断因启动时发生文件***内容初始化失败导致的重启的次数是否达到预定次数;In step S111, it is judged whether the number of restarts caused by the failure to initialize the file system content during startup reaches a predetermined number of times;
在步骤S112中,当判断结果为是时,则判定因所述闪存发生异常导致所述启动异常。In step S112, when the determination result is yes, it is determined that the startup abnormality is caused by the abnormality of the flash memory.
在一些实施例中,如图3所示,所述判断是否因终端的闪存发生异常导致所述启动异常,包括:In some embodiments, as shown in FIG. 3, the judging whether the startup abnormality is caused by an abnormality in the flash memory of the terminal includes:
在步骤S121中,分析***日志;In step S121, analyze the system log;
在步骤S122中,若存在满足预定条件的日志,则判定因所述闪存发生异常导致所述启动异常。In step S122, if there is a log satisfying the predetermined condition, it is determined that the startup abnormality is caused by an abnormality in the flash memory.
进一步地,若所述***日志中出现以下异常中的至少一种异常,则判定为存在满足预定条件的日志:Further, if at least one of the following exceptions occurs in the system log, it is determined that there is a log satisfying the predetermined condition:
所述闪存的底层驱动异常、内核中数据位发生翻转。The underlying driver of the flash memory is abnormal, and data bits in the kernel are flipped.
异常掉电会导致flash的读写操作或者擦除操作中断,导致参数配置错误。因此重新启动运行时再次读写到已经发生错误的参数,就会出现故障,设备可能出现死机。如果是flash出现异常,那么该故障肯定会反复出现。为了解决该问题就需要增加标志记录重启的次数,反复出现时,需要对标志进行加1操作。如果这样的过程反复出现多次(例如,预设重启次数阈值为5,且重启的次数达到了5次),就可以判定是flash芯片内容发生了异常。这时就需要触发flash的还原机制来执行flash异常的还原操作。Abnormal power failure will interrupt the read and write operations or erase operations of the flash, resulting in parameter configuration errors. Therefore, when restarting the operation and reading and writing the wrong parameters again, a fault will occur, and the device may crash. If the flash is abnormal, then the fault will definitely appear repeatedly. In order to solve this problem, it is necessary to increase the number of flag record restarts, and when it occurs repeatedly, it is necessary to add 1 to the flag. If such a process occurs repeatedly (for example, the preset restart times threshold is 5, and the number of restarts reaches 5 times), it can be determined that the content of the flash chip is abnormal. At this time, it is necessary to trigger the restoration mechanism of the flash to perform the restoration operation of the flash exception.
Flash异常故障可分为两种。(1)在flash的底层驱动中出现死机,或者在内核中出现数据位发生翻转。此时,从死机的日志中分析可以检测出是哪部分内容发生改变,从而确定可通过备份还原的方式来解决。(2)文件***的内容发生损坏。如果在启动时出现文件***内容初始化失败,则在发生文件***内容初始化失败时会记录启动的次数。如果检测到在***引导(boot)阶段重启多次,说明是文件***中的内容发生了损坏导致,需要触发并执行文件***的还原功能。There are two types of abnormal flash faults. (1) There is a crash in the underlying driver of the flash, or a data bit flip occurs in the kernel. At this time, it is possible to detect which part of the content has changed from the analysis of the log of the crash, so as to determine that it can be solved by means of backup and restoration. (2) The content of the file system is damaged. If there is a file system content initialization failure at boot time, the number of boot times when the file system content initialization failure occurs is logged. If it is detected that the system has been restarted multiple times during the boot phase, it means that the content in the file system has been damaged, and the file system restoration function needs to be triggered and executed.
在***正常工作中出现异常,***无法正常启动时,针对前文所述的两类异常,其恢复方式也可以分两种情况。一种情况是,因为文件***之外的其它可读写分区因为数据的异常无法正常加载导致死机。这时,在内核中检测到异常后启动还原机制,在还原结束后重启设备且设备可以正常启动。另一种情况是,文件***发生异常,为了解决这种异常,需要提前在分区中设置一个专门存放启动异常标志的分区。在出现文件***初始化失败时,会对***异常进行计数,。初始化失败后***会重新启动。在重启之后boot阶段会从存放异常标志的分区读取异常标志。如果该标志记录的重启次数达到了预设的重启次数阈值(例如,重启次数阈值为5且重启次数达到5次),在boot阶段启动文件***的还原机制,实现文件***的重新刷新,然后重启设备。若正常启动,则故障问题解决。When an exception occurs during the normal operation of the system and the system fails to start normally, the recovery methods for the two types of exceptions mentioned above can also be divided into two situations. One situation is that other readable and writable partitions other than the file system cannot be loaded normally due to abnormal data, resulting in a crash. At this time, after an abnormality is detected in the kernel, the restoration mechanism is started, and the device is restarted after the restoration is completed and the device can be started normally. Another situation is that an abnormality occurs in the file system. In order to solve this abnormality, it is necessary to set a partition in the partition in advance to store the startup abnormality flag in advance. System exceptions are counted when file system initialization failures occur. The system will reboot after initialization failure. After restarting, the boot phase will read the exception flag from the partition storing the exception flag. If the number of reboots recorded by this flag reaches the preset threshold of reboots (for example, the threshold of reboots is 5 and the number of reboots reaches 5), start the file system restoration mechanism in the boot phase to refresh the file system, and then reboot equipment. If it starts normally, the fault problem is solved.
针对文件***的异常导致的死机或者其它***不正常的问题,根据文件***异常主要为两类故障,在本公开实施例中也通过软件分别执行相应的还原方法。As for the crash caused by the abnormality of the file system or other system abnormalities, there are mainly two types of faults according to the abnormality of the file system. In the embodiments of the present disclosure, corresponding restoration methods are also executed through software.
第一类是,设备出现死机。从死机现场分析来看是在内核加载过程中flash分区的内容发生翻转。从内核启动的过程中可以检测到具体是在挂载哪个分区时执行不下去死机的。这时,可以在挂载失败的地方将失败的标志写到flash分区中,然后再次从boot阶段启动后会读取失败的标志类型,调用还原机制,将对应分区的内容刷新进去。这个标志类型可以根据可读写分区的不同进行定义,以便在启动阶段还原对应的分区。The first category is that the device freezes. According to the analysis of the crash site, the content of the flash partition was flipped during the kernel loading process. From the process of starting the kernel, it can be detected which partition cannot be executed and crashes. At this time, you can write the failed flag to the flash partition where the mount failed, and then read the failed flag type after starting from the boot stage again, call the restore mechanism, and refresh the content of the corresponding partition. This flag type can be defined according to different readable and writable partitions, so that the corresponding partitions can be restored during the startup phase.
第二类是,文件***出现异常。文件***是独立的分区,主要用来存放设备上网或者Wi-Fi以及蓝牙相关的参数。这个分区在***运行过程中 都在不断的有读写操作。如果电源不稳定等异常掉电发生时,很容易破坏正在进行读写操作的文件***的内容,让***无法正常工作,从而出现死机,不断重启。这类故障有个特点,就是因为文件***出现异常,那么在启动过程中初始化文件***时就会出错。利用这一特点,在文件***初始化失败的位置对***异常进行计数。设备会反复重新启动,并且在重启后的boot阶段进行检测。在检测到多次异常启动时,确认是文件***出现了异常。此时,在boot阶段就可以执行文件***的还原功能,并清除异常标志。还原完成之后文件***内容被修复,可正常启动。The second category is that the file system is abnormal. The file system is an independent partition, which is mainly used to store parameters related to the device's Internet access or Wi-Fi and Bluetooth. This partition is constantly having read and write operations during system operation. If an abnormal power failure such as unstable power supply occurs, it is easy to destroy the content of the file system that is undergoing read and write operations, making the system unable to work normally, resulting in crashes and continuous restarts. This type of failure has a characteristic, that is, because the file system is abnormal, an error will occur when the file system is initialized during the startup process. Take advantage of this feature to count system exceptions where file system initialization fails. The device restarts repeatedly and is detected during the boot phase after the restart. When multiple abnormal startups are detected, it is confirmed that the file system is abnormal. At this time, the restoration function of the file system can be executed in the boot stage, and the abnormal flag can be cleared. After the restoration is complete, the contents of the file system are repaired and can be started normally.
在一些实施例中,如图4所示,在步骤S100和S200之前,该终端的重启方法还包括:In some embodiments, as shown in FIG. 4, before steps S100 and S200, the restarting method of the terminal further includes:
在步骤S300中,将所述闪存的内容保存到闪存的备份分区,其中,所述闪存的内容包括所述文件***和当前的可变参数配置,用于执行所述还原所述闪存的内容的步骤。In step S300, the content of the flash memory is saved to the backup partition of the flash memory, wherein the content of the flash memory includes the file system and the current variable parameter configuration, which is used to perform the restoration of the content of the flash memory step.
进一步地,所述闪存的内容还包括:文件***之外的分区数据。Further, the content of the flash memory also includes: partition data other than the file system.
可选地,所述可变参数配置包括但不限于:无线保真Wi-Fi的参数配置和/或蓝牙的参数配置。Optionally, the variable parameter configuration includes but not limited to: Wi-Fi parameter configuration and/or Bluetooth parameter configuration.
前文所述的两类故障的解决都是flash的内容发生了异常。根据NAND flash的特性,如果内容发生错误,只有将内容擦除后重新写入才能将问题彻底解决。这两类故障的解决过程都需要执行还原操作。因为出现内容错误的分区一定是可读写的,***运行过程中,flash的内容会有很大的变化。如果不及时更新,备份的内容就只能是最初备份的内容,甚至只是出厂的内容。***运行过程中修改的可变参数配置、Wi-Fi的参数配置和/或蓝牙的参数配置、以及除文件***之外的分区中新增的内容、业务数据等。若不及时备份,相对于正常运行的***而言,可能存在阴阳版本,即当前运行的***与备份的***版本不同。因此,就需要对可读写的分区在进行内容备份的同时还需要做定期更新,如果出现启动异常,所还原的内容将是比较新的内容。The solution to the two types of faults mentioned above is that the content of the flash is abnormal. According to the characteristics of NAND flash, if there is an error in the content, the problem can be completely solved only after the content is erased and rewritten. The resolution of both types of failures requires a restore operation. Because the partition with content error must be readable and writable, the content of the flash will change greatly during the operation of the system. If it is not updated in time, the content of the backup can only be the content of the original backup, or even the content of the factory. Variable parameter configurations modified during system operation, Wi-Fi parameter configurations and/or Bluetooth parameter configurations, and new content and business data in partitions other than the file system. If it is not backed up in time, there may be a yin and yang version compared to the normal running system, that is, the currently running system is different from the backup system version. Therefore, it is necessary to regularly update the content of the readable and writable partition while backing up the content. If there is a startup exception, the restored content will be relatively new.
在一些实施例中,如图5所示,所述将所述闪存的内容保存到闪存的 备份分区,包括:In some embodiments, as shown in Figure 5, the content of described flash memory is saved to the backup partition of flash memory, comprising:
在步骤S311中,通过固件空中下载FOTA(Firmware Over-The-Air)方式,发现所述文件***的升级版本;In step S311, the upgrade version of the file system is found by downloading the FOTA (Firmware Over-The-Air) mode of the firmware over the air;
在步骤S312中,保存所述闪存的内容到所述备份分区后,将所述备份分区中保存的所述文件***升级到所述升级版本。In step S312, after saving the content of the flash memory to the backup partition, upgrade the file system saved in the backup partition to the upgraded version.
在一些实施例中,如图6所示,所述将所述闪存的内容保存到闪存的备份分区,包括:In some embodiments, as shown in FIG. 6, saving the contents of the flash memory to the backup partition of the flash memory includes:
在步骤S321中,周期性地将当前的所述闪存的内容保存到所述备份分区中。In step S321, periodically save the current contents of the flash memory to the backup partition.
本公开实施例提供了两种方式进行flash内容的更新。(1)利用FOTA在线升级功能。目前的FOTA升级时,会升级各个分区的内容,但是备份的分区得不到升级。因此,本公开实施例将备份分区的内容也加入到FOTA升级机制中,在升级之前先对当前的文件***、参数配置、以及除文件***之外的分区数据等进行备份,然后利用FOTA机制将备份的***也更新到最新的版本。(2)如果上述方式(1)中的FOTA升级时间间隔较长,***运行了很长时间,仍得不到及时的备份,那么在此期间,可能文件***上包含有更多用户和上网等信息。这时,就要根据***的功能起一个专门的周期性更新任务,定期更新用户信息、以及文件***分区之外的其它分区的信息。按照一定的期限,增加一个周期性定时器,定时器期满时触发根据可读写分区的内容对备份分区中备份的内容进行更新。备份完成后,重置定时器,为下次备份做准备。The embodiment of the present disclosure provides two ways to update flash content. (1) Utilize FOTA online upgrade function. When the current FOTA is upgraded, the content of each partition will be upgraded, but the backup partition cannot be upgraded. Therefore, in the embodiment of the present disclosure, the content of the backup partition is also added to the FOTA upgrade mechanism, and the current file system, parameter configuration, and partition data other than the file system are backed up before the upgrade, and then the FOTA mechanism is used to update The backup system is also updated to the latest version. (2) If the FOTA upgrade time interval in the above method (1) is long, and the system has been running for a long time, but still cannot get a timely backup, then during this period, there may be more users and Internet users on the file system. information. At this time, it is necessary to set up a special periodic update task according to the function of the system to regularly update user information and information of other partitions other than the file system partition. A periodic timer is added according to a certain period, and when the timer expires, it is triggered to update the backup content in the backup partition according to the content of the readable and writable partition. After the backup is complete, reset the timer to prepare for the next backup.
在一些实施例中,所述将所述闪存的内容保存到闪存的备份分区,包括:In some embodiments, the saving the contents of the flash memory to the backup partition of the flash memory includes:
设置周期性定时器,启动定时备份任务;Set a periodic timer and start a scheduled backup task;
若在所述周期性定时器期满之前FOTA已将所述闪存的内容保存到所述备份分区中,则将所述定时器重置;If FOTA has saved the contents of the flash memory into the backup partition before the expiration of the periodic timer, then reset the timer;
若所述周期性定时器期满,将所述闪存的内容保存到所述备份分区中,并将所述定时器重置。If the periodic timer expires, save the contents of the flash memory to the backup partition, and reset the timer.
前文所述的FOTA升级机制和周期性更新任务这两种flash内容的更新方式各有利弊。因此,本公开实施例还将两种方式相结合,兼顾两者的优点,得到第三种更新方法:将备份分区的内容加入到FOTA升级机制中的同时,也启动周期性更新任务。既可以通过FOTA升级触发备份,也可以通过周期性定时器触发备份。这样,为避免两种方式备份过于频繁,在FOTA升级触发备份后,也会将周期性定时器进行重置。这样既可以根据FOTA升级的机制及时升级备份的***,又能解决FOTA升级时间间隔可能较长导致的备份不及时的问题。Both the FOTA update mechanism and the periodic update tasks mentioned above have their own advantages and disadvantages. Therefore, the embodiment of the present disclosure also combines the two methods, taking into account the advantages of both, and obtains the third update method: while adding the content of the backup partition to the FOTA update mechanism, a periodic update task is also started. Backup can be triggered not only through FOTA upgrade, but also through periodic timer. In this way, in order to avoid too frequent backup in the two ways, after the FOTA upgrade triggers the backup, the periodic timer will also be reset. In this way, the backup system can be upgraded in time according to the FOTA upgrade mechanism, and the problem of untimely backup caused by the possible long interval of FOTA upgrade can be solved.
下面结合一个优选实施例对本公开第一个方面所述的终端的启动方法在发生终端启动异常进行文件***恢复过程中的具体应用进行介绍。The specific application of the terminal startup method described in the first aspect of the present disclosure in the process of restoring a file system when a terminal startup exception occurs will be introduced below in conjunction with a preferred embodiment.
实施例Example
如图7所示,在***正常工作中出现异常,***无法正常启动。***启动软件检测到异常发生,判断异常产生的原因。针对前文所述的两类启动异常,处理过程也可以分为两种情况。一种情况是,文件***之外的其它可读写分区因为数据的异常无法正常加载导致死机,软件检测到挂载某个分区失败。这时,在内核中检测到异常后触发启动还原机制。还原机制检测出异常的分区内容。在还原结束后重启设备,可以正常启动;另一种情况是,文件***内容发生异常,初始化失败,***反复重启。为了解决这种异常,需要提前在分区中设置一个专门存放启动异常标志的分区,在文件***启动失败的位置记录标志。在出现文件***初始化失败时,进行对***异常计数。初始化失败后***会重新启动。在重启之后boot阶段会从存放异常标志的分区读取异常标志。如果该标志记录的重启次数达到了预设的重启次数阈值(例如,重启次数阈值为5且重启次数达到5次),判断文件***的文件被损坏。在boot阶段启动文件***的还原机制,执行文件***的还原操作。在还原结束后重启设备,可以正常启动。As shown in Figure 7, an exception occurs during the normal operation of the system, and the system cannot be started normally. The system startup software detects an abnormality and judges the cause of the abnormality. For the two types of startup exceptions mentioned above, the processing process can also be divided into two cases. One situation is that other readable and writable partitions other than the file system cannot be loaded normally due to abnormal data, resulting in a crash, and the software detects that a certain partition fails to mount. At this time, the recovery mechanism is triggered after an abnormality is detected in the kernel. The restore mechanism detected abnormal partition contents. After the restoration is complete, restart the device, and it can start normally; in another case, the contents of the file system are abnormal, initialization fails, and the system restarts repeatedly. In order to solve this kind of abnormality, it is necessary to set a special partition for storing the startup abnormal flag in the partition in advance, and record the flag at the location where the file system fails to start. When file system initialization fails, count system exceptions. The system will reboot after initialization failure. After restarting, the boot phase will read the exception flag from the partition storing the exception flag. If the number of restarts recorded by the flag reaches a preset threshold of restart times (for example, the threshold of restart times is 5 and the number of restarts reaches 5), it is determined that the files in the file system are damaged. Start the restoration mechanism of the file system in the boot stage, and perform the restoration operation of the file system. After the restore is complete, restart the device and it can start normally.
针对前文所述的两类启动异常。在本实施例中执行的还原方法也分为两种情况。For the two types of startup exceptions mentioned above. The restoration method performed in this embodiment is also divided into two situations.
第一类启动异常是,设备出现死机。从死机现场分析来看是在内核加载过程中flash分区的内容发生翻转。从内核启动的过程中可以检测到具体 是在挂载哪个分区时执行不下去死机的。这时,可以在挂载失败的地方将失败的标志写到flash分区中,然后再次从boot阶段启动后会读取失败的标志类型,调用还原机制,将对应分区的内容刷新进去。这个标志类型可以根据可读写分区的不同进行定义,以便在启动阶段还原对应的分区。The first type of startup exception is that the device crashes. According to the analysis of the crash site, the content of the flash partition was flipped during the kernel loading process. During the process of starting the kernel, it can be detected which partition cannot be executed and crashes. At this time, you can write the failed flag to the flash partition where the mount failed, and then read the failed flag type after starting from the boot stage again, call the restore mechanism, and refresh the content of the corresponding partition. This flag type can be defined according to different readable and writable partitions, so that the corresponding partitions can be restored during the startup phase.
第二类启动异常是,文件***出现异常。如图8所示,由于要判断启动异常的原因,因此在flash中增加读写异常标志位的分区。在boot阶段读取异常标志,确定重启的方式。文件***是独立的分区,主要用来存放设备上网或者Wi-Fi以及蓝牙等相关参数。这个分区在***运行过程中都在不断的有读写操作。如果电源不稳定等异常掉电发生时,很容易破坏正在进行读写操作的文件***的内容,让***无法正常工作,进而出现死机,反复重启。这类故障有个特点,如果因为文件***出现异常导致反复重启,那么在启动过程中初始化文件***时就会出错。利用这一特点,就可以判断出文件***是否出现异常。在文件***初始化失败的位置对***异常进行计数。在设备反复重新启动的boot阶段进行检测。在检测到多次异常启动时,判定是文件***出现了异常。当反复重启的次数达到预设的重启次数阈值5时,在boot阶段调用文件***的还原功能,执行flash异常的还原操作。然后清除异常标志。还原操作完成之后文件***内容被修复,***正常启动。The second type of startup exception is that the file system is abnormal. As shown in FIG. 8 , to determine the cause of the startup exception, a partition for reading and writing exception flag bits is added in the flash. Read the abnormal flag during the boot phase to determine the way to restart. The file system is an independent partition, which is mainly used to store related parameters such as device Internet access or Wi-Fi and Bluetooth. This partition is constantly having read and write operations during system operation. If an abnormal power failure such as unstable power supply occurs, it is easy to destroy the content of the file system that is undergoing read and write operations, so that the system cannot work normally, and then crashes and restarts repeatedly. This type of failure has a characteristic. If the file system is abnormal and restarts repeatedly, an error will occur when initializing the file system during the startup process. Using this feature, you can determine whether the file system is abnormal. Counts system exceptions where file system initialization fails. Detection is performed during the boot phase of the device repeatedly rebooting. When multiple abnormal startups are detected, it is determined that the file system is abnormal. When the number of repeated restarts reaches the preset restart times threshold of 5, the restore function of the file system is invoked during the boot phase, and the restore operation of flash exceptions is performed. Then clear the exception flag. After the restore operation is complete, the contents of the file system are repaired, and the system starts normally.
因为启动异常问题已解决,异常标志已清除。若下次再出现此类故障时,不会受到本次异常标志的影响。重新执行上述判断过程,根据具体故障现象采取相应的措施。Because the startup exception problem has been resolved, the exception flag has been cleared. If such a fault occurs next time, it will not be affected by this abnormal flag. Re-execute the above judgment process, and take corresponding measures according to the specific fault phenomenon.
为了保证备份的***能够及时升级、flash的内容能够适时更新,如图9所示,在应用中启动一个更新备份内容的任务,根据设备功能的不同创建不同时长的周期性定时器。根据FOTA的机制,***能及时感知新的***版本,先自动备份flash中的内容,包括文件***、参数配置、以及文件***分区之外的其它分区中的数据,完成备份后,执行FOTA在线升级。因为通过FOTA升级已对备份的***进行升级且在FOTA升级前已经进行过一次flash内容的备份,为了避免FOTA在线升级和周期性更新两种方式的备份过于频繁,在FOTA升级触发备份后,无论周期性定时器的时间 间隔是否期满,都会重置周期性定时器,定时器重新计时。两次FOTA升级之间的时间间隔可能较长,即使FOTA长期未进行新的升级,周期性定时器期满时也会触发备份功能,将备份分区内容进行更新,更新完成后,重置周期性定时器,为下次备份做准备。In order to ensure that the backup system can be upgraded in time and the flash content can be updated in a timely manner, as shown in Figure 9, start a task to update the backup content in the application, and create periodic timers with different durations according to different device functions. According to the mechanism of FOTA, the system can sense the new system version in time, and first automatically back up the content in the flash, including the file system, parameter configuration, and data in other partitions other than the file system partition. After the backup is completed, perform FOTA online upgrade . Because the backed up system has been upgraded through FOTA upgrade and the flash content has been backed up once before the FOTA upgrade, in order to avoid too frequent backups in the two ways of FOTA online upgrade and periodic update, after the FOTA upgrade triggers the backup, regardless of Whether or not the time interval of the periodic timer expires, the periodic timer will be reset, and the timer will count again. The time interval between two FOTA upgrades may be long. Even if FOTA has not been upgraded for a long time, the backup function will be triggered when the periodic timer expires, and the content of the backup partition will be updated. After the update is completed, reset the periodic Timer to prepare for the next backup.
第二方面,本公开实施例提供一种电子设备,如图10所示,其包括:In a second aspect, an embodiment of the present disclosure provides an electronic device, as shown in FIG. 10 , which includes:
至少一个处理器501;at least one processor 501;
存储器502,其上存储有至少一个程序,当至少一个程序被至少一个处理器执行,使得至少一个处理器实现如上述第一方面中任意一项所述的终端的启动方法; Memory 502, on which at least one program is stored, and when at least one program is executed by at least one processor, at least one processor implements the method for starting a terminal as described in any one of the above first aspects;
至少一个I/O接口503,连接在处理器与存储器之间,配置为实现处理器与存储器的信息交互。At least one I/O interface 503 is connected between the processor and the memory, and is configured to realize information exchange between the processor and the memory.
在一个实施例中,处理器501为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等;存储器502为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM,更具体如SDRAM、DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH);I/O接口(读写接口)503连接在处理器501与存储器502间,能实现处理器501与存储器502的信息交互,其包括但不限于数据总线(Bus)等。In one embodiment, the processor 501 is a device with data processing capability, which includes but not limited to a central processing unit (CPU), etc.; the memory 502 is a device with data storage capability, which includes but not limited to random access memory ( RAM, more specifically such as SDRAM, DDR, etc.), read-only memory (ROM), electrified erasable programmable read-only memory (EEPROM), flash memory (FLASH); I/O interface (read-write interface) 503 is connected in processor 501 Between the processor 501 and the memory 502, information exchange between the processor 501 and the memory 502 can be realized, which includes but not limited to a data bus (Bus) and the like.
在一些实施例中,处理器501、存储器502和I/O接口503通过总线504相互连接,进而与计算设备的其它组件连接。In some embodiments, the processor 501 , the memory 502 and the I/O interface 503 are connected to each other through the bus 504 , and further connected to other components of the computing device.
第三方面,本公开实施例提供一种计算机可读存储介质,如图11所示,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述第一方面中任意一项所述的终端的启动方法。In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium. As shown in FIG. 11 , a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned first aspects is implemented. The method for starting the terminal.
本公开提出的终端的启动方法,在终端设备启动异常时,根据故障现象通过软件判断出是否因终端的闪存发生异常导致启动异常,然后自动恢复文件***及***运行中修改的可变参数配置,修复文件***,正常重启终端。还可通过对备份文件的更新,将文件***使用期间保存的内容也恢复到最近的状态,减少数据丢失,维持***稳定。The terminal startup method proposed in this disclosure, when the terminal device starts abnormally, judges through the software according to the fault phenomenon whether the startup abnormality is caused by an abnormality in the flash memory of the terminal, and then automatically restores the file system and the variable parameter configuration modified during system operation, Repair the file system and restart the terminal normally. It is also possible to restore the content saved during the use of the file system to the latest state by updating the backup file, reducing data loss and maintaining system stability.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、***、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof.
在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
以上参照附图说明了本公开的优选实施例,并非因此局限本公开的权利范围。本领域技术人员不脱离本公开的范围和实质内所作的任何修改、等同替换和改进,均应在本公开的权利范围之内。The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, and the scope of rights of the present disclosure is not limited thereby. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and spirit of the present disclosure shall fall within the scope of rights of the present disclosure.

Claims (13)

  1. 一种终端的启动方法,包括:A method for starting a terminal, comprising:
    在发生启动异常的情况下,判断是否因终端的闪存发生异常导致所述启动异常,其中,所述闪存中存储有文件***和当前的可变参数配置,其中,所述当前的可变参数配置为启动异常前配置完成的可变参数;In the case of a startup abnormality, it is judged whether the startup abnormality is caused by an abnormality in the flash memory of the terminal, wherein the flash memory stores a file system and a current variable parameter configuration, wherein the current variable parameter configuration It is a variable parameter configured before starting the exception;
    当判断结果为是时,还原所述闪存的内容,所述内容包括所述文件***和当前的可变参数配置。When the judgment result is yes, the content of the flash memory is restored, and the content includes the file system and the current variable parameter configuration.
  2. 根据权利要求1所述的终端的启动方法,其中,所述判断是否因终端的闪存发生异常导致所述启动异常,包括:The terminal startup method according to claim 1, wherein the judging whether the startup abnormality is caused by an abnormality in the flash memory of the terminal includes:
    判断因启动时发生文件***内容初始化失败导致的重启的次数是否达到预定次数;Judging whether the number of restarts caused by the failure to initialize the file system content at startup has reached the predetermined number of times;
    当判断结果为是时,则判定因所述闪存发生异常导致所述启动异常。When the determination result is yes, it is determined that the startup abnormality is caused by the abnormality of the flash memory.
  3. 根据权利要求1所述的终端的启动方法,其中,所述判断是否因终端的闪存发生异常导致所述启动异常,包括:The terminal startup method according to claim 1, wherein the judging whether the startup abnormality is caused by an abnormality in the flash memory of the terminal includes:
    分析***日志;analyze system logs;
    若存在满足预定条件的日志,则判定因所述闪存发生异常导致所述启动异常。If there is a log satisfying the predetermined condition, it is determined that the startup abnormality is caused by an abnormality in the flash memory.
  4. 根据权利要求3所述的终端的启动方法,其中,若所述***日志中出现以下异常中的至少一种异常,则判定为存在满足预定条件的日志:The terminal startup method according to claim 3, wherein if at least one of the following exceptions occurs in the system log, it is determined that there is a log satisfying the predetermined condition:
    所述闪存的底层驱动异常或者内核中数据位发生翻转。The underlying driver of the flash memory is abnormal or the data bits in the kernel are flipped.
  5. 根据权利要求1所述的终端的启动方法,其中,在所述判断是否因终端的闪存发生异常导致所述启动异常之前,所述方法还包括:The terminal startup method according to claim 1, wherein, before the judgment whether the startup abnormality is caused by an abnormality in the flash memory of the terminal, the method further includes:
    将所述闪存的内容保存到闪存的备份分区,其中,所述闪存的内容包括所述文件***和当前的可变参数配置,被配置成执行所述还原所述闪存的内容。saving the content of the flash memory to a backup partition of the flash memory, wherein the content of the flash memory includes the file system and the current variable parameter configuration, and is configured to perform the restoration of the content of the flash memory.
  6. 根据权利要求5所述的终端的启动方法,其中,所述闪存的内容还包括:文件***之外的分区数据。The booting method of the terminal according to claim 5, wherein the content of the flash memory further includes: partition data other than the file system.
  7. 根据权利要求6所述的终端的启动方法,其中,所述将所述闪存的内容保存到闪存的备份分区,包括:The terminal startup method according to claim 6, wherein said saving the contents of the flash memory to a backup partition of the flash memory comprises:
    通过固件空中下载FOTA方式,发现所述文件***的升级版本;The upgrade version of the file system is found by downloading the firmware over the air FOTA;
    保存所述闪存的内容到所述备份分区后,将所述备份分区中保存的所述文件***升级到所述升级版本。After saving the content of the flash memory to the backup partition, upgrade the file system stored in the backup partition to the upgraded version.
  8. 根据权利要求6所述的终端的启动方法,其中,所述将所述闪存的内容保存到闪存的备份分区,包括:The terminal startup method according to claim 6, wherein said saving the contents of the flash memory to a backup partition of the flash memory comprises:
    周期性地将当前的所述闪存的内容保存到所述备份分区中。Periodically save the current contents of the flash memory to the backup partition.
  9. 根据权利要求6所述的终端的启动方法,其中,所述将所述闪存的内容保存到闪存的备份分区,包括:The terminal startup method according to claim 6, wherein said saving the contents of the flash memory to a backup partition of the flash memory comprises:
    设置周期性定时器,启动定时备份任务;Set a periodic timer and start a scheduled backup task;
    若在所述周期性定时器期满之前FOTA已将所述闪存的内容保存到所述备份分区中,则将所述定时器重置;If FOTA has saved the contents of the flash memory into the backup partition before the expiration of the periodic timer, then reset the timer;
    若所述周期性定时器期满,将所述闪存的内容保存到所述备份分区中,并将所述定时器重置。If the periodic timer expires, save the contents of the flash memory to the backup partition, and reset the timer.
  10. 根据权利要求1至9中任意一项所述的终端的启动方法,其中,所述闪存为与非型闪存NAND flash。The terminal startup method according to any one of claims 1 to 9, wherein the flash memory is a NAND flash memory.
  11. 根据权利要求1至9中任意一项所述的终端的启动方法,其中,所述可变参数配置包括:The terminal startup method according to any one of claims 1 to 9, wherein the variable parameter configuration includes:
    无线保真Wi-Fi的参数配置和/或蓝牙的参数配置。Wi-Fi parameter configuration and/or Bluetooth parameter configuration.
  12. 一种电子设备,所述电子设备包括:An electronic device comprising:
    至少一个处理器;at least one processor;
    存储器,其上存储有至少一个程序,当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现根据权利要求1至11中任意一项所述的终端的启动方法;A memory on which at least one program is stored, and when the at least one program is executed by the at least one processor, the at least one processor implements the terminal startup method according to any one of claims 1 to 11 ;
    至少一个I/O接口,连接在所述处理器与存储器之间,配置为实现所述处理器与存储器的信息交互。At least one I/O interface is connected between the processor and the memory, configured to realize information exchange between the processor and the memory.
  13. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现根据权利要求1至11中任意一项所述的终端的启动方法。A computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the terminal startup method according to any one of claims 1 to 11 is implemented.
PCT/CN2022/133132 2021-12-10 2022-11-21 Terminal starting method, electronic device, and computer-readable storage medium WO2023103755A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111509385.0 2021-12-10
CN202111509385.0A CN116257384A (en) 2021-12-10 2021-12-10 Terminal starting method, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2023103755A1 true WO2023103755A1 (en) 2023-06-15

Family

ID=86686704

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/133132 WO2023103755A1 (en) 2021-12-10 2022-11-21 Terminal starting method, electronic device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN116257384A (en)
WO (1) WO2023103755A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117708886B (en) * 2024-02-05 2024-05-07 广州鲁邦通物联网科技股份有限公司 File system protection method and device for Internet of things equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000222180A (en) * 1999-01-29 2000-08-11 Nec Corp Guard system and method for information processor
CN101477482A (en) * 2008-10-14 2009-07-08 深圳市共进电子有限公司 Method for recovering flash memory data at power-off of built-in Linux system
CN104216800A (en) * 2014-08-27 2014-12-17 福建星网视易信息***有限公司 Automatic system fault recovering method and device based on data redundancy
CN109614267A (en) * 2018-12-06 2019-04-12 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and terminal for repairing booting abnormal problem

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000222180A (en) * 1999-01-29 2000-08-11 Nec Corp Guard system and method for information processor
CN101477482A (en) * 2008-10-14 2009-07-08 深圳市共进电子有限公司 Method for recovering flash memory data at power-off of built-in Linux system
CN104216800A (en) * 2014-08-27 2014-12-17 福建星网视易信息***有限公司 Automatic system fault recovering method and device based on data redundancy
CN109614267A (en) * 2018-12-06 2019-04-12 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and terminal for repairing booting abnormal problem

Also Published As

Publication number Publication date
CN116257384A (en) 2023-06-13

Similar Documents

Publication Publication Date Title
US8417992B2 (en) Method, system and article of manufacture for system recovery
US9542195B1 (en) Motherboards and methods for BIOS failover using a first BIOS chip and a second BIOS chip
US8041988B2 (en) Firmware update for consumer electronic device
US8812910B2 (en) Pilot process method for system boot and associated apparatus
US10713128B2 (en) Error recovery in volatile memory regions
US20150199190A1 (en) System and method for updating firmware
US10579300B2 (en) Information handling system firmware persistent memory runtime reclaim
WO2023103755A1 (en) Terminal starting method, electronic device, and computer-readable storage medium
CN109582332B (en) System upgrading method and device for Internet camera
EP4066135A1 (en) Resilient software updates in secure storage devices
JP2023064689A (en) Board management controller of computer system and start method
US10657003B2 (en) Partial backup during runtime for memory modules with volatile memory and non-volatile memory
US20070277028A1 (en) Method and system for recovery from reprogramming failures in nonvolatile memory
CN113190256B (en) Upgrading method, device and equipment
JP2002062956A (en) Service interruption processing method and service interruption processing device
JPH10307726A (en) System for firmware recovery at time of start error
US11740969B2 (en) Detecting and recovering a corrupted non-volatile random-access memory
KR100853941B1 (en) Multimedia storage device and data recovering method of the device
CN113849235A (en) Control method and device and electronic equipment
US10592364B2 (en) Handling errors during run time backups
CN112882757A (en) Embedded system double-partition safe starting method
JP6011687B1 (en) Storage device and control method thereof
US20220374223A1 (en) Server and updating method for mac address
US20170010827A1 (en) File system of controller
US20220129198A1 (en) Data updates for controllers

Legal Events

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

Ref document number: 22903178

Country of ref document: EP

Kind code of ref document: A1