WO2020015203A1 - 一种系统恢复方法及装置 - Google Patents

一种系统恢复方法及装置 Download PDF

Info

Publication number
WO2020015203A1
WO2020015203A1 PCT/CN2018/109116 CN2018109116W WO2020015203A1 WO 2020015203 A1 WO2020015203 A1 WO 2020015203A1 CN 2018109116 W CN2018109116 W CN 2018109116W WO 2020015203 A1 WO2020015203 A1 WO 2020015203A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
system recovery
recovery mechanism
option
shutdown
Prior art date
Application number
PCT/CN2018/109116
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to US17/261,804 priority Critical patent/US11461179B2/en
Priority to CN201880095758.4A priority patent/CN112437914A/zh
Priority to EP18926669.5A priority patent/EP3816804A4/en
Publication of WO2020015203A1 publication Critical patent/WO2020015203A1/zh

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/1438Restarting or rejuvenating
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • G06F11/3075Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting the data filtering being achieved in order to maintain consistency among the monitored data, e.g. ensuring that the monitored data belong to the same timeframe, to the same system or component
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a method and device for system recovery.
  • BIOS basic input / output system
  • OS operating system
  • the computer's boot manager and boot loader are used to start the OS. If the computer cannot boot normally, the boot loader will automatically boot the computer into the system recovery environment (such as WinRE, English full name: windows recovery environment), or the user manually presses the corresponding hot key (such as the F8 key), so that the computer enters the system recovery environment, and the computer system restores the factory settings.
  • system recovery environment such as WinRE, English full name: windows recovery environment
  • hot key such as the F8 key
  • the embodiments of the present application provide a system recovery method and device, which can more smoothly guide users to implement system recovery of an electronic device.
  • an embodiment of the present application provides a system recovery method applied to an electronic device.
  • the method includes: during the BIOS startup phase of the electronic device, obtaining the number of abnormal shutdowns of the electronic device; if the number of abnormal shutdowns of the electronic device is greater than or equal to The preset threshold displays a first interface including the first system recovery mechanism option; and receiving a selection operation of the first system recovery mechanism option, and in response to the selection operation of the first system recovery mechanism option, running the first A system recovery mechanism.
  • the system recovery method provided in the embodiment of the present application can guide a user to select a system recovery mechanism according to requirements when the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold during the startup phase of the BIOS during the startup of the electronic device. For example, the above-mentioned first system recovery mechanism), so that the electronic device runs the system recovery mechanism, so that the user can be more smoothly guided to implement the system recovery of the electronic device.
  • system recovery instruction information is set, and the system recovery instruction information is used to instruct the electronic device to display the first interface.
  • the electronic device when the number of abnormal shutdowns of the electronic device is less than a preset threshold, the electronic device continues to start according to the normal startup process. Specifically, the electronic device continues to run other power-on self-test processes and load operating system processes. The operating system calls back the ACPI process, the BIOS responds to the operating system calls back the ACPI process, and increases the number of abnormal shutdowns by 1 before executing other operating system processes.
  • the system recovery method provided in the embodiment of the present application further includes: obtaining advanced startup instruction information of the electronic device, the advanced startup instruction The information is used to instruct the electronic device to run the second system recovery mechanism.
  • a certain bit of the system restoration flag may be defined as advanced startup instruction information.
  • the first interface further includes at least one of the following: a second system recovery mechanism option, a continue startup option, and a shutdown and restart option. If the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold, the system recovery method provided in the embodiment of the present application further includes: receiving a selection operation of the second system recovery mechanism option; and responding to the selection operation of the second system recovery mechanism option , Run the second system recovery mechanism.
  • the first interface may include multiple options, so that the user can more flexibly select different options according to actual needs, and the electronic device responds accordingly.
  • the system recovery method provided in the embodiment of the present application further includes: during the BIOS startup phase of the electronic device, if the user manually presses the first system recovery hot key, the electronic device A second interface is displayed, the second interface including the first system recovery mechanism option and the shutdown and restart option; and receiving a selection operation of the first system recovery mechanism option, and in response to the first system recovery mechanism option selection operation, running the first System recovery mechanism.
  • the electronic device can automatically guide the electronic device to perform system recovery, and the user can also actively trigger the electronic device to perform system recovery by pressing a hot key.
  • the system recovery method provided in the embodiment of the present application further includes: increasing the number of abnormal shutdowns by 1 during the startup of the electronic device; during the subsequent operation of the electronic device, If the electronic device is shut down normally, the number of abnormal shutdowns is cleared to 0; if the electronic device is shut down abnormally, the number of abnormal shutdowns is not reset.
  • the number of abnormal shutdowns is increased by 1 when the electronic device is started, if the electronic device is subsequently shut down abnormally, the number of abnormal shutdowns is not reset to zero, so that the next time the device is powered on, the number of abnormal shutdowns can be obtained. It is determined whether to perform system recovery on the electronic device according to the number of abnormal shutdowns.
  • the system recovery method provided in the embodiment of the present application further includes: obtaining a status of an EC during a BIOS startup phase of the electronic device, and the status of the EC indicates whether the electronic device exists.
  • the shutdown event triggered by the watchdog mechanism if the electronic device has a shutdown event triggered by the watchdog mechanism, the number of abnormal shutdowns obtained by the electronic device during the BOIS startup phase is reduced by one.
  • a watchdog mechanism in an electronic device triggers the shutdown of the electronic device, such a shutdown phenomenon is not actually considered as an abnormal shutdown, but is considered as a normal shutdown.
  • the watchdog mechanism triggers the shutdown of the electronic device
  • the number of abnormal shutdowns will also increase by one, and the EC of the electronic device will record (also can be understood as the EC will sense) this event (That is, the shutdown event triggered by the watchdog mechanism). Therefore, during the next startup of the electronic device, during the BIOS startup phase, the status of the EC will be queried, and it is determined that the watchdog triggered by the electronic device is based on the status of the EC.
  • the number of abnormal shutdowns obtained is reduced by 1, the true value of the number of abnormal shutdowns is obtained, and whether the system recovery is performed on the electronic device is further determined.
  • the watchdog mechanism of the electronic device in the sleep state triggers an electronic device shutdown event, and the electronic device clears the number of abnormal shutdowns to 0 (that is, the number of abnormal shutdowns of the electronic device is not Accumulation will occur), and the EC does not record shutdown events triggered by this watchdog (that is, the EC does not perceive).
  • the first system recovery mechanism is an OEM-defined system recovery mechanism
  • the second system system recovery mechanism is a Windows default system recovery mechanism, compared to the Windows default system recovery mechanism.
  • System recovery option using OEM custom system recovery mechanism for system recovery has the advantages of fast speed and good versatility.
  • the first system recovery mechanism and the second system recovery mechanism, and the first system recovery mechanism and the second system recovery mechanism may also be other system recovery mechanisms.
  • the abnormal shutdown of the electronic device includes at least one of the following: forced shutdown, and shutdown of the electronic device after a blue screen occurs.
  • the forced shutdown refers to the direct shutdown of the electronic device (for example, the user manually presses the power button to power off), and the shutdown after the blue screen of the computer refers to the exception that occurs when the electronic device has not entered the operating system. Shut down after blue screen.
  • the abnormal shutdown scenario includes, but is not limited to, the two scenarios described above.
  • an embodiment of the present application provides an electronic device.
  • the electronic device includes one or more processors, a memory, a communication interface, and a touch screen.
  • the memory and the communication interface are coupled to the processor.
  • the touch screen is used to display the processor-generated Image;
  • the memory is used to store computer program code;
  • the computer program code includes computer instructions, and when the processor executes the computer instructions, the processor is used to obtain the number of abnormal shutdowns of the electronic device during the BIOS startup phase of the electronic device;
  • a processor is further configured to control the touch screen to display a first interface when the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold, the first interface including a first system recovery mechanism option;
  • the processor is further configured to pass The communication interface receives a selection operation of the first system recovery mechanism option and, in response to the selection operation of the first system recovery mechanism option, runs the first system recovery mechanism.
  • the processor is further configured to obtain advanced startup instruction information of the electronic device, where the advanced startup instruction information is used to instruct the processor to run a second system recovery mechanism.
  • the first interface further includes at least one of the following: a second system recovery mechanism option, a continue startup option, and a shutdown and restart option; the processor is further configured to pass The communication interface receives a selected operation of the second system recovery mechanism option, and runs the second system recovery mechanism in response to the selected operation of the second system recovery mechanism option.
  • the processor is further configured to, during the BIOS startup phase of the electronic device, if the user manually presses the first system recovery hot key to control the touch screen to display the second interface, the The second interface includes a first system recovery mechanism option and a shutdown and restart option; the processor is further configured to receive a selection operation on the first system recovery mechanism option, and in response to the first system recovery mechanism option selection operation, run the first System recovery mechanism.
  • the processor is further configured to increase the number of abnormal shutdowns by 1 during the startup of the electronic device; if the electronic device is normally shut down during the subsequent operation of the electronic device , The number of abnormal shutdowns is cleared to 0. If the electronic device is abnormally shutdown, the number of abnormal shutdowns is not cleared.
  • the processor is further configured to obtain an EC status during the BIOS startup phase of the electronic device, and the EC status indicates whether the electronic device is triggered by a watchdog mechanism. Shutdown event; if there is a shutdown event triggered by the watchdog mechanism of the electronic device, the number of abnormal shutdowns obtained by the processor during the BOIS startup phase is reduced by one.
  • the first system recovery mechanism is an OEM-defined system recovery mechanism
  • the second system system recovery mechanism is a Windows default system recovery mechanism
  • the abnormal shutdown of the electronic device includes at least one of the following: forced shutdown, and shutdown of the electronic device after a blue screen occurs.
  • an embodiment of the present application provides a computer storage medium including computer instructions.
  • the computer instructions When the computer instructions are run on an electronic device, the electronic device is caused to execute the first aspect and various optional implementations thereof.
  • the system recovery method according to any one of the methods.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to perform the system recovery described in the first aspect and any one of its various optional implementations. method.
  • FIG. 1 is a schematic diagram of hardware of a computer according to an embodiment of the present application.
  • FIG. 2 is a first schematic diagram of a system recovery method according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of various indication information provided by an embodiment of the present application.
  • FIG. 4 is a first schematic view of an example display interface of an electronic device according to an embodiment of the present application.
  • FIG. 5 is a second schematic diagram of a system recovery method according to an embodiment of the present application.
  • FIG. 6 is a second schematic diagram of an example display interface of an electronic device according to an embodiment of the present application.
  • FIG. 7 is a third schematic diagram of an example of a display interface of an electronic device according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • first and second in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects.
  • first system recovery mechanism and the second system recovery mechanism are used to distinguish different system recovery mechanisms, rather than to describe a specific order of the system recovery mechanisms.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present application should not be construed as more preferred or more advantageous than other embodiments or designs. Rather, the use of the words “exemplary” or “for example” is intended to present the relevant concept in a concrete manner.
  • multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
  • the computer startup process includes a basic input output system (BIOS) startup and an operating system (OS) startup.
  • BIOS basic input output system
  • OS operating system
  • BIOS Basic Input Output System
  • ROM read-only memory
  • Operating system A collection of system software that manages computer hardware resources, controls the operation of other programs, and provides users with interactive operation interfaces.
  • the operating system is a key component of a computer system. It is responsible for managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output devices, operating the network, and managing file systems.
  • Abnormal shutdown Under Windows, the shutdown process for a normal shutdown requires three steps: soft protection, hard protection, and power failure. Among them, soft protection refers to closing all applications of the user, saving the user's system settings, and stopping system services; hard protection refers to stopping the hardware driver; and finally power off.
  • the abnormal shutdown scenario may include manual forced shutdown by the user or shutdown in the case of a blue screen on the computer.
  • the scenario where the user manually forces the power off may include powering off the electronic device directly (for example, pressing and holding the power button to power off), and shutting down when the computer has a blue screen may include an exception that occurs when the electronic device has not yet entered the operating system, resulting in a blue screen
  • the abnormal shutdown scenario includes, but is not limited to, the two scenarios described above.
  • the watchdog is a protection mechanism.
  • the working principle of the watchdog is actually equivalent to a timer circuit.
  • the processor outputs a signal to the watchdog within a certain period of time.
  • the input terminal of the dog ie the dog feeding terminal
  • the watchdog can prevent the program from running indefinitely, causing an infinite loop, or the program running away.
  • the embodiments of the present application provide a system recovery method and device, which can obtain the number of abnormal shutdowns of the electronic device during the BIOS startup phase of the electronic device; Setting a threshold to display a first interface including a first system recovery mechanism option; and receiving a selection operation on the first system recovery mechanism option; and in response to the first operation system selection mechanism option being selected, running the first system recovery mechanism , Thereby achieving system recovery of the electronic device.
  • the electronic device provided in the embodiment of the present application may be an electronic device having an operating system
  • the electronic device may be a computer (for example, a desktop computer, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), etc.) , Mobile phones, netbooks or personal digital assistants (PDAs), smart cars, sensing devices, Internet of Things (IoT) devices, customer terminal equipment (CPE), etc.
  • a computer for example, a desktop computer, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), etc.
  • PDAs personal digital assistants
  • smart cars sensing devices
  • IoT Internet of Things
  • CPE customer terminal equipment
  • the hardware structure of the electronic device is described by taking the electronic device as a computer as an example.
  • the computer provided in the embodiment of the present application includes components such as a processor 10, a memory 11, an input device 12, and an output device 13.
  • the structure of the computer shown in FIG. 1 does not constitute a limitation on the computer, and may include more or less components such as those shown in FIG. 1, or may be combined as shown in FIG. 1. Some of the components may be different from the component arrangement shown in FIG. 1.
  • Processor 10 is a core component of a computer.
  • the processor 10 may be a central processing unit (CPU).
  • CPU central processing unit
  • the CPU is also referred to as a microprocessor.
  • the processor is mainly composed of a controller 101 and an arithmetic unit 102.
  • the controller 101 is an instruction interpretation and execution structure in a computer, and its main function is to control the components 102, memory 11, input device 12, output device 13 and other components to coordinate actions.
  • the controller 101 fetches an instruction from the memory 11 and indicates the storage address where the next instruction is located, and then analyzes the fetched instruction to generate a corresponding control signal, and the relevant component is started by the control signal to complete these components.
  • the action specified by the instruction In this way, a program composed of a series of instructions is executed one by one, so that the computer can automatically complete the predetermined task according to the requirements of the program.
  • the main function of the arithmetic unit 102 is to perform operations such as arithmetic operations, logical operations, and logical judgments on data. Under the control of the controller 101, the arithmetic unit 102 performs a corresponding operation on the data obtained from the memory 11 or its internal register according to the instruction code, and temporarily stores the result in the internal register or sends it to the memory 11.
  • Memory 11 is used to store programs and data, and is an important part of the computer.
  • the memory 11 may include a memory 111 and a hard disk 112.
  • the memory is an abbreviation of internal memory
  • the memory 111 is composed of a high-speed semiconductor memory chip, and is a place where programs and data are temporarily stored during the running of the computer.
  • the data to be processed is first transferred from the hard disk 112 into the memory 111, and then from the memory 111 to the processor 10; after the processor 10 finishes processing, the data is sent to the memory 111 and finally saved to the hard disk 112.
  • the memory 111 may include a random access memory (RAM), a ROM, and a cache memory (Cache).
  • RAM random access memory
  • ROM read-only memory
  • Cache cache memory
  • the data in the RAM can be read or written randomly. It is used to store programs and related data loaded from the hard disk 112 and data sent from the processor 10. Generally speaking, the memory actually refers to RAM. It should be pointed out that after the computer is powered off, the data in RAM will be completely lost.
  • the ROM occupies a small part of the memory. The ROM usually stores some fixed, special-purpose programs or data, and the processor 10 only reads the ROM. Cache's storage capacity is relatively small, but the speed is much higher than RAM, close to the speed of CPU. Cache is a high-speed small-capacity memory between CPU and RAM in the hierarchy of computer storage system.
  • Input device 12 used to input a program and raw data (including text, graphics, images, sounds, etc.) to be processed to the computer.
  • the input device 12 on the computer may include a keyboard 121 and a mouse 122.
  • Keyboard 121 The keyboard is the most basic input device in a computer. Letters, numbers, and symbol keys are arranged on the keyboard. Through key operations, information such as commands, programs, and data can be entered into the computer.
  • the mouse 122 is an auxiliary input device in a computer.
  • the mouse 122 is a pointing "device". There are two or three keys on the surface. The mouse can be used to click, double-click, or drag the operation object.
  • the mouse 122 may include a wired mouse and a wireless mouse.
  • the input device 131 of the computer may further include a scanner, a tablet, and the like.
  • Output device 13 used to output the results of computer operation or data processing.
  • the output device 13 may include a display 131.
  • the display 131 is the most basic output device of a computer, and is also a main tool for man-machine dialogue.
  • the user of the computer provides various application software operation interfaces through the display. The user can input data, select various functions, and obtain the results of program operation through these interfaces.
  • the display 131 may be a touch display, and the display 131 includes a display panel and a touch screen.
  • the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch screen may cover the display panel.
  • the touch screen detects a touch operation on or near the touch screen, the touch screen is transmitted to the processor 10 to determine the type of the touch event, and then the processor 10 provides a corresponding response on the display panel according to the type of the touch event.
  • Visual output The touch screen and the display panel are implemented as two separate components to implement the computer's input and output functions, but in some embodiments, the touch screen and the display panel can be integrated to implement the computer's input and output functions.
  • the output device 13 may further include a printer, a plotter, and the like.
  • the computer provided in the embodiment of the present application may further include a modem, a fan, a power supply, a network card, a sound card, a Wi-Fi module, a Bluetooth module, and the like.
  • the computer provided in the embodiment of the present application further includes a software system, including system software and application software, and the system software includes an operating system (OS).
  • OS operating system
  • the method may include S101-S104:
  • the abnormal shutdown of the electronic device includes at least one of the following: forced shutdown, and shutdown of the electronic device after a blue screen occurs.
  • the abnormal shutdown of the electronic device may also include other phenomena that cause the electronic device to shut down, which is not specifically limited in the embodiments of the present application.
  • a byte (that is, 8-bit bits) of the flash memory in the BIOS is used to store instruction information (or It can be understood as a flag bit), which can be referred to as a system restore flag.
  • the system restore flag is recorded as BIOS Flash Flag.
  • some bits in the BIOS Flash Flag can be used to indicate the number of abnormal shutdowns. In this way, during the startup of the electronic device, during the BIOS startup phase, the corresponding bits in the BIOS Flash Flag are read to obtain the electronic Number of abnormal shutdowns of the device.
  • the first 3 bits (ie, the lower 3 bits) of the BIOS Flash Flags are used to indicate the number of abnormal shutdowns in the direction from right to left, which is denoted as Flag [3 : 0].
  • the binary number represented by the lower 3 bits of the BIOS Flash Flag may be the number of abnormal shutdowns.
  • the following table 1 is an example of the relationship between the value of the lower 3 bits of the BIOS Flash Flag and the number of abnormal shutdowns.
  • the number of abnormal shutdowns is an accumulated value.
  • the operating system can call back advanced configuration and power management interface (ACPI), and the operating system can call back ACPI to obtain the Device management permissions, so the BIOS responds to the operating system's ACPI callback, transfers the management permissions of the electronic device to the operating system, and the BIOS increases the number of abnormal shutdowns by 1, that is, increases the value of the lower 3 bits in the BIOS Flash Flag 1;
  • the number of abnormal shutdowns is cleared to 0; if the electronic device is shut down abnormally, the number of abnormal shutdowns is not cleared. In this case, it can be seen in the electronic device When an abnormal shutdown occurs, the number of abnormal shutdowns of the electronic device is cumulative.
  • the electronic device displays a first interface, where the first interface includes a first system recovery mechanism option.
  • the above-mentioned first system recovery mechanism option corresponds to the first system recovery mechanism, and the first system recovery mechanism may be a system recovery mechanism customized by an original equipment manufacturer (OEM).
  • OEM original equipment manufacturer
  • the preset threshold may be set according to actual usage requirements (for example, set to 3 times), which is not specifically limited in the embodiment of the present application.
  • the electronic device receives a selection operation of a first system recovery mechanism option.
  • the above-mentioned selection operation of the first system recovery mechanism may be a touch operation or a long-press operation on the touch screen of the electronic device triggered by a finger or a stylus. , Swipe operation, click operation, hover operation (user operation near the touch screen), etc.
  • the above-mentioned operation of selecting the first system recovery mechanism option may also be a key operation, for example, the key operation corresponds to a single-click operation, a double-click operation of keys such as a power key, a volume key, and an Enter key on a keyboard of an electronic device. , Long press operation, key combination operation, etc.
  • the electronic device runs the first system recovery mechanism in response to the selection operation of the first system recovery mechanism option.
  • the above-mentioned electronic device running the first system recovery mechanism refers to the system recovery program corresponding to the first device running the first system recovery mechanism, so that the system of the electronic device is restored to the factory-set state.
  • the computer when the number of abnormal shutdowns of the computer is greater than or equal to a preset threshold (for example, 3 times), the computer displays a first interface 200, and in the first interface 200 The first system recovery mechanism option 201 is included, and the user can select (eg, click) the first system recovery mechanism option 201 so that the computer responds accordingly.
  • a preset threshold for example, 3 times
  • the system recovery method provided in the embodiment of the present application can guide a user to select a system recovery mechanism according to requirements when the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold during the startup phase of the BIOS during the startup of the electronic device. For example, the above-mentioned first system recovery mechanism), so that the electronic device runs the system recovery mechanism, so that the user can be more smoothly guided to implement the system recovery of the electronic device.
  • the method may include:
  • the BIOS when the electronic device starts to start (for example, the user presses the start button), the BIOS is first started, that is, the electronic device starts a self-test.
  • S203 Detect whether the user presses a hot key.
  • S204a The user presses the hot key F8, and the electronic device executes the second system recovery mechanism.
  • the operation corresponding to pressing the hot key F8 is that the electronic device executes the second system recovery mechanism to implement system recovery.
  • the second system recovery mechanism may be a Windows default system recovery mechanism (may be referred to as WinRE for short), and the second system recovery mechanism may also be another type of system recovery mechanism, which is not specifically limited in the embodiment of the present application.
  • WinRE Windows default system recovery mechanism
  • the electronic device enters the second system recovery mechanism.
  • the number of abnormal shutdowns is reset to zero, that is, the above-mentioned BOIS Flash Flag
  • the lower 3 bits are reset. For example, if "0" indicates a reset, the lower 3 bits of the BIOS Flash Flag are all cleared to zero.
  • S204b The user presses the hot key F10, and the electronic device executes a first system recovery mechanism.
  • the operation corresponding to pressing the hot key F10 is that the electronic device executes the first system recovery mechanism to implement system recovery.
  • the first system recovery mechanism is different from the second system recovery mechanism.
  • the first system recovery mechanism may be an OEM-defined system recovery mechanism.
  • the above electronic device enters the first system recovery mechanism. After the system recovery of the electronic device is completed, if the electronic device can be shut down normally, the number of abnormal shutdowns is reset to zero, that is, the electronic device The device clears the lower 3 bits of the above-mentioned BOIS Flash Flag.
  • the system recovery of the electronic device is the result of the user's active operation, not the result of the electronic device automatically (or spontaneously) guiding the user to make a selection.
  • S204c The user presses the hot key F12, and the electronic device displays a system guide interface.
  • the electronic device after the user presses the hot key F12, the electronic device can display a system boot interface, so that the user can perform related operations on the boot interface to enter the designated system.
  • the electronic device can display a BIOS setting interface, so that some switches of the BIOS can be set on the interface.
  • the above-mentioned advanced startup instruction information instructs the electronic device to run the second system recovery mechanism.
  • the fifth bit (in the right-to-left direction) of the above-mentioned BIOS Flash Flag may be defined as the high-level boot instruction information, which is denoted as Flag [5].
  • the above-mentioned obtaining the advanced startup instruction information of the electronic device specifically includes: during the BIOS startup phase, reading the fifth bit of the BOIS Flash Flag, that is, Flag [5].
  • the identifier "1" may be used to instruct the electronic device to run the second system recovery mechanism, or the identifier "0" may be used to instruct the electronic device to run the second system recovery mechanism, which may be specifically based on actual use.
  • the selection of requirements is not limited in the embodiments of the present application.
  • the advanced startup instruction information is 1 to instruct the electronic device to run the second system recovery mechanism, then the advanced startup instruction information is 0 to instruct the electronic device to obtain the number of abnormal shutdowns, as shown in Table 2 below.
  • Table 2 An example of the relationship between meanings.
  • the lower three bits in the BOIS Flash Flag are read, that is, Flag [3: 0], and the number of abnormal shutdowns of the electronic device can be known in conjunction with Table 1 in S101 above.
  • the status of the embedded controller can be obtained, and the status of the EC indicates whether the electronic device is triggered by a watchdog mechanism. Shutdown event.
  • the number of abnormal shutdowns obtained by the electronic device during the BIOS startup phase is reduced by 1 to obtain a new number of abnormal shutdowns, and then whether the electronic device needs to be determined based on the new number of abnormal shutdowns Perform a system recovery. If the electronic device does not have a shutdown event triggered by a watchdog mechanism, it is directly determined whether the electronic device needs system recovery according to the number of abnormal shutdowns obtained.
  • a watchdog mechanism in an electronic device triggers the shutdown of the electronic device
  • such a shutdown phenomenon is not actually considered as an abnormal shutdown, but is considered as a normal shutdown.
  • the number of abnormal shutdowns will also increase by one, and the EC of the electronic device will record (also can be understood as the EC will sense) this event (That is, the shutdown event triggered by the watchdog mechanism). Therefore, during the next startup of the electronic device, during the BIOS startup phase, the status of the EC will be queried, and it is determined that the watchdog triggered by the electronic device is based on the status of the EC.
  • the number of abnormal shutdowns obtained is reduced by 1 to obtain the true value of the number of abnormal shutdowns.
  • the watchdog mechanism triggers an electronic device shutdown event when the electronic device is in the sleep state.
  • the electronic device clears the number of abnormal shutdowns to 0 (that is, the number of abnormal shutdowns of the electronic device does not accumulate), and the EC responds to this.
  • a watchdog-triggered shutdown event is not recorded (ie, the EC is not aware).
  • the electronic device determines whether the number of abnormal shutdowns is greater than or equal to a preset threshold.
  • the electronic device when the number of abnormal shutdowns of the electronic device is less than a preset threshold, the electronic device continues to start according to a normal startup process. As shown in FIG. 5, the electronic device continues to run other power-on self-test processes, Load the operating system process, the operating system calls back the ACPI process, and the BIOS responds to the operating system calls back the ACPI process, and increases the number of abnormal shutdowns by 1 (specifically, if the number of abnormal shutdowns is less than or equal to 15, the number of abnormal shutdowns is increased by 1 ) Before executing other operating system processes.
  • the number of abnormal shutdowns is reset to zero. If the electronic device is shut down abnormally, the value of the abnormal shutdown number is not cleared, that is, the number of abnormal shutdowns Will accumulate.
  • system recovery instruction information is set, and the system recovery instruction information is used to instruct the electronic device to display the first interface.
  • the fourth bit (in the right-to-left direction) of the BIOS Flash Flag may be defined as the system recovery instruction information and recorded as Flag [4].
  • the system recovery instruction information is used to instruct the electronic device to display the first interface, so that the user can perform corresponding operations on the first interface according to requirements, so that the electronic device responds differently.
  • BIOS Flash Flag may be used as reserved bits.
  • the identifier "1" may be used to instruct the electronic device to display the first interface, or the identifier "0" may be used to instruct the electronic device to display the first interface, which may be specifically selected according to actual use requirements.
  • the application examples are not limited.
  • system restoration instruction information is “1”, the electronic device is instructed to display the first interface; if the system restoration instruction information is “0”, the electronic device is instructed to display the second interface, and the first interface and the second interface The interface is different.
  • Table 3 is an example of the relationship between the system recovery instruction information and the meaning of the instruction.
  • the above-mentioned action of determining whether the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold is an action within the BIOS.
  • the BIOS determines whether the number of abnormal shutdowns is greater than or equal to the preset threshold, This event needs to be notified to the restoration application, so the electronic device sets the system restoration instruction information (for example, sets Flag [4] to 1), so that the restoration application runs the OEM-defined system restoration mechanism according to the system restoration instruction information.
  • a specific implementation manner is: a system of the electronic device.
  • obtaining the system recovery instruction information specifically includes reading the fourth bit (from right to left) in the BOIS Flash Flag, that is, Flag [4].
  • the system recovery instruction information is 1 to instruct the electronic device to display the first interface, and the system recovery instruction information is 0 to instruct the electronic device to display the second interface.
  • the system recovery instruction information is 1, execute S209, etc. Related steps.
  • the electronic device displays a first interface, where the first interface includes a first system recovery mechanism option.
  • the first interface may further include at least one of the following options: a second system recovery mechanism option, a continue startup option, and a shutdown and restart option.
  • the electronic device displays a first interface, and different options are displayed on the first interface. The user can perform related operations on the first interface, that is, an operation of selecting a certain option according to requirements.
  • the computer displays a first interface 300, and the first interface 300 includes a first system recovery mechanism option 301 and a second system recovery mechanism option 302, and continues to start Option 303 and shutdown and restart option 304.
  • a preset threshold for example, 3 times
  • the user can select (for example, click) any one of the four options (for example, select the second system recovery mechanism option 302) according to requirements.
  • the electronic device receives a selection operation of a first system recovery mechanism option.
  • S2011b The electronic device runs the first system recovery mechanism in response to the selection operation of the first system recovery mechanism option.
  • the electronic device executes S2101a-S2101b, and the electronic device completes the system recovery. During the subsequent movement of the electronic device, if the electronic device is normally shut down, and the lower 3 bits of the above BIOS Flash Flag (Including Flag [3: 0]) reset, that is, cleared.
  • BIOS Flash Flag including Flag [3: 0]
  • the electronic device receives a selection operation of a second system recovery mechanism option.
  • the electronic device runs the second system recovery mechanism in response to the selection operation of the second system recovery mechanism option.
  • the electronic device responds to the selection operation of the second system recovery mechanism option, and running the second system recovery mechanism specifically includes: the electronic device sets advanced startup instruction information of the electronic device (for example, sets Flag [5] to 1 ), And then the electronic device restarts, that is, the electronic device re-executes the steps starting from the above S201.
  • the electronic device executes the above S205, that is, when the advanced startup instruction information is obtained, since the The advanced startup instruction information is set to 1, so that the electronic device runs a second system recovery mechanism under the instruction of the advanced startup instruction information to achieve system recovery of the electronic device.
  • the electronic device executes the second system recovery mechanism to complete the system recovery.
  • the electronic device if the electronic device is normally shut down, the electronic device resets the lower 3 bits in the above-mentioned BOIS Flash Flag, that is, it is cleared to zero. .
  • the first system recovery mechanism is an OEM-defined system recovery mechanism
  • the second system recovery mechanism is a Windows default system recovery mechanism.
  • an OEM-defined system recovery mechanism is used.
  • the system recovery mechanism has the advantages of fast speed and good universality.
  • S2103a The electronic device receives a selection operation of a continue startup option.
  • S2103b The electronic device continues to start in response to the selection operation of the continue start option.
  • the electronic device continues to start means that the electronic device continues to start according to a normal startup process. For details, refer to the related description in S207.
  • the electronic device may start smoothly, and the electronic device may not start smoothly.
  • the electronic device receives a selected operation of the shutdown and restart option.
  • the electronic device responds to the selection operation of the shutdown and restart option, and restarts after shutdown.
  • the electronic device when the electronic device is powered off, if the electronic device is powered off normally, the lower 3 bits (ie, including Flag [3: 0]) in the BIOS Flash flag are reset, that is, cleared. After the electronic device is turned off and then restarted, the electronic device restarts performing the actions starting from the above S201.
  • the lower 3 bits ie, including Flag [3: 0]
  • the electronic device also needs to perform the above S208 (obtaining the system recovery instruction information of the electronic device). ).
  • the electronic device displays a second interface, where the second interface includes a first system recovery mechanism option and a shutdown and restart option.
  • the above electronic device displays a second interface, and the user can perform related operations on the second interface, that is, an operation of selecting a certain option according to requirements.
  • the electronic device receives a selection operation of a first system recovery mechanism option.
  • the electronic device runs the first system recovery mechanism in response to the selection operation of the first system recovery mechanism option.
  • the electronic device receives a selected operation on the shutdown and restart option.
  • the electronic device responds to the selection operation of the shutdown and restart option, and restarts after shutdown.
  • the foregoing electronic device includes a hardware structure and / or a software module corresponding to performing each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is performed by hardware or computer software-driven hardware depends on the specific application of the technical solution and design constraints. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
  • the embodiments of the present application may divide the functional modules of the electronic device according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules may be implemented in the form of hardware or software functional modules. It should be noted that the division of the modules in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 8 shows a possible structural diagram of an electronic device involved in the foregoing embodiment.
  • the electronic device 1000 includes a processing module 1001, a storage module 1002, a communication module 1003, and a display module 1004.
  • the processing module 1001 is configured to obtain the number of abnormal shutdowns of the electronic device during the BIOS startup phase of the electronic device.
  • the processing module 1001 is configured to support the electronic device to execute S101 and S206 in the foregoing embodiment.
  • the storage module 1002 may be used to store data or program code.
  • the processing module 1001 is further configured to control the display module 1004 to display a first interface when the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold, and the first interface includes a first system recovery mechanism option.
  • the processing module 1001 It is used to support the electronic device to execute S102 in the above embodiment.
  • the processing module 1001 is further configured to receive the selection operation of the first system recovery mechanism option through the communication module 1003, and run the first system recovery mechanism in response to the selection operation of the first system recovery mechanism option.
  • the processing module 1001 is configured to: Support the electronic device to execute S103-S104 in the above embodiment.
  • the processing module 1001 is further configured to obtain advanced startup instruction information of the electronic device.
  • the advanced startup instruction information is used to instruct the processing module 1001 to run a second system recovery mechanism.
  • the processing module 1001 is configured to support the execution of the electronic device. S205 in the above embodiment.
  • the first interface further includes at least one of the following: a second system recovery mechanism option, a continuous startup option, and a shutdown and restart option; if the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold, the processing module 1001 also uses After receiving the selection operation of the second system recovery mechanism option through the communication module 1003, and in response to the selection operation of the second system recovery mechanism option, the second system recovery mechanism is run, for example, the processing module 1001 is used to support the electronic device to perform the above implementation S2102a-S2102b in the example.
  • a second system recovery mechanism option if the number of abnormal shutdowns of the electronic device is greater than or equal to a preset threshold, the processing module 1001 also uses After receiving the selection operation of the second system recovery mechanism option through the communication module 1003, and in response to the selection operation of the second system recovery mechanism option, the second system recovery mechanism is run, for example, the processing module 1001 is used to support the electronic device to perform the above implementation S2102a-S2102b in the example.
  • the processing module 1001 is further configured to control the display module 1004 to display a second interface during the BIOS startup phase of the electronic device when the user manually presses the first system recovery hot key.
  • the second interface includes the first system recovery mechanism option and shutdown. Restart option.
  • the processing module 1001 is further configured to receive the selection operation of the first system recovery mechanism option through the communication module 1003, and run the first system recovery mechanism in response to the selection operation of the first system recovery mechanism option.
  • the processing module 1001 is configured to: Support the electronic device to execute S211, S2121a-S2121b in the above embodiment.
  • the processing module 1001 is further configured to increase the number of abnormal shutdowns by 1 during the startup of the electronic device; if the electronic device is normally shut down during subsequent operation of the electronic device, the number of abnormal shutdowns is cleared to 0; If the device shuts down abnormally, the number of abnormal shutdowns is not cleared.
  • the processing module 1001 is further configured to obtain an EC status during a BIOS startup phase of the electronic device, and the EC status indicates whether the electronic device has a shutdown event triggered by a watchdog mechanism; if the electronic device has a watchdog mechanism trigger , The number of abnormal shutdowns obtained by the electronic device during the BOIS startup phase is reduced by one.
  • the electronic device 1000 includes, but is not limited to, the unit modules listed above.
  • the electronic device 1000 may further include a receiving module and a transmitting module.
  • the receiving module is used to receive data or instructions sent by other electronic devices.
  • the sending module is used to send data or instructions to other electronic devices.
  • the specific functions that can be implemented by the above functional units also include but are not limited to the functions corresponding to the method steps described in the above examples. For detailed descriptions of other units of the electronic device 1000, refer to the detailed description of the corresponding method steps. The embodiment is not repeated here.
  • the processing module 1001 may be a processor or a controller, for example, it may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit. (application-specific integrated circuit, ASIC), field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logical blocks, modules, and circuits described in connection with the present disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the communication module may be a transceiver, a transceiver circuit, or a communication interface.
  • the storage module 1002 may be a memory.
  • the processing module 1001 is a processor (such as the processor 10 shown in FIG. 1)
  • the storage module 1002 is a memory (such as the internal memory 111 shown in FIG. 1)
  • the communication module 1004 can communicate with an interface.
  • the display module 1004 is a touch screen (including a display screen 131 shown in FIG. 1, in which a display panel and a touch panel are integrated).
  • the electronic device provided in the embodiment of the present application may be the electronic device 100 shown in FIG. 1.
  • the processor, the communication interface, the touch screen, and the memory may be coupled together through a bus.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center through a cable (Such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, and the like including one or more available medium integration.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, solid state drives (SSD)), etc. .
  • a magnetic medium for example, a floppy disk, a magnetic disk, a magnetic tape
  • an optical medium for example, a digital video disc (DVD)
  • DVD digital video disc
  • SSD solid state drives
  • the disclosed apparatus and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division.
  • multiple units or components may be divided.
  • the combination can either be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solution of the embodiments of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product that is stored in a storage medium. Included are several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

一种系统恢复方法及装置,涉及通信技术领域,能够更加顺利地引导用户实现电子设备的系统恢复。该方法应用于电子设备,包括:在电子设备的BIOS启动阶段,获取该电子设备的异常关机次数(S101);若电子设备的异常关机次数大于或者等于预设阈值,则显示第一界面,该第一界面包括第一系统恢复机制选项(S102);电子设备接收对第一系统恢复机制选项的选中操作(S103);电子设备响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制(S104)。

Description

一种系统恢复方法及装置
本申请要求于2018年07月20日提交中国专利局、申请号为201810804698.0、申请名称为“一种系统恢复方法及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种系统恢复方法及装置。
背景技术
在电子设备(例如计算机等)在启动的过程中,由于该电子设备的原装系统损坏无法进入系统时,可以使用系统恢复出厂功能还原该电子设备的系统,进而顺利启动。
以计算机为例,通常计算机启动时,首先进行基本输入输出系统(basic input output system,BIOS)的启动,然后再进行操作系统(operating system,OS)的启动。目前,在计算机完成BIOS启动之后,由计算机的启动管理器和启动加载器进行OS启动,若计算机不能正常启动,则启动加载器将自动引导计算机进入系统恢复环境(例如WinRE,英文全称:windows recovery environment),或者由用户手动按下相应的热键(例如F8键),使得计算机进入系统恢复环境,实现计算机的系统恢复出厂设置。
然而,上述方法中,若计算机在OS启动之前发生故障,则计算机无法进入系统恢复环境,如此,导致计算机无法工作。
发明内容
本申请实施例提供一种系统恢复方法及装置,能够更加顺利地引导用户实现电子设备的系统恢复。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种系统恢复方法,应用于电子设备,该方法包括:在电子设备的BIOS启动阶段,获取电子设备的异常关机次数;若电子设备的异常关机次数大于或者等于预设阈值,则显示第一界面,该第一界面包括第一系统恢复机制选项;并且接收对第一系统恢复机制选项的选中操作,响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
本申请实施例提供的系统恢复方法,由于在电子设备的启动过程中的BIOS启动阶段,在电子设备的异常关机次数大于或者等于预设阈值的情况下,可以引导用户按照需求选择系统恢复机制(例如上述的第一系统恢复机制),从而使得该电子设备运行该系统恢复机制,如此,能够更加顺利地引导用户实现电子设备的系统恢复。
结合第一方面,在电子设备的异常关机次数大于或者等于预设阈值的情况下,设置系统恢复指示信息,该系统恢复指示信息用于指示电子设备显示第一界面。
结合第一方面,在电子设备的异常关机次数小于预设阈值的情况下,该电子设备按照正常的启动流程继续启动,具体的,该电子设备继续运行其他上电自检进程、加 载操作系统进程、操作系统回调ACPI进程、BIOS响应操作系统回调ACPI进程,并将异常关机次数增加1,然后再执行其他操作系统进程。
在第一方面的第一种可选的实现方式中,上述获取电子设备的异常关机次数之前,本申请实施例提供的系统恢复方法还包括:获取电子设备的高级启动指示信息,该高级启动指示信息用于指示电子设备运行第二系统恢复机制,本申请实施例中,系统还原标志的某一位可以定义为高级启动指示信息,该高级启动指示信息为1时指示电子设备运行第二系统恢复机制;高级启动指示信息为0时指示电子设备获取异常关机次数。
在第一方面的第二种可选的实现方式中,上述第一界面还包括下述至少一项:第二系统恢复机制选项、继续启动选项、关机重启选项。若电子设备的异常关机次数大于或者等于预设阈值,本申请实施例提供的系统恢复方法还包括:接收对第二系统恢复机制选项的选中操作;响应于对第二系统恢复机制选项的选中操作,运行第二系统恢复机制。本申请实施例中,第一界面可以包括多种选项,从而用户可以更加灵活地根据实际需求选择不同的选项,进而电子设备进行相应的响应。
在第一方面的第三种可选的实现方式中,本申请实施例提供的系统恢复方法还包括:在电子设备的BIOS启动阶段,若用户手动按下第一系统恢复热键,则电子设备显示第二界面,该第二界面包括第一系统恢复机制选项和关机重启选项;并且接收对第一系统恢复机制选项的选中操作,响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。本申请实施例中,在电子设备开机的过程中,电子设备可以自动引导电子设备进行系统恢复,而且用户也可以通过按下热键主动触发电子设备进行系统恢复。
在第一方面的第四种可选的实现方式中,本申请实施例提供的系统恢复方法还包括:在电子设备启动过程中,将异常关机次数增加1;在后续电子设备的运行过程中,若电子设备正常关机,则将异常关机次数清0,若电子设备异常关机,则异常关机次数不清零。本申请实施例中,在电子设备启动时将异常关机次数增加1之后,若电子设备后续发生异常关机,不将该异常关机次数清零,如此,在下次开机时,可以获取该异常关机次数,并根据异常关机次数确定是否对该电子设备进行系统恢复。
在第一方面的第五种可选的实现方式中,本申请实施例提供的系统恢复方法还包括:在电子设备的BIOS启动阶段,获取EC的状态,该EC的状态指示电子设备是否存在看门狗机制触发的关机事件;若电子设备存在看门狗机制触发的关机事件,将电子设备在BOIS启动阶段获取的异常关机次数减1。本申请实施例中,电子设备中的看门狗机制触发该电子设备关机时,此种关机现象实际上并不认为是异常关机,而认为是正常关机。然而,在电子设备的内部实现过程中,由于在看门狗机制触发电子设备关机时,上述异常关机次数也会增加1,并且电子设备的EC会记录(也可以理解为EC会感知)此事件(即由于看门狗机制触发的关机事件),如此,在电子设备下一次启动的过程中,在BIOS启动阶段,会查询EC的状态,并且根据EC的状态确定电子设备存在看门狗触发的关机事件时,将获取到的异常关机次数减掉1,得到异常关机次数的真实值,并进一步判断是否对该电子设备进行系统恢复。
结合第一方面的第五种可选的实现方式,电子设备在休眠状态下看门狗机制触发 电子设备关机的事件,电子设备会将上述异常关机次数清0(即电子设备的异常关机次数不会发生累加),并且EC对此种看门狗触发的关机事件不做记录(即EC不感知)。
在第一方面的第六种可选的实现方式中,上述第一系统恢复机制为OEM自定义的系统恢复机制,该第二系统系统恢复机制为Windows默认的系统恢复机制,相比于Windows默认的系统恢复选项,采用OEM自定义的系统恢复机制进行系统恢复具有速度快、通用性好的优点。本申请实施例中,第一系统恢复机制与第二系统恢复机制,第一系统恢复机制和第二系统恢复机制也可以为其他的系统恢复机制。
在第一方面的第七种可选的实现方式中,上述电子设备异常关机包括下述至少一项:强制关机、电子设备发生蓝屏后关机。本申请实施例中,强制关机指的是电子设备直接掉电关机(例如用户手动长按电源键掉电),计算机发生蓝屏后关机指的是电子设备还未进入操作系统时发生异常,从而出现蓝屏之后关机。本申请实施例中,异常关机场景包含又不限于上面描述的这两个场景。
第二方面,本申请实施例提供一种电子设备,该电子设备包括一个或多个处理器、存储器、通信接口以及触摸屏;该存储器、通信接口与处理器耦合;触摸屏用于显示处理器生成的图像;存储器用于存储计算机程序代码;该计算机程序代码包括计算机指令,当处理器执行上述计算机指令时,该处理器,用于在电子设备的BIOS启动阶段,获取电子设备的异常关机次数;该处理器,还用于在电子设备的异常关机次数大于或者等于预设阈值的情况下,控制触摸屏显示第一界面,该第一界面包括第一系统恢复机制选项;该处理器,还用于通过通信接口接收对第一系统恢复机制选项的选中操作,并且响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
在第二方面的第一种可选的实现方式中,上述处理器,还用于获取电子设备的高级启动指示信息,该高级启动指示信息用于指示处理器运行第二系统恢复机制。
在第二方面的第二种可选的实现方式中,上述第一界面还包括下述至少一项:第二系统恢复机制选项、继续启动选项、关机重启选项;上述处理器,还用于通过通信接口接收对第二系统恢复机制选项的选中操作,并且响应于对第二系统恢复机制选项的选中操作,运行第二系统恢复机制。
在第二方面的第三种可选的实现方式中,上述处理器,还用于在电子设备的BIOS启动阶段,若用户手动按下第一系统恢复热键,控制触摸屏显示第二界面,该第二界面包括第一系统恢复机制选项和关机重启选项;上述处理器还用于接收对第一系统恢复机制选项的选中操作,并且响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
在第二方面的第四种可选的实现方式中,上述处理器,还用于在电子设备启动过程中,将异常关机次数增加1;在后续电子设备的运行过程中,若电子设备正常关机,则将异常关机次数清0,若电子设备异常关机,则异常关机次数不清零。
在第二方面的第五种可选的实现方式中,上述处理器,还用于在电子设备的BIOS启动阶段,获取EC的状态,该EC的状态指示电子设备是否存在看门狗机制触发的关机事件;若电子设备存在看门狗机制触发的关机事件,将该处理器在BOIS启动阶段获取的异常关机次数减1。
在第二方面的第六种可选的实现方式中,上述第一系统恢复机制为OEM自定义的 系统恢复机制,该第二系统系统恢复机制为Windows默认的系统恢复机制。
在第二方面的第七种可选的实现方式中,上述电子设备异常关机包括下述至少一项:强制关机、电子设备发生蓝屏后关机。
第三方面,本申请实施例提供一种计算机存储介质,该计算机存储介质包括计算机指令,当计算机指令在电子设备上运行时,使得所述电子设备执行第一方面及其各种可选的实现方式中任意之一所述的系统恢复方法。
第四方面,本申请实施例提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行第一方面及其各种可选的实现方式中任意之一所述的系统恢复方法。
第二方面及其可选的实现方式所述的终端,以及第三方面所述的计算机存储介质、第四方面所述的计算机程序产品所带来的技术效果可参见上述第一方面及其可选的实现方式所带来的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种计算机的硬件示意图;
图2为本申请实施例提供的系统恢复方法示意图一;
图3为本申请实施例提供的各个指示信息的示意图;
图4为本申请实施例提供的电子设备的显示界面实例示意图一;
图5为本申请实施例提供的系统恢复方法示意图二;
图6为本申请实施例提供的电子设备的显示界面实例示意图二;
图7为本申请实施例提供的电子设备的显示界面实例示意图三;
图8为本申请实施例提供电子设备的结构示意图。
具体实施方式
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一系统恢复机制和第二系统恢复机制等是用于区别不同的系统恢复机制,而不是用于描述系统恢复机制的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。
首先对本申请实施例提供的一种系统恢复方法及装置中涉及的一些概念做解释说明。
以电子设备为计算机为例,计算机的启动过程包括基本输入输出系统(BIOS)启 动和操作系统(OS)启动,计算机开机之后首先进行BIOS阶段的启动,完成BIOS启动之后,开始启动OS。
基本输入输出系统(BIOS):是一组固化到计算机内主板上一个只读存储器(read only memory,ROM)芯片上的程序,它保存着计算机最重要的基本输入输出的程序、系统设置信息、开机后自检程序和系统自启动程序,其主要功能是为计算机提供最底层的、最直接的硬件设置和控制。
操作系统:是管理计算机硬件资源,控制其他程序运行并为用户提供交互操作界面的系统软件的集合。操作系统是计算机系统的关键组成部分,负责管理与配置内存、决定系统资源供需的优先次序、控制输入与输出设备、操作网络与管理文件系统等基本任务。操作系统的种类很多,各种设备安装的操作系统可从简单到复杂,可从手机的嵌入式操作系统到超级计算机的大型操作系统。常见的操作系统主要有Android、iOS、Linux、Windows、Mac OS X等。
异常关机:在Windows系统下,正常关机的关机流程需要执行三个步骤:软保护、硬保护,然后断电。其中,软保护指的是关闭用户的所有应用程序,保存用户的系统设置,停止系统服务;硬保护指的是停止硬件驱动程序;最后断电。
异常关机,即并未按照上述关机流程进行的关机现象,异常关机的场景可以包括用户手动强制关机或计算机发生蓝屏情况下的关机。具体的,用户手动强制关机的场景可以包括电子设备直接掉电关机(例如长按电源键掉电),计算机发生蓝屏情况下的关机可以包括电子设备还未进入操作系统时发生异常,从而出现蓝屏等现象时,自动重启的流程。本申请实施例中,异常关机场景包含又不限于上面描述的这两个场景。
看门狗机制触发的关机:看门狗是一种保护机制,看门狗的工作原理实际上相当于一个定时器电路,在计算机中,处理器在一定的时间周期内输出一个信号到看门狗的输入端(即喂狗端),使得看门狗电路清零,如果在规定的时间周期内没有输出信号至看门狗,看门狗会产生一个系统复位,即关闭计算机并重新启动。总的来说,看门狗可以防止程序无限制的运行,造成死循环,或者程序跑飞。
基于背景技术存在的问题,本申请实施例提供一种系统恢复方法及装置,可以在电子设备的BIOS启动阶段,获取该电子设备的异常关机次数;并且在电子设备的异常关机次数大于或者等于预设阈值,显示包括第一系统恢复机制选项的第一界面;以及接收对该第一系统恢复机制选项的选中操作;响应于对该第一系统恢复机制选项的选中操作,运行第一系统恢复机制,从而实现电子设备的系统恢复。
本申请实施例提供的电子设备可以为具有操作系统的电子设备,例如该电子设备可以为计算机(例如台式电脑、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)等)、手机、上网本或者个人数字助理(personal digital assistant,PDA)、智能汽车、传感设备、物联网(internet of thing,IOT)设备、客户终端设备(customer premise equipment,CPE)等。
示例性的,以电子设备为计算机为例介绍电子设备的硬件结构。如图1所示,本申请实施例提供的计算机包括处理器10、存储器11、输入设备12、输出设备13等部件。本领域技术人员可以理解,图1中示出的计算机的结构并不构成对计算机的限定,其可以包括比如图1所示的部件更多或更少的部件,或者可以组合如图1所示的部件 中的某些部件,或者可以与如图1所示的部件布置不同。
处理器10:是计算机的核心部件,处理器10可以中央处理器(central processing unit,CPU),在微型计算机(简称微机或个人计算机)中,CPU又称为微处理器。处理器主要由控制器101和运算器102组成。
其中,控制器101是计算机中指令的解释和执行结构,其主要功能是控制运算器102、存储器11、输入设备12、输出设备13等部件协调动作。控制器101工作时,从存储器11取出一条指令,并指出下一条指令所在的存放地址,然后对所取指令进行分析,同时产生相应的控制信号,并由控制信号启动有关部件,使这些部件完成指令所规定的操作。这样逐一执行一系列指令组成的程序,就能使计算机按照程序的要求,自动完成预定的任务。
运算器102的主要功能是完成对数据的算术运算、逻辑运算和逻辑判断等操作。在控制器101控制下,运算器102对取自存储器11或其内部寄存器的数据按指令码的规定进行相应的运算,并将结果暂存在内部寄存器或送到存储器11中。
存储器11:是用来存储程序和数据的部件,是计算机的重要组成部分。存储器11可以包括内存111和硬盘112。其中,内存是内存储器的简称,内存111由高速的半导体存储器芯片组成,是计算机运行过程中临时存放程序和数据的地方。计算机运行过程中,将待处理的数据,先从硬盘112调入内存111,再从内存111调入处理器10;处理器10处理完毕后,将数据送到内存111,最后保存到硬盘112。
内存111可以包括随机存取存储器(random access memory,RAM)、ROM、高速缓冲存储器(Cache)。RAM中的数据可随机地读出或写入,是用来存放从硬盘112调入的程序和有关数据以及从处理器10送出的数据,通常所说的内存实际上指的是RAM。需要指出的是,计算机断电后,RAM中的数据将完全丢失。ROM占内存的很小一部分,ROM中通常存放的是一些固定的、专用程序或数据,处理器10对ROM仅进行读取。Cache的存储容量比较小,但速度比RAM高得多,接近于CPU的速度,Cache在计算机存储系统的层次结构中,是介于CPU和RAM之间的高速小容量存储器。
输入设备12:用于向计算机输入程序和所需处理的原始数据(包括文本、图形、图像、声音等),计算机上的输入设备12可以包括键盘121、鼠标122。键盘121键盘是计算机中最基本的输入设备,键盘上排列了字母、数字、符号键等,通过按键操作,可把命令、程序和数据等信息输入到计算机中。鼠标122是计算机中的辅助输入设备,鼠标122是一种指点“设备”,表面有2个或3个按键,通过鼠标可对操作对象进行单击、双击、拖动等操作。鼠标122可以包括有线鼠标和无线鼠标。
可选的,计算机的输入设备131还可以包括扫描仪、手写板等。
输出设备13:用于输出计算机的运行或数据处理结果。输出设备13可以包括显示器131,显示器131是计算机最基本的输出设备,也是人机对话的主要工具。计算机通过显示器用户提供各种应用软件的操作界面,用户可以通过这些界面输入数据、选择各种功能、获知程序运行的结果等。
显示器131可以为触摸显示器,该显示器131包括显示面板和触摸屏。可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板。进一步的,触摸屏可覆盖显 示面板,当触摸屏检测到在其上或附近的触摸操作后,传送给处理器10以确定触摸事件的类型,随后处理器10根据触摸事件的类型在显示面板上提供相应的视觉输出。触摸屏与显示面板是作为两个独立的部件来实现计算机的输入和输出功能,但是在某些实施例中,可以将触摸屏与显示面板集成而实现计算机的输入和输出功能。
可选的,上述输出设备13还可以包括打印机、绘图仪等。
可选的,本申请实施例提供的计算机还可以包括调制解调器、风扇、电源、网卡、声卡、Wi-Fi模块、蓝牙模块等。
本申请实施例提供的计算机还包括软件系统,包括系统软件和应用软件,系统软件包括操作系统(OS)。
基于上述对电子设备的各个构成部件的描述,本申请实施例提供一种系统恢复方法,如图2所示,该方法可以包括S101-S104:
S101、在电子设备的BIOS启动阶段,获取该电子设备的异常关机次数。
其中,上述电子设备的异常关机包括下述至少一项:强制关机、电子设备发生蓝屏后关机。该电子设备的异常关机还可以包括其他导致电子设备关机的现象,本申请实施例不作具体限定。
本申请实施例中,在BIOS的内存空间中,将BIOS中的闪存中的一个字节(即8位比特)的存储空间用于存储用于与电子设备的系统恢复方法有关的指示信息(或者可以理解为标志位),可以称为系统还原标志,下述实施例中,将该系统还原标志记为BIOS Flash Flag。具体的,可以将BIOS Flash Flag中的某些位用于指示异常关机次数,如此,在电子设备开机过程中,在BIOS启动阶段,通过读取BIOS Flash Flag中的对应的比特,从而得到该电子设备的异常关机次数。
示例性的,如图3所示,对于上述BIOS Flash Flag,按照从右向左的方向,将BIOS Flash Flag的前3位(即低3位)用于指示异常关机次数,记为Flag[3:0]。上述BIOS Flash Flag的低3位比特所表示的二进制数可以为异常关机次数,示例性的,如下表1为BIOS Flash Flag的低3位比特的取值与异常关机次数之间的关系示例。
表1
低3位比特的取值 异常关机次数
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
需要说明的是,本申请实施例中,上述异常关机次数是一个累加值。具体的,在电子设备启动过程中,BOIS完成启动,并且操作系统加载完成之后,操作系统可以回调高级配置和电源管理接口(advanced configuration and power interface,ACPI),操作系统通过回调ACPI以获得对电子设备的管理权限,从而BIOS响应于该操作系统 对ACPI的回调,将对电子设备的管理权限移交至操作系统,并且BIOS将异常关机次数增加1,即将BIOS Flash Flag中的低3位的值增加1;在后续电子设备的运行过程中,若该电子设备正常关机,则将异常关机次数清0;若电子设备异常关机,则异常关机次数不清零,在这种情况下,可见在电子设备发生异常关机时,电子设备的异常关机次数会累加。
S102、若电子设备的异常关机次数大于或者等于预设阈值,则该电子设备显示第一界面,该第一界面包括第一系统恢复机制选项。
本申请实施例中,上述第一系统恢复机制选项对应的是第一系统恢复机制,该第一系统恢复机制可以为原始设备制造商(original equipment manufacturer,OEM)自定义的系统恢复机制。
需要说明的是,上述预设阈值可以根据实际使用需求设置(例如设置为3次),本申请实施例不作具体限定。
S103、电子设备接收对第一系统恢复机制选项的选中操作。
本申请实施例中,电子设备的显示屏为触摸屏时,上述对第一系统恢复机制的选中操可以为通过手指触发或触控笔触发的对电子设备的触控屏的按压操作、长按操作、滑动操作、点击操作、悬浮操作(用户在触控屏附近的操作)等。
可选的,上述对第一系统恢复机制选项的选中操作也可以为按键操作,例如按键操作对应于对电子设备的电源键、音量键、键盘上的Enter键等按键的单击操作、双击操作、长按操作、组合按键操作等操作。
S104、电子设备响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
本申请实施例中,上述电子设备运行第一系统恢复机制即指的是电子设备运行第一系统恢复机制对应的系统恢复程序,使得电子设备的系统恢复成出厂设置的状态。
示例性的,以电子设备为计算机为例,如图4所示,当计算机的异常关机次数大于或者等于预设阈值(例如3次)时,计算机显示第一界面200,在该第一界面200中包括第一系统恢复机制选项201,用户可以选中(例如点击)该第一系统恢复机制选项201,从而计算机进行相应的响应。
本申请实施例提供的系统恢复方法,由于在电子设备的启动过程中的BIOS启动阶段,在电子设备的异常关机次数大于或者等于预设阈值的情况下,可以引导用户按照需求选择系统恢复机制(例如上述的第一系统恢复机制),从而使得该电子设备运行该系统恢复机制,如此,能够更加顺利地引导用户实现电子设备的系统恢复。
下面从电子设备的完整的启动过程详细介绍本申请实施例提供的系统恢复方法,如图5所示,该方法可以包括:
S201、上电自检。
S202、处理上电自检进程。
本申请实施例中,电子设备开始启动(例如用户按下开启按钮)时,首先进行BIOS的启动,即电子设备开始自检。
S203、检测用户是否按下热键。
本申请实施例中,在电子设备的开机过程中,检测到用户按下某一热键(例如F8 或F10等)相当于向电子设备输入了某一指令,然后电子设备会响应于该指令,执行对应的操作。
示例性的,用户按下热键F8时,可以执行下述S204a:
S204a、用户按下热键F8,电子设备执行第二系统恢复机制。
本申请实施例中,在电子设备开机过程中,按下热键F8对应的操作是电子设备执行第二系统恢复机制,实现系统恢复。
上述第二系统恢复机制可以为Windows默认的系统恢复机制(可以简称为WinRE),该第二系统恢复机制也可以为其他类型的系统恢复机制,本申请实施例不作具体限定。
可选的,本申请实施例中,上述电子设备进入第二系统恢复机制,完成电子设备的系统恢复之后,若该电子设备可以正常关机,则将异常关机次数清零,即将上述BOIS Flash Flag中的低3为比特复位,例如,若“0”表示复位,则将BIOS Flash Flag的低3位比特均清零。
用户按下热键F10时,可以执行下述S204b:
S204b、用户按下热键F10,电子设备执行第一系统恢复机制。
本申请实施例中,在电子设备开机过程中,按下热键F10对应的操作是电子设备执行第一系统恢复机制,实现系统恢复。其中,第一系统恢复机制与上述第二系统恢复机制不同,例如该第一系统恢复机制可以为OEM自定义的系统恢复机制。
同理,可选的,本申请实施例中,上述电子设备进入第一系统恢复机制,完成电子设备的系统恢复之后,若该电子设备可以正常关机,则将异常关机次数清零,即该电子设备将上述BOIS Flash Flag中低3位比特清零。
上述S204a或S204b中电子设备进行系统恢复均是用户主动操作的结果,并非电子设备自动(或自发)地引导用户进行选择的结果。
用户按下热键F12时,可以执行下述S204c:
S204c、用户按下热键F12,电子设备显示系统引导界面。
本申请实施例中,用户按下热键F12之后,电子设备可以显示系统引导界面,从而用户可以在该引导界面上进行相关操作,进入指定的系统。
用户按下热键F2时,可以执行下述S204d:
S204d、用户按下热键F2,电子设备显示BIOS设置界面。
本申请实施例中,用户按下热键F2之后,电子设备可以显示BIOS设置界面,从而可以在该界面上设置BIOS的一些开关。
本申请实施例中,若检测用户未按下任何热键,则执行下述S205以及后续的相关步骤:
S205、获取电子设备的高级启动指示信息。
其中,上述高级启动指示信息指示电子设备运行第二系统恢复机制。
本申请实施例中,如图3所示,可以将上述BIOS Flash Flag的第5位(按照从右到左的方向)定义为高级启动指示信息,记为Flag[5]。上述获取电子设备的高级启动指示信息具体包括:在BIOS启动阶段,读取BOIS Flash Flag的第5位,即Flag[5]。
可选的,本申请实施例中,可以采用标识“1”来指示电子设备运行第二系统恢复机制,也可以采用标识“0”来指示电子设备运行第二系统恢复机制,具体可以根据实 际使用需求选择,本申请实施例不作限定。
示例性的,如果上述高级启动指示信息为1时指示电子设备运行第二系统恢复机制,那么高级启动指示信息为0时指示电子设备获取异常关机次数,如下表2为高级启动指示信息与其指示的含义之间的关系的一种示例。
表2
高级启动指示信息 含义
1 运行第二系统恢复机制
0 获取异常关机次数
如图5所示,本申请实施例中,若上述高级启动指示信息为“1”,该电子设备运行上述第二系统恢复机制(即WinRE),若上述高级启动指示信息为“0”,执行下述S206:
S206、获取电子设备的异常关机次数。
本申请实施例中,在BIOS启动阶段,读取BOIS Flash Flag中的低3位比特,即Flag[3:0],结合上述S101中的表1可知电子设备的异常关机次数。
需要强调的是,本申请实施例中,在电子设备的BIOS启动阶段,可以获取嵌入式控制器(embedded controller,EC)的状态,该EC的状态指示该电子设备是否存在看门狗机制触发的关机事件。
若电子设备存在看门狗机制触发的关机事件,将该电子设备在BIOS启动阶段获取的异常关机次数减1,得到新的异常关机次数,然后再根据新的异常关机次数确定该电子设备是否需要进行系统恢复。若该电子设备不存在看门狗机制触发的关机事件,则直接根据获取的异常关机次数确定该电子设备是否需要进行系统恢复。
本申请实施例中,电子设备中的看门狗机制触发该电子设备关机时,此种关机现象实际上并不认为是异常关机,而认为是正常关机。然而,在电子设备的内部实现过程中,由于在看门狗机制触发电子设备关机时,上述异常关机次数也会增加1,并且电子设备的EC会记录(也可以理解为EC会感知)此事件(即由于看门狗机制触发的关机事件),如此,在电子设备下一次启动的过程中,在BIOS启动阶段,会查询EC的状态,并且根据EC的状态确定电子设备存在看门狗触发的关机事件时,将获取到的异常关机次数减掉1,得到异常关机次数的真实值。
需要说明的是,电子设备在休眠状态下看门狗机制触发电子设备关机的事件,电子设备会将上述异常关机次数清0(即电子设备的异常关机次数不会发生累加),并且EC对此种看门狗触发的关机事件不做记录(即EC不感知)。
S207、电子设备确定该异常关机次数是否大于或者等于预设阈值。
一种实现方式中,在电子设备的异常关机次数小于预设阈值的情况下,该电子设备按照正常的启动流程继续启动,如图5所示,该电子设备继续运行其他上电自检进程、加载操作系统进程、操作系统回调ACPI进程、BIOS响应操作系统回调ACPI进程,并将异常关机次数增加1(具体的,在上述异常关机次数小于或者等于15的情况下,将该异常关机次数增加1),然后再执行其他操作系统进程。
结合上述S101中的相关描述,电子设备后续运行过程中,若电子设备正常关机,则将上述异常关机次数清零,若电子设备异常关机,则上述异常关机次数值不清零, 即异常关机次数会累加。
另一种实现方式中,在电子设备的异常关机次数大于或者等于预设阈值的情况下,设置系统恢复指示信息,该系统恢复指示信息用于指示电子设备显示第一界面。
本申请实施例中,如图3所示,可以将BIOS Flash Flag的第4位(按照从右到左的方向)定义为系统恢复指示信息,记为Flag[4]。该系统恢复指示信息用于指示电子设备显示第一界面,从而用户可以根据需求在第一界面上进行相应的操作,从而电子设备做出不同的响应。
可选的,如图3所示,可以将该BIOS Flash Flag中的其他比特(如高3位比特)作为预留比特。
可选的,本申请实施例中,可以采用标识“1”来指示电子设备显示第一界面,也可以采用标识“0”来指示电子设备显示第一界面,具体可以根据实际使用需求选择,本申请实施例不作限定。
示例性的,如果上述系统恢复指示信息为“1”,那么指示电子设备显示第一界面;如果系统恢复指示信息为“0”,那么指示电子设备显示第二界面,该第一界面与第二界面不同。如下表3为系统恢复指示信息与其指示的含义之间的关系的一种示例。
表3
系统恢复指示信息 含义
1 显示第一界面
0 显示第二界面
需要说明的是,本申请实施例中,上述确定电子设备的异常关机次数是否大于或者等于预设阈值的动作是BIOS内部的一个动作,在BIOS确定异常关机次数是否大于或者等于预设阈值时,需要将此事件通知给还原应用,因此电子设备设置系统恢复指示信息(例如将Flag[4]设置为1),从而还原应用根据该系统恢复指示信息,运行OEM自定义的系统恢复机制。具体的实现方式是:将该电子设备的系统。
本申请实施例中,上述电子设备的异常关机次数大于或者等于预设阈值的情况下,设置该电子设备的系统恢复指示信息之后,继续执行下述S208:
S208、获取电子设备的系统恢复指示信息。
本申请实施例中,在BIOS启动阶段,获取系统恢复指示信息具体包括:读取BOIS Flash Flag中的第4位(从右向左),即Flag[4]。
对于系统恢复指示信息的描述,可以参将上述S207中关于系统恢复指示信息的详细描述,此处不再赘述。
本申请实施例中,以系统恢复指示信息为1指示电子设备显示第一界面,以系统恢复指示信息为0指示电子设备显示第二界面为例,若系统恢复指示信息为1,则执行S209等相关步骤。
S209、电子设备显示第一界面,该第一界面包括第一系统恢复机制选项。
可选的,本申请实施例中,上述第一界面还可以包括下述选项中的至少一项:第二系统恢复机制选项、继续启动选项、关机重启选项。电子设备显示第一界面,并且第一界面上显示不同的选项,用户可以在第一界面上进行相关的操作,即根据需求选择某一个选项的操作。
示例性的,以电子设备为计算机为例,并且以第一界面包括第一系统恢复机制选项、第二系统恢复机制选项、继续启动选项以及关机重启选项为例,如图6所示,当计算机的异常关机次数大于或者等于预设阈值(例如3次)时,计算机显示第一界面300,在该第一界面300中包括第一系统恢复机制选项301,第二系统恢复机制选项302,继续启动选项303以及关机重启选项304,用户可以根据需求选中(例如点击)上述四个选项中的任意一个(例如选中第二系统恢复机制选项302)。
若用户选中第一系统恢复机制选项,则执行下述S2101a-S2101b:
S2101a、电子设备接收对第一系统恢复机制选项的选中操作。
S2011b、电子设备响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
需要说明的是,本申请实施例中,电子设备执行S2101a-S2101b,电子设备完成系统恢复,在后续电子设备的运动过程中,若电子设备正常关机,并且将上述BIOS Flash Flag的低3位比特(包括Flag[3:0])复位,即清零。
对于S2101a-S2101b的其他描述,可以参见上述S103-S104的相关描述,此处不再赘述。
若用户选中第二系统恢复机制选项,则执行下述S2102a-S2102c:
S2102a、电子设备接收对第二系统恢复机制选项的选中操作。
S2102b、电子设备响应于对第二系统恢复机制选项的选中操作,运行第二系统恢复机制。
本申请实施例中,电子设备响应于对第二系统恢复机制选项的选中操作,运行第二系统恢复机制具体包括:电子设备设置电子设备的高级启动指示信息(例如将Flag[5]设置为1),然后电子设备重新启动,即电子设备重新执行上述S201开始的各个步骤,可以理解的是,当电子设备执行到上述S205时,即获取高级启动指示信息时,由于在重新启动前已经将该高级启动指示信息设置为1,如此,电子设备在该高级启动指示信息的指示下运行第二系统恢复机制,实现电子设备的系统恢复。
同理,电子设备执行第二系统恢复机制,完成系统恢复,在后续电子设备的运动过程中,若电子设备正常关机,该电子设备将上述BOIS Flash Flag中的低3位比特复位,即清零。
本申请实施例中,上述第一系统恢复机制为OEM自定义的系统恢复机制,上述第二系统恢复机制为Windows默认的系统恢复机制,相比于Windows默认的系统恢复选项,采用OEM自定义的系统恢复机制进行系统恢复具有速度快、通用性好的优点。
若用户选中继续启动选项,则执行下述S2103a-S2103b:
S2103a、电子设备接收对继续启动选项的选中操作。
S2103b、电子设备响应于对继续启动选项的选中操作,继续启动。
本申请实施例中,电子设备继续启动指的是电子设备按照正常的启动流程继续启动,具体可以参见上述S207中的相关描述。该电子设备继续启动时,该电子设备可能会顺利启动,该电子设备也可能无法顺利启动。
若用户选中关机重启选项,则执行下述S2104a-S2104b:
S2104a、电子设备接收对关机重启选项的选中操作。
S2104b、电子设备响应于对关机重启选项的选中操作,关机后再重新启动。
本申请实施例中,电子设备关机时,若电子设备正常关机,则将上述BIOS Flash Flag中的低3位(即包括Flag[3:0])复位,即清零。电子设备关机后再重新启动即电子设备重新开始执行上述S201开始的各个动作。
可选的,上述在电子设备的BIOS启动阶段,若用户手动按下第一系统恢复热键(即F10热键),则该电子设备还需要执行上述S208(获取该电子设备的系统恢复指示信息)。
本申请实施例中,若系统恢复指示信息为0,执行S211等相关步骤。
S211、电子设备显示第二界面,该第二界面包括第一系统恢复机制选项和关机重启选项。
上述电子设备显示第二界面,用户可以在第二界面上进行相关的操作,即根据需求选择某一个选项的操作。
示例性的,以电子设备为计算机为例,并且以第二界面包括第一系统恢复机制选项和关机重启选项为例,如图7所示,在BIOS启动阶段,用户按下计算机的热键F10,并且在系统恢复指示信息为第二标识的情况下,计算机显示第二界面400,在该第二界面400中包括第一系统恢复机制选项401和关机重启选项402,用户可以根据需求选中(例如点击)上述两个选项中的任意一个(例如选中第一系统恢复机制选项)。
若用户选中第一系统恢复机制选项,则执行下述S2121a-S2121b:
S2121a、电子设备接收对第一系统恢复机制选项的选中操作。
S2121b、电子设备响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
对于S2121a-S2121b的具体描述可以参见上述对于S2101a-S2101b的相关描述,此处不再赘述。
若用户选中关机重启选项,则执行下述S2122a-S2122b:
S2122a、电子设备接收对关机重启选项的选中操作。
S2122b、电子设备响应于对关机重启选项的选中操作,关机后再重新启动。
对于S2122a-S2122b的具体描述可以参见上述对于S2104a-S2104b的相关描述,此处不再赘述。
可以理解的是,上述电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
示例性的,图8示出了上述实施例中所涉及的电子设备的一种可能的结构示意图,该电子设备1000包括:处理模块1001、存储模块1002、通信模块1003以及显示模块1004。其中,处理模块1001用于在电子设备的BIOS启动阶段,获取该电子设备的异常关机次数,例如,处理模块1001用于支持电子设备执行上述实施例中的S101和S206。存储模块1002可以用于存储数据或程序代码。该处理模块1001还用于在电子设备的异常关机次数大于或者等于预设阈值的情况下,控制显示模块1004显示第一界面,该第一界面包括第一系统恢复机制选项,例如,处理模块1001用于支持电子设备执行上述实施例中的S102。该处理模块1001还用于通过通信模块1003接收对第一系统恢复机制选项的选中操作,并且响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制,例如处理模块1001用于支持电子设备执行上述实施例中的S103-S104。
可选的,上述处理模块1001还用于获取电子设备的高级启动指示信息,该高级启动指示信息用于指示该处理模块1001运行第二系统恢复机制,例如,处理模块1001用于支持电子设备执行上述实施例中的S205。
可选的,第一界面还包括下述至少一项:第二系统恢复机制选项、继续启动选项、关机重启选项;若电子设备的异常关机次数大于或者等于预设阈值,上述处理模块1001还用于通过通信模块1003接收对第二系统恢复机制选项的选中操作,并且响应于对第二系统恢复机制选项的选中操作,运行第二系统恢复机制,例如处理模块1001用于支持电子设备执行上述实施例中的S2102a-S2102b。
上述处理模块1001还用于在电子设备的BIOS启动阶段,若用户手动按下第一系统恢复热键,则控制显示模块1004显示第二界面,该第二界面包括第一系统恢复机制选项和关机重启选项。该处理模块1001还用于通过通信模块1003接收对第一系统恢复机制选项的选中操作,并且响应于对第一系统恢复机制选项的选中操作,运行第一系统恢复机制,例如处理模块1001用于支持电子设备执行上述实施例中的S211、S2121a-S2121b。
可选的,上述处理模块1001还用于在电子设备启动过程中,将异常关机次数增加1;在后续电子设备的运行过程中,若电子设备正常关机,则将异常关机次数清0;若电子设备异常关机,则异常关机次数不清零。
可选的,上述处理模块1001还用于在电子设备的BIOS启动阶段获取EC的状态,该EC的状态指示电子设备是否存在看门狗机制触发的关机事件;若电子设备存在看门狗机制触发的关机事件,将电子设备在BOIS启动阶段获取的异常关机次数减1。
当然,电子设备1000包括但不限于上述所列举的单元模块。例如,电子设备1000还可以包括接收模块和发送模块。接收模块用于接收其他电子设备发送的数据或者指令。发送模块用于向其他电子设备发送数据或者指令。并且,上述功能单元的具体所能够实现的功能也包括但不限于上述实例所述的方法步骤对应的功能,电子设备1000的其他单元的详细描述可以参考其所对应方法步骤的详细描述,本申请实施例这里不再赘述。
本申请实施例中,处理模块1001可以是处理器或控制器,例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC), 现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块可以是收发器、收发电路或通信接口等。存储模块1002可以是存储器。
其中,处理模块1001为处理器(如图1所示的处理器10),存储模块1002为存储器(如图1所示的内部存储器111),通信模块1004可以通信接口。显示模块1004为触摸屏(包括图1所示的显示屏131,该显示屏131中集成了显示面板和触控面板)。本申请实施例所提供的电子设备可以为图1所示的电子设备100。其中,上述处理器、通信接口、触摸屏、存储器等可以通过总线耦合在一起。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))方式或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、磁盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state drives,SSD))等。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成 的单元既可以使用硬件的形式实现,也可以使用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (18)

  1. 一种系统恢复方法,其特征在于,应用于电子设备,所述方法包括:
    在所述电子设备的基本输入输出系统BIOS启动阶段,获取所述电子设备的异常关机次数;
    若所述电子设备的异常关机次数大于或者等于预设阈值,则显示第一界面,所述第一界面包括第一系统恢复机制选项;
    接收对所述第一系统恢复机制选项的选中操作;
    响应于对所述第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
  2. 根据权利要求1所述的系统恢复方法,其特征在于,所述获取所述电子设备的异常关机次数之前,所述方法还包括:
    获取所述电子设备的高级启动指示信息,所述高级启动指示信息用于指示所述电子设备运行第二系统恢复机制。
  3. 根据权利要求1或2所述的系统恢复方法,其特征在于,所述第一界面还包括下述至少一项:第二系统恢复机制选项、继续启动选项、关机重启选项;
    若所述电子设备的异常关机次数大于或者等于所述预设阈值,所述方法还包括:
    接收对所述第二系统恢复机制选项的选中操作;
    响应于对所述第二系统恢复机制选项的选中操作,运行第二系统恢复机制。
  4. 根据权利要求1所述的系统恢复方法,其特征在于,所述方法还包括:
    在所述电子设备的BIOS启动阶段,若用户手动按下第一系统恢复热键,则所述电子设备显示第二界面,所述第二界面包括所述第一系统恢复机制选项和关机重启选项;
    接收对所述第一系统恢复机制选项的选中操作;
    响应于对所述第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
  5. 根据权利要求1至4任一项所述的系统恢复方法,其特征在于,所述方法还包括:
    在所述电子设备启动过程中,将所述异常关机次数增加1;
    在后续所述电子设备的运行过程中,若所述电子设备正常关机,则将所述异常关机次数清0;若所述电子设备异常关机,则所述异常关机次数不清零。
  6. 根据权利要求1至5任一项所述的系统恢复方法,其特征在于,所述方法还包括:
    在所述电子设备的BIOS启动阶段,获取嵌入式控制器EC的状态,所述EC的状态指示所述电子设备是否存在看门狗机制触发的关机事件;
    若所述电子设备存在看门狗机制触发的关机事件,将所述电子设备在BOIS启动阶段获取的异常关机次数减1。
  7. 根据权利要求1至6任一项所述的系统恢复方法,其特征在于,
    所述第一系统恢复机制为原始设备制造商OEM自定义的系统恢复机制,所述第二系统系统恢复机制为Windows默认的系统恢复机制。
  8. 根据权利要求1至7任一项所述的系统恢复方法,其特征在于,
    所述电子设备异常关机包括下述至少一项:强制关机、所述电子设备发生蓝屏后关机。
  9. 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器、存储器、通信接口以及触摸屏;所述存储器、所述通信接口与所述处理器耦合;所述触摸屏用于显示所述处理器生成的图像;所述存储器用于存储计算机程序代码;所述计算机程序代码包括计算机指令,当所述处理器执行上述计算机指令时,
    所述处理器,用于在所述电子设备的基本输入输出系统BIOS启动阶段,获取所述电子设备的异常关机次数;
    所述处理器,还用于在所述电子设备的异常关机次数大于或者等于预设阈值的情况下,控制所述触摸屏显示第一界面,所述第一界面包括第一系统恢复机制选项;
    所述处理器,还用于通过所述通信接口接收对所述第一系统恢复机制选项的选中操作,并且响应于对所述第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
  10. 根据权利要求9所述的电子设备,其特征在于,
    所述处理器,还用于获取所述电子设备的高级启动指示信息,所述高级启动指示信息用于指示所述处理器运行第二系统恢复机制。
  11. 根据权利要求9或10所述的电子设备,其特征在于,所述第一界面还包括下述至少一项:第二系统恢复机制选项、继续启动选项、关机重启选项;
    所述处理器,还用于通过所述通信接口接收对所述第二系统恢复机制选项的选中操作,并且响应于对所述第二系统恢复机制选项的选中操作,运行第二系统恢复机制。
  12. 根据权利要求9所述的电子设备,其特征在于,
    所述处理器,还用于在所述电子设备的BIOS启动阶段,若用户手动按下第一系统恢复热键,控制所述触摸屏显示第二界面,所述第二界面包括所述第一系统恢复机制选项和关机重启选项;
    所述处理器还用于接收对所述第一系统恢复机制选项的选中操作,并且响应于对所述第一系统恢复机制选项的选中操作,运行第一系统恢复机制。
  13. 根据权利要求9至12任一项所述的电子设备,其特征在于,
    所述处理器,还用于在所述电子设备启动过程中,将所述异常关机次数增加1;在后续所述电子设备的运行过程中,若所述电子设备正常关机,则将所述异常关机次数清0,若所述电子设备异常关机,则所述异常关机次数不清零。
  14. 根据权利要求9至13任一项所述的电子设备,其特征在于,
    所述处理器,还用于在所述电子设备的BIOS启动阶段,获取嵌入式控制器EC的状态,所述EC的状态指示所述电子设备是否存在看门狗机制触发的关机事件;若所述电子设备存在看门狗机制触发的关机事件,将所述处理器在BOIS启动阶段获取的异常关机次数减1。
  15. 根据权利要求9至14任一项所述的电子设备,其特征在于,
    所述第一系统恢复机制为原始设备制造商OEM自定义的系统恢复机制,所述第二系统系统恢复机制为Windows默认的系统恢复机制。
  16. 根据权利要求9至15任一项所述的电子设备,其特征在于,
    所述电子设备异常关机包括下述至少一项:强制关机、所述电子设备发生蓝屏后关机。
  17. 一种计算机存储介质,其特征在于,所述计算机存储介质包括计算机指令, 当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至8中任意一项所述的系统恢复方法。
  18. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至8中任意一项所述的系统恢复方法。
PCT/CN2018/109116 2018-07-20 2018-09-30 一种系统恢复方法及装置 WO2020015203A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/261,804 US11461179B2 (en) 2018-07-20 2018-09-30 System recovery method and apparatus
CN201880095758.4A CN112437914A (zh) 2018-07-20 2018-09-30 一种系统恢复方法及装置
EP18926669.5A EP3816804A4 (en) 2018-07-20 2018-09-30 SYSTEM RESTORATION METHOD AND DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810804698.0 2018-07-20
CN201810804698 2018-07-20

Publications (1)

Publication Number Publication Date
WO2020015203A1 true WO2020015203A1 (zh) 2020-01-23

Family

ID=69165019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109116 WO2020015203A1 (zh) 2018-07-20 2018-09-30 一种系统恢复方法及装置

Country Status (4)

Country Link
US (1) US11461179B2 (zh)
EP (1) EP3816804A4 (zh)
CN (1) CN112437914A (zh)
WO (1) WO2020015203A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764958A (zh) * 2021-01-27 2021-05-07 上海淇玥信息技术有限公司 一种辅助修复页面故障的方法、装置和电子设备
CN112948160A (zh) * 2021-02-26 2021-06-11 山东英信计算机技术有限公司 一种内存ecc问题的定位修复方法及装置
CN116737488A (zh) * 2022-10-26 2023-09-12 荣耀终端有限公司 一种参数监控方法及电子设备
CN116737488B (zh) * 2022-10-26 2024-05-17 荣耀终端有限公司 一种参数监控方法及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220376975A1 (en) * 2020-02-14 2022-11-24 Arris Enterprises Llc Systems and methods for modem configuration and rollback
CN113360320A (zh) * 2021-06-08 2021-09-07 维沃移动通信有限公司 系统配置恢复方法及装置
CN113986366A (zh) * 2021-11-24 2022-01-28 联想(北京)有限公司 应用调用实现方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271660A1 (en) * 2008-04-28 2009-10-29 Asustek Computer Inc. Motherboard, a method for recovering the bios thereof and a method for booting a computer
CN103927239A (zh) * 2014-03-28 2014-07-16 深圳市江波龙电子有限公司 一种终端设备的系统恢复方法及装置
CN105511976A (zh) * 2015-12-01 2016-04-20 长城信息产业股份有限公司 一种嵌入式系统中的应用程序自恢复运行方法及装置
CN105843712A (zh) * 2016-03-31 2016-08-10 联想(北京)有限公司 一种数据传输方法及电子设备

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5974546A (en) * 1997-05-08 1999-10-26 Micron Electronics, Inc. Apparatus and method to determine cause of failed boot sequence to improve likelihood of successful subsequent boot attempt
US6014744A (en) * 1998-01-13 2000-01-11 Microsoft Corporation State governing the performance of optional booting operations
US6754855B1 (en) * 1999-12-01 2004-06-22 Microsoft Corporation Automated recovery of computer appliances
GB2412190B (en) * 2004-03-17 2007-03-28 Ibm A recovery framework
JP3826940B2 (ja) * 2004-06-02 2006-09-27 日本電気株式会社 障害復旧装置および障害復旧方法、マネージャ装置並びにプログラム
JP4681900B2 (ja) * 2005-02-04 2011-05-11 富士通株式会社 コンピュータの停止状況監視方法、情報処理装置及びプログラム
US7734945B1 (en) * 2005-04-29 2010-06-08 Microsoft Corporation Automated recovery of unbootable systems
US7805632B1 (en) * 2007-09-24 2010-09-28 Net App, Inc. Storage system and method for rapidly recovering from a system failure
CN201569905U (zh) * 2009-12-23 2010-09-01 中国电力科学研究院 一种电动汽车实时监控终端
US8510597B2 (en) * 2011-02-08 2013-08-13 Wisconsin Alumni Research Foundation Providing restartable file systems within computing devices
CN102298545B (zh) * 2011-08-23 2014-03-19 晨星软件研发(深圳)有限公司 一种系统启动引导处理方法及装置
US9164887B2 (en) * 2011-12-05 2015-10-20 Industrial Technology Research Institute Power-failure recovery device and method for flash memory
US8868898B1 (en) * 2012-07-16 2014-10-21 Robert Van Hoof Bootable covert communications module
TWI479421B (zh) * 2013-02-04 2015-04-01 Wistron Corp 開機方法與電子裝置
CN104008026A (zh) 2013-02-22 2014-08-27 中兴通讯股份有限公司 云应用数据处理方法及装置
CN103473098A (zh) * 2013-09-10 2013-12-25 华为技术有限公司 一种boot程序的启动方法和相关装置
CN105786462A (zh) 2014-12-24 2016-07-20 昆达电脑科技(昆山)有限公司 开机方法
US9529602B1 (en) * 2015-07-22 2016-12-27 Dell Products, L.P. Systems and methods for internet recovery and service
CN105847554B (zh) 2016-03-24 2019-05-17 维沃移动通信有限公司 一种移动终端异常关机的数据处理方法及移动终端
KR102355424B1 (ko) * 2017-09-13 2022-01-26 현대자동차주식회사 차량용 중앙 처리 장치를 제어하는 워치독 회로의 신뢰성을 향상시키는 장치 및 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271660A1 (en) * 2008-04-28 2009-10-29 Asustek Computer Inc. Motherboard, a method for recovering the bios thereof and a method for booting a computer
CN103927239A (zh) * 2014-03-28 2014-07-16 深圳市江波龙电子有限公司 一种终端设备的系统恢复方法及装置
CN105511976A (zh) * 2015-12-01 2016-04-20 长城信息产业股份有限公司 一种嵌入式系统中的应用程序自恢复运行方法及装置
CN105843712A (zh) * 2016-03-31 2016-08-10 联想(北京)有限公司 一种数据传输方法及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3816804A4

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764958A (zh) * 2021-01-27 2021-05-07 上海淇玥信息技术有限公司 一种辅助修复页面故障的方法、装置和电子设备
CN112764958B (zh) * 2021-01-27 2023-01-13 上海淇玥信息技术有限公司 一种辅助修复页面故障的方法、装置和电子设备
CN112948160A (zh) * 2021-02-26 2021-06-11 山东英信计算机技术有限公司 一种内存ecc问题的定位修复方法及装置
CN112948160B (zh) * 2021-02-26 2023-02-28 山东英信计算机技术有限公司 一种内存ecc问题的定位修复方法及装置
CN116737488A (zh) * 2022-10-26 2023-09-12 荣耀终端有限公司 一种参数监控方法及电子设备
CN116737488B (zh) * 2022-10-26 2024-05-17 荣耀终端有限公司 一种参数监控方法及电子设备

Also Published As

Publication number Publication date
US20210279139A1 (en) 2021-09-09
EP3816804A1 (en) 2021-05-05
US11461179B2 (en) 2022-10-04
CN112437914A (zh) 2021-03-02
EP3816804A4 (en) 2021-09-01

Similar Documents

Publication Publication Date Title
WO2020015203A1 (zh) 一种系统恢复方法及装置
TWI588649B (zh) 硬體修復方法、硬體修復系統以及計算機可讀取儲存裝置
US9501291B2 (en) Method and system for providing hybrid-shutdown and fast startup processes
CN103970560A (zh) 开机方法与电子装置
US9529410B2 (en) Service processor (SP) initiated data transaction with BIOS utilizing power off commands
JP2018519560A (ja) システム稼働方法およびインテリジェント端末
JP2008287505A (ja) 情報処理装置およびレガシーエミュレーション処理停止制御方法
WO2019033779A1 (zh) 一种针对计算机的睡眠状态唤醒的方法及装置
US20120159136A1 (en) Computer system boot enhancements with user override
EP2905700A1 (en) Operating system recovery method, apparatus and terminal device
US8335891B2 (en) Method and system for configuring a storage array
EP2280348A1 (en) Method and system for saving operational state of running applications when unexpected shutdown events occur
US9411602B2 (en) Techniques for booting an information processing system
KR20130068630A (ko) 임베디드 디바이스의 초기화 방법 및 장치
TW202131170A (zh) 韌體損壞恢復技術
US20120185713A1 (en) Server, storage medium, and method for controlling sleep and wakeup function of the server
US20140136777A1 (en) Method and system for configuring a storage array
EP3693851A1 (en) Class unloading method and electronic device
US10061597B2 (en) Computing device with first and second operating systems
WO2020113469A1 (zh) 开机检测方法、开机检测装置及移动终端
US20120239715A1 (en) Information processing apparatus with log output function, mobile terminal device, and log output control method
US20170329374A1 (en) Method for Controlling Fan in Tiny Computer
KR102411920B1 (ko) 전자 장치 및 그 제어 방법
US20180284938A1 (en) Touch screen support by emulating a legacy device
CN111953753B (zh) 通信设备连接方法、装置、计算机设备和存储介质

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: 18926669

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018926669

Country of ref document: EP

Effective date: 20210129