Method and device for restarting electronic device

By designing automatic repair mode and intelligent sleep mode detection and control in electronic equipment, the problem of maintenance costs and resource waste caused by equipment abnormalities in unattended scenarios is solved, and equipment self-healing and resource saving are achieved.

CN111858183BActive Publication Date: 2024-08-23LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010760409.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2024-08-23
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

In unattended electronic equipment scenarios, such as unmanned retail stores and oil fields, on-site maintenance is required when equipment is abnormal, resulting in additional costs and waste of resources. It is difficult to achieve automatic self-repair with existing technology.

Method used

Design a method for restarting electronic equipment. It enters the automatic repair mode through the embedded controller, periodically detects the target field, and restarts the device if the threshold is not continuously detected, and prevents misjudgment in the intelligent sleep mode. Through control instructions and statistics value to determine the fault status.

Benefits of technology

It realizes self-repair of equipment, reduces the number of on-site repairs by maintenance personnel, and reduces maintenance costs and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111858183B
    Figure CN111858183B
Patent Text Reader

Abstract

The present disclosure provides a method and device for restarting an electronic device, the method comprising: in response to the electronic device being powered on, selectively entering an automatic repair mode; in the automatic repair mode, detecting whether there is a target field filled by a first system at a target position at target time intervals; restarting the electronic device when the number of times the target field is not detected continuously exceeds a first threshold. The present disclosure can enter the automatic repair mode after the electronic device is powered on, and determine whether the electronic device is faulty or on-hook by detecting whether there is a target field filled by a first system at the target position. If the number of times the target field is not detected continuously exceeds a first threshold, it is determined that the electronic device is currently faulty or on-hook, and the electronic device is restarted at this time, so that it can achieve self-repair of certain faults by restarting, reduce the number of on-site repairs by operation and maintenance personnel, reduce the maintenance cost of the electronic device, and save human and material resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vertical control of electronic devices, and in particular to a method and device for restarting an electronic device. Background Art

[0002] In the vertical field of electronic equipment, such as unmanned retail stores and oil fields, most computers or servers do not require continuous on-site supervision during operation, and usually run automatically. In this case, electronic equipment may become abnormal due to poor network communication, excessive data processing, high temperature in the computer room, etc. Once an electronic device becomes abnormal during operation, it will affect data processing or network communication. At this time, the only way is for operation and maintenance personnel to go to the site to restart or repair the equipment, which will incur additional service fees and waste human and material resources. Summary of the invention

[0003] The purpose of the embodiments of the present disclosure is to provide a method and device for restarting an electronic device. The embodiments of the present disclosure adopt the following technical solutions: a method for restarting an electronic device, comprising: in response to the electronic device being powered on, selectively entering an automatic repair mode; in the automatic repair mode, detecting whether there is a target field filled by a first system at a target position every target time length; restarting the electronic device when the number of consecutive failures to detect the target field exceeds a first threshold; wherein the electronic device also includes a second system, the first system is run in a first operating phase of the electronic device, and the second system is run in a second operating phase after the first operating phase.

[0004] Furthermore, after the electronic device enters the second operation stage, it also includes: detecting whether an intelligent sleep signal triggered by the second system is received; and switching out of the automatic repair mode when the intelligent sleep signal is received.

[0005] Furthermore, restarting the electronic device when the number of consecutive failures to detect the target field exceeds a first threshold includes: performing a first detection of the target field in response to the electronic device running the first system and entering the first operating stage after power-on; performing a second detection of the target field in response to the electronic device running the second system and entering the second operating stage after the first operating stage; determining a first statistical value of the first detection and / or a second statistical value of the second detection based on the detection result of the target field; and restarting the electronic device when the sum of the first statistical value and the second statistical value exceeds a first threshold or the second statistical value exceeds the first threshold.

[0006] Furthermore, after the electronic device enters the second operating stage, before detecting whether there is a target field filled by the first system at the target position every target duration, it also includes: sending a control instruction to the first system, wherein the control instruction is used to instruct the first system to fill the target field at the target position within the target duration.

[0007] Furthermore, restarting the electronic device includes: adjusting the level of the power control signal to a low level.

[0008] Furthermore, the target field includes at least: a timestamp of the current moment.

[0009] Furthermore, it also includes: recording the number of times the electronic device is restarted; and executing an alarm program when the number of times the electronic device is restarted exceeds a second threshold.

[0010] The disclosed embodiment also discloses a restart device for an electronic device, comprising: an embedded controller, a central processing unit and a read-only memory with firmware; the embedded controller can selectively enter an automatic repair mode in response to the electronic device being powered on; in the automatic repair mode, the target location is detected at target time intervals to determine whether there is a target field filled with a read-only memory with firmware; the electronic device is restarted when the number of consecutive failures to detect the target field exceeds a first threshold; wherein the electronic device also includes a second system, the first system is run based on the read-only memory with firmware in a first operating stage of the electronic device, and the second system is run by the central processing unit in a second operating stage after the first operating stage.

[0011] Furthermore, the embedded controller is also used to: detect whether an intelligent sleep signal triggered by the central processing unit is received; and switch out of the automatic repair mode when the intelligent sleep signal is received.

[0012] Furthermore, after the electronic device enters the second operating stage, the embedded controller is also used to: send a control instruction to the read-only memory with firmware, wherein the control instruction is used to instruct the read-only memory with firmware to fill the target field at the target position within the target duration.

[0013] The beneficial effects of the embodiments of the present disclosure are as follows: after the electronic device is powered on, it can enter an automatic repair mode. In the automatic repair mode, it is determined whether the electronic device has a fault or is in an idle state by detecting whether there is a target field filled by the first system at the target location. If the number of consecutive times that the target field is not detected exceeds a first threshold, it is determined that the electronic device is currently faulty or in an idle state. At this time, the electronic device is restarted to enable it to self-repair certain faults by restarting, thereby reducing the number of on-site repairs by operating and maintenance personnel, reducing the maintenance cost of the electronic device, and saving human and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0015] Figure 1 A flowchart of a method for restarting an electronic device in a first embodiment of the present disclosure is shown;

[0016] Figure 2 A flowchart of a method for restarting an electronic device in a second embodiment of the present disclosure is shown;

[0017] Figure 3 A flowchart of a method for restarting an electronic device in a third embodiment of the present disclosure is shown;

[0018] Figure 4 A flowchart of a method for restarting an electronic device in a fourth embodiment of the present disclosure is shown;

[0019] Figure 5 A schematic structural diagram of a restart device for an electronic device in a fifth embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0020] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0021] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0022] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0023] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0024] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0025] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0026] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0027] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0028] In the vertical field of electronic equipment, such as unmanned retail stores, oil fields or bank ATMs, most computers or servers do not require continuous on-site supervision during operation, and usually run automatically. In this case, electronic equipment may become abnormal due to poor network communication, excessive data processing, high temperature in the computer room, etc. Once an electronic device becomes abnormal during operation, it will affect data processing or network communication. At this time, the only way is for operation and maintenance personnel to go to the site to restart or repair the equipment, which will incur additional service fees and waste human and material resources.

[0029] In order to solve the above problems, Figure 1 As shown, the first embodiment of the present disclosure provides a restart method of an electronic device, which is mainly applied to common electronic devices in the Vertical field, and is usually implemented by an embedded controller (EC, Embedded Controller) in the electronic device, and mainly includes steps S101 to S103:

[0030] S101, in response to the electronic device being powered on, optionally entering an automatic repair mode.

[0031] After the power is turned on and turned on, the electronic device is powered on and enters the first operation stage, at which time the electronic device enters the normal working mode and performs boot-related operations by running the first system. After the boot operation is completed, the electronic device enters the second operation stage from the first operation stage, at which time the electronic device runs the second system to achieve the corresponding function. Usually, the first system of the electronic device can be a basic input and output system (BIOS) or UEFI, so that it can be started before booting the operating system; the second system is the operating system (OS) of the electronic device. Depending on the model and function of the electronic device, the second system can use the Windows system, Linux system, or an operating system developed based on the function of the electronic device.

[0032] In response to the electronic device being powered on, the electronic device may selectively enter the automatic repair mode. In the automatic repair mode, the EC will determine whether the electronic device is in a faulty or on-hook state based on the working condition of the first system, and then determine whether a restart operation of the electronic device is required. In actual use, the electronic device may automatically enter the automatic repair mode at the moment of powering on, so that corresponding monitoring or statistics can be performed during the operation from the first operation stage to the second operation stage, thereby improving the accuracy of monitoring. Of course, the automatic repair mode may also be entered upon receiving a corresponding instruction, and the specific timing and method of entering the automatic repair mode may be flexibly set according to actual conditions.

[0033] S102: In the automatic repair mode, detecting whether there is a target field filled by the first system at the target position every target duration.

[0034] In the automatic repair mode, during the operation of the electronic device, if the first system is in a normal working state and there is no fault or hang-up, it will fill a target field into the target position at a target time interval, and the EC will detect whether there is a target field filled by the first system at the target position at the same target time interval; if the EC detects the target field at the target position, it means that the current first system is in a normal working state; if the EC does not detect the target field at the target position, the EC can know that the current first system may have a fault or hang-up, and may need to be restarted to repair the fault or release the hang-up state.

[0035] Specifically, the target location can be a pre-provided location, which can be any location in the electronic device where data can be stored. It is preferably set in the EC to facilitate detection and statistics; the target duration can be a pre-set duration, which can be adjusted according to the specific functions and actual needs of the electronic device; the target field usually uses the timestamp of the current moment when the first system fills the field, which is unique and can be updated over time, making it convenient for the EC to count the filling status of the target field.

[0036] In addition, the first system may write relevant programs during the writing process to enable it to actively fill the target field at the target position at each target duration during operation. However, under normal circumstances, after the electronic device enters the second operation stage, the first system will enter a sleep state, and will not leave the current state without external command control. Therefore, in order to ensure the accurate execution of the automatic repair mode, in this embodiment, especially after entering the second operation stage, the EC may instruct the first system to fill the field by sending a control instruction to the first system. The control instruction should at least include the target position, target duration and the filling principle of the target field. After receiving the control instruction, the first system shall fill the target field at the target position within the target duration in accordance with the requirements of the control instruction.

[0037] In order to save storage space and prevent the target field from being filled in the target position too many times, resulting in a large amount of space being occupied, the first system can use the current timestamp as the target field when filling the target field in the target position. When filling it again after an interval of the target time, the current timestamp can be used to overwrite the last timestamp filled. The storage space requirement is reduced by continuously updating the timestamp filled in the target position.

[0038] S103: When the number of times that the target field is not detected continuously exceeds a first threshold, restart the electronic device.

[0039] During the normal operation of the electronic device, the first system can fill the target field into the target position at target time intervals according to the requirements of the EC. When the EC detects periodically, it can detect the target field at the target position, and it can be determined that the current electronic device is in a normal working state and no fault occurs. If the EC does not detect the target field when detecting the target position or the target field filled in the current target position is the target field of the last detection, it can be determined that the current electronic device has a fault or is in an on-hook state and cannot perform normal functions. It may need to be restored by restarting.

[0040] In order to prevent the temporary stuck state caused by excessive computing load or other situations from being mistaken for the electronic device being in a fault, in this embodiment, the EC restarts the electronic device only when the number of times the target field is not detected continuously exceeds the first threshold. Specifically, the first threshold can be set according to the length of the target time and actual needs. For example, when the target time is 1 minute and the first threshold is 60 times, the first system fills the current timestamp into the target position every 1 minute, and the EC also detects whether there is an accurate target field at the target position every 1 minute. When the EC fails to detect the target field for the first time, the number of times begins to be counted. If the target field is not detected for 60 consecutive times or the detected target fields are all fields filled by the first system 1 hour ago, the EC determines that the electronic device is faulty and a restart operation is performed at this time; if the EC fails to detect the target field for 30 consecutive times but detects the accurate target field for the 31st time, it cannot be considered that the electronic device is faulty and a restart operation is not required.

[0041] In actual implementation, if it is necessary to restart the electronic device, a forced restart can be achieved by pulling down the corresponding pin of the power chip and adjusting the level of the power control signal to a low level.

[0042] This embodiment can enter the automatic repair mode after the electronic device is powered on. In the automatic repair mode, it is determined whether the electronic device has a fault or is on-hook by detecting whether there is a target field filled by the first system at the target position. If the number of consecutive times that the target field is not detected exceeds a first threshold, it is determined that the electronic device is currently faulty or is in an on-hook state. At this time, the electronic device is restarted to enable it to self-repair certain faults by restarting, thereby reducing the number of on-site repairs by operation and maintenance personnel, reducing the maintenance cost of the electronic equipment, and saving human and material resources.

[0043] The second embodiment of the present disclosure provides a second implementation of the restart method of the electronic device based on the first embodiment. After the electronic device enters the second operation stage, when it is not processing data, the electronic device can enter the intelligent sleep mode (Modern standby). In the intelligent sleep mode, the electronic device is in sleep mode when no instructions or data are received, and can quickly switch to the working state to process the instructions or data when instructions or data are received. Since the electronic device is in the intelligent sleep mode, the first system and the second system are both in a suspended state. At this time, if the target position is detected according to the implementation in the first embodiment, the EC may misjudge the working state of the electronic device because the first system is in sleep mode and cannot perform the value filling operation. In order to prevent the occurrence of misjudgment, this embodiment performs the following steps after the electronic device enters the second operation stage, such as Figure 2 shown.

[0044] S201, detecting whether an intelligent sleep signal triggered by the second system is received, and if the intelligent sleep signal is received, executing step S202, and if the intelligent sleep signal is not received, executing step S203;

[0045] S202, switching out of automatic repair mode;

[0046] S203, detecting whether there is a target field filled by the first system at the target position every target duration;

[0047] S204: When the number of times that the target field is not detected continuously exceeds a first threshold, restart the electronic device.

[0048] When the electronic device enters the intelligent sleep mode, the second system will provide a status trigger signal to the EC through the mainboard, such as triggering the SLP_S0 pin of the corresponding chip on the mainboard to form an intelligent sleep signal and send it to the EC. When the EC detects and receives the intelligent sleep signal, it confirms that the electronic device has entered the intelligent sleep mode, and then controls the electronic device to exit the automatic repair mode. After exiting the automatic repair mode, the EC will not send a control instruction to the first system to fill the target position, nor does it need to perform target position detection and restart operations, thereby achieving the purpose of preventing misjudgment.

[0049] If the EC does not receive the intelligent sleep signal, the electronic device is always in the automatic repair mode, that is, executing steps S203 and S204 in this embodiment. It should be noted that the specific implementation of steps S203 and S204 in this embodiment is the same as steps S102 and S103 in the first embodiment, and will not be repeated in this embodiment.

[0050] This embodiment determines whether the electronic device has entered the intelligent sleep mode by receiving an intelligent sleep signal, and exits the automatic repair mode when it is determined that the electronic device has entered the intelligent sleep mode, thereby preventing the EC from mistakenly believing that the electronic device is faulty or hung up and restarting due to the inability to fill fields due to the sleep of the first system, thereby affecting the normal working state of the electronic device.

[0051] The third embodiment of the present disclosure provides a third implementation of the method for restarting an electronic device, which is actually based on the first embodiment and describes step S103 in more detail. Figure 3 The flowchart of the restart method in this embodiment is shown, which mainly includes steps S301 to S306:

[0052] S301, in response to the electronic device being powered on, optionally entering an automatic repair mode;

[0053] S302, in the automatic repair mode, detecting whether there is a target field filled by the first system at the target position every target time length;

[0054] S303, in response to the electronic device running the first system and entering the first operation phase after being powered on, performing a first detection of the target field;

[0055] S304, in response to the electronic device running the second system and entering a second operation phase after the first operation phase, performing a second detection of the target field;

[0056] S305, determining a first statistical value of the first detection and / or a second statistical value of the second detection based on the detection result of the target field;

[0057] S306: When the sum of the first statistical value and the second statistical value exceeds the first threshold or when the second statistical value exceeds the first threshold, restart the electronic device.

[0058] The first detection and the second detection in this embodiment are detections of the target position performed in the first operation stage and the second operation stage, respectively. In the first operation stage, the electronic device is in the boot process, and the first system is run to perform the boot process. However, the boot stage usually lasts for a short time. Even if a fault or hang-up occurs, the number of times the EC fails to detect the target field may not reach the first threshold. Therefore, normally, a restart operation will not be performed in the first operation stage. However, if the EC fails to detect the target field, it will record the number of times the target field is not detected according to the detection result. In the second operation stage, the electronic device is in a stable working state. At this time, if the EC fails to detect the target field, it will record the number of times the target field is not detected according to the detection result.

[0059] It should be noted that the condition for restarting the electronic device in this embodiment is that the number of consecutive times the target field has not been detected exceeds a first threshold. During the statistical process, as long as the EC detects the correct target field once, the previously counted times will be reset to zero, and the statistics will be restarted from the next time the target field is not detected.

[0060] During the first detection process of the present embodiment, the EC determines a first statistical value of consecutive failures to detect the target field based on the detection result of the target field. Assuming that in the first detection, the target field is still not detected from the first time the target field is not detected until the last detection of the first operation stage, the first statistical value is determined to be the number of times the target field is actually not detected; if there is one time when the EC correctly detects the target field before switching from the first operation stage to the second operation stage, the previous statistical value is cleared; if the target field is not detected only in the last detection of the first operation stage, the first statistical value is 1. In fact, statistical confirmation of the first statistical value is performed only when the target field is not detected in the last detection of the first operation stage, otherwise the first statistical value is zero.

[0061] In the second detection process, the EC will determine the second statistical value of the target field not being detected continuously based on the detection result of the target field. In the case where the first statistical value is zero, it is only necessary to determine the number of times the target field is not detected continuously counted in the second detection process as the second statistical value, and restart the electronic device when the second statistical value exceeds the first threshold; if the first statistical value is not zero, and the EC has not detected the existence of the target field since the first detection after entering the second detection stage, the second statistical value will continue to be accumulated until the sum of the first statistical value and the second statistical value exceeds the first threshold, and the electronic device will be restarted. If the EC detects that the target position is filled with the correct target field before the sum of the first statistical value and the second statistical value exceeds the first threshold, the first statistical value and the second statistical value that have been accumulated before are all cleared to zero, and the second statistical value is re-determined from the next time the target field is not detected, and the restart judgment is made only based on the comparison between the second statistical value and the first threshold.

[0062] This embodiment determines the detection results of the first operation stage and the second operation stage, determines an accurate statistical value for comparison with the first threshold value, thereby improving the rationality of the execution process of the restart method and avoiding the situation where the electronic device is continuously restarted due to misjudgment, thereby affecting the normal operation of the electronic device.

[0063] The fourth embodiment of the present disclosure provides a fourth implementation of the method for restarting an electronic device. On the basis of the first embodiment, an alarm mechanism is added. When a fault that cannot be solved by restarting the electronic device occurs, the fault is reported in a timely manner. The flow chart is as follows: Figure 4 As shown, it mainly includes steps S401 to S405:

[0064] S401, in response to the electronic device being powered on, optionally entering an automatic repair mode;

[0065] S402, in the automatic repair mode, detecting whether there is a target field filled by the first system at the target position every target time length;

[0066] S403, restarting the electronic device when the number of times the target field is not detected continuously exceeds a first threshold;

[0067] S404, recording the number of times the electronic device is restarted;

[0068] S405: When the number of times the electronic device is restarted exceeds a second threshold, an alarm procedure is executed.

[0069] The specific execution method of steps S401 to S403 in this embodiment is the same as that of steps S101 to S103 in the first embodiment, and will not be described in detail here. Specifically, the EC can record the number of times the electronic device is restarted, preferably recording the number of consecutive or cumulative restarts of the electronic device within a period of time. When the number of restarts exceeds the second threshold, it means that the electronic device often fails or is often in an on-hook state, and cannot be restored by restarting alone. At this time, the EC executes the alarm program and can send fault information to the fault handling center, the upper-level server, the mobile terminal of the operation and maintenance personnel and other devices. The fault information can carry the name or number of the electronic device, the number of restarts, the restart time and other contents. The operation and maintenance personnel will go to the site to inspect and repair the equipment, and clear the previously recorded number of restarts after the repair is completed.

[0070] When a fault occurs in an electronic device that cannot be resolved by restarting, this embodiment implements an alarm mechanism by counting and comparing the number of restarts, thereby realizing timely reporting of the faulty electronic device and optimizing the process of handling the fault of the electronic device.

[0071] A fifth embodiment of the present disclosure provides a restart device for an electronic device, which is placed in the electronic device or can be used as an electronic device. Figure 5 As shown, it mainly includes an embedded controller (EC) 10, a central processing unit 20 and a read-only memory 30 with firmware that are coupled to each other. Specifically, the embedded controller 10 can selectively enter the automatic repair mode in response to the electronic device being powered on; in the automatic repair mode, it detects whether there is a target field filled with a read-only memory with firmware at the target location every target time length; when the number of times the target field is not detected continuously exceeds a first threshold, the electronic device is restarted; wherein, the electronic device also includes a second system, and in the first operation stage of the electronic device, the first system is run by the read-only memory 30 with firmware, and in the second operation stage after the first operation stage, the second system is run by the central processing unit 20. In a specific embodiment, the read-only memory 30 with firmware can be configured as a read-only memory that solidifies a boot system such as BIOS.

[0072] After the power is turned on and turned on, the electronic device is powered on and enters the first operation stage. At this time, the electronic device enters the normal working mode and runs the first system through the read-only memory 30 with firmware to perform boot-related operations. After the boot operation is completed, the electronic device enters the second operation stage from the first operation stage. At this time, the electronic device runs the second system through the central processor 20 to realize the corresponding function. In response to the power-on of the electronic device, the embedded controller 10 can selectively enter the automatic repair mode. In the automatic repair mode, the embedded controller 10 will determine whether the electronic device is in a fault or hang-up state according to the working condition of the first system, and then determine whether it is necessary to restart the electronic device. In actual use, the embedded controller 10 can automatically enter the automatic repair mode at the moment of powering on, so that corresponding monitoring or statistics can be performed during the operation from the first operation stage to the second operation stage, and the accuracy of monitoring can be improved. Of course, the automatic repair mode can also be entered when the corresponding instruction is received. The specific timing and method of entering the automatic repair mode can be flexibly set according to the actual situation.

[0073] In the automatic repair mode, during the operation of the electronic device, if the read-only memory 30 with firmware is in a normal working state and there is no fault or hang-up, it will fill a target field into the target position at a target time interval, and the embedded controller 10 will detect whether there is a target field filled with the read-only memory 30 with firmware at the target position at the same target time interval; if the embedded controller 10 detects the target field at the target position, it means that the read-only memory 30 with firmware is currently in a normal working state; if the embedded controller 10 does not detect the target field at the target position, the embedded controller 10 can know that the read-only memory 30 with firmware may be faulty or hang-up, and may need to be restarted to repair the fault or release the hang-up state.

[0074] During the writing process of the read-only memory 30 with firmware, a relevant program can be written to enable it to actively fill the target field to the target position at each target time interval during operation. However, under normal circumstances, after the electronic device enters the second operation stage, the read-only memory 30 with firmware will enter a dormant state, and will not perform any operation without external command control. Therefore, in order to ensure the accurate execution of the automatic repair mode, in this embodiment, especially after entering the second operation stage, the EC can instruct the read-only memory 30 with firmware to fill the field by sending a control instruction to the read-only memory 30 with firmware. The control instruction should at least include the target position, the target time and the filling principle of the target field. After receiving the control instruction, the read-only memory 30 with firmware fills the target field to the target position within the target time according to the requirements of the control instruction.

[0075] During the normal operation of the electronic device, the read-only memory 30 with firmware can fill the target field into the target position at target time intervals according to the requirements of the embedded controller 10. When the embedded controller 10 detects the target field at the target position during periodic detection, it can be determined that the current electronic device is in a normal working state and no fault has occurred. If the embedded controller 10 does not detect the target field when detecting the target position or the target field filled in the current target position is the target field at the last detection, it can be determined that the current electronic device has failed or is in an on-hook state and cannot perform normal functions. It may need to be restored by restarting. In order to prevent the temporary stuck state caused by excessive computing load or other conditions from being mistaken for a fault in the electronic device, in this embodiment, the embedded controller 10 restarts the electronic device only when the number of times the target field has not been detected continuously exceeds a first threshold.

[0076] In actual implementation, if the electronic device needs to be restarted, the embedded controller 10 can adjust the level of the power control signal to a low level to achieve a forced restart by pulling down the corresponding pin (PWRGD) of the power chip.

[0077] Furthermore, in order to prevent the embedded controller 10 from misjudging the working status of the electronic device because the read-only memory 30 with firmware is in sleep mode and cannot perform value filling operations when the electronic device is in the intelligent sleep mode, when the electronic device enters the intelligent sleep mode, the central processing unit 20 will trigger the SLP_S0 pin on the mainboard to form an intelligent sleep signal and send it to the embedded controller 10. When the embedded controller 10 detects and receives the intelligent sleep signal, it confirms that the electronic device has entered the intelligent sleep mode, and then controls the electronic device to exit the automatic repair mode. After exiting the automatic repair mode, the embedded controller 10 will not send a control instruction to the read-only memory 30 with firmware to fill the target position, and there is no need to perform target position detection and restart operations, thereby achieving the purpose of preventing misjudgment.

[0078] This embodiment can enter the automatic repair mode after the electronic device is powered on. In the automatic repair mode, it is determined whether the electronic device has a fault or is on-hook by detecting whether there is a target field filled with a read-only memory with firmware at the target location. If the number of consecutive times that the target field is not detected exceeds a first threshold, it is determined that the electronic device is currently faulty or is in an on-hook state. At this time, the electronic device is restarted to enable it to self-repair certain faults by restarting, thereby reducing the number of on-site repairs by operation and maintenance personnel, reducing the maintenance cost of the electronic equipment, and saving human and material resources.

[0079] The above embodiments are only exemplary embodiments of the present disclosure and are not intended to limit the present disclosure. The protection scope of the present disclosure is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present disclosure within the essence and protection scope of the present disclosure, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present disclosure.

Claims

1. A method for restarting an electronic device, characterized in that: include: In response to the electronic device being powered on, selectively entering an automatic repair mode; In the automatic repair mode, detecting whether there is a target field filled by the first system at a target position every target time period, wherein the target field includes a timestamp of the current moment; If the number of times that the target field is not detected continuously exceeds a first threshold, restarting the electronic device; The electronic device further includes a second system. The first system is run in a first operation phase of the electronic device, and the second system is run in a second operation phase after the first operation phase.

2. The restart method according to claim 1, characterized in that: After the electronic device enters the second operation stage, the method further includes: detecting whether an intelligent sleep signal triggered by the second system is received; When the intelligent sleep signal is received, the automatic repair mode is switched out.

3. The restart method according to claim 1, characterized in that: The step of restarting the electronic device when the number of times that the target field is not detected continuously exceeds a first threshold value comprises: In response to the electronic device running the first system after being powered on and entering the first operation phase, performing a first detection of the target field; In response to the electronic device running the second system and entering the second operation stage after the first operation stage, performing a second detection of the target field; Determine a first statistical value of a first detection and / or a second statistical value of a second detection based on a detection result of the target field; When the sum of the first statistical value and the second statistical value exceeds a first threshold or when the second statistical value exceeds the first threshold, the electronic device is restarted.

4. The restart method according to claim 1, characterized in that: After the electronic device enters the second operation stage, before detecting whether there is a target field filled by the first system at the target position every target time period, the method further includes: A control instruction is sent to the first system, where the control instruction is used to instruct the first system to fill the target field at the target position within the target duration.

5. The restart method according to claim 1, characterized in that: The restarting of the electronic device comprises: Adjust the level of the power control signal to a low level.

6. The restart method according to claim 1, characterized in that: The target field includes at least: a timestamp of the current moment.

7. The restart method according to any one of claims 1 to 6, characterized in that: Also includes: Recording the number of times the electronic device is restarted; When the number of times the electronic device is restarted exceeds a second threshold, an alarm procedure is executed.

8. A restart device for an electronic device, characterized in that: include: Embedded controller, central processing unit and read-only memory with firmware; The embedded controller can selectively enter an automatic repair mode in response to the electronic device being powered on; In the automatic repair mode, detecting whether there is a target field filled by the first system at a target position every target time period, wherein the target field includes a timestamp of the current moment; If the number of times that the target field is not detected continuously exceeds a first threshold, restarting the electronic device; The electronic device further comprises a second system, the first system is run based on the read-only memory having firmware in a first operation phase of the electronic device, and the second system is run by the central processor in a second operation phase after the first operation phase.

9. The restart device according to claim 8, characterized in that: The embedded controller is also used for: Detecting whether an intelligent sleep signal triggered by the central processing unit is received; When the intelligent sleep signal is received, the automatic repair mode is switched out.

10. The restart device according to claim 8, characterized in that: After the electronic device enters the second operation stage, the embedded controller is further used for: A control instruction is sent to the read-only memory with firmware, where the control instruction is used to instruct the read-only memory with firmware to fill the target field into the target position within the target duration.