CN110515783B - Hard disk power-off detection method and device - Google Patents

Hard disk power-off detection method and device Download PDF

Info

Publication number
CN110515783B
CN110515783B CN201910631863.1A CN201910631863A CN110515783B CN 110515783 B CN110515783 B CN 110515783B CN 201910631863 A CN201910631863 A CN 201910631863A CN 110515783 B CN110515783 B CN 110515783B
Authority
CN
China
Prior art keywords
host
power
sub
module
control unit
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910631863.1A
Other languages
Chinese (zh)
Other versions
CN110515783A (en
Inventor
李创锋
莊吉賢
黃家豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tigo Semiconductor Co ltd
Original Assignee
Shenzhen Tigo Semiconductor Co ltd
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 Shenzhen Tigo Semiconductor Co ltd filed Critical Shenzhen Tigo Semiconductor Co ltd
Priority to CN201910631863.1A priority Critical patent/CN110515783B/en
Publication of CN110515783A publication Critical patent/CN110515783A/en
Application granted granted Critical
Publication of CN110515783B publication Critical patent/CN110515783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The application relates to a hard disk power failure detection method and device, wherein the method comprises the following steps: electrifying and detecting; the energization processing includes: the first control module is electrified; after a first preset time period, the power supply module supplies power to the host through the first control module to enable the host to be electrified; the host controls the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module; the host controls the second control module to enable the power supply module to supply power to the host through the second control module; the detection process includes: the host detects the state of the hard disk, if the hard disk is wrong, the host performs error reporting display, if the hard disk is wrong, the host controls the second control module to enable the power supply module to stop supplying power to the host through the second control module so as to enable the host to be powered off, and the power-on processing is executed. The power supply module supplies power to the host through the first control module and the second control module respectively, so that error reporting display is realized when the hard disk is in error, and the power-off test is circularly executed when the hard disk is in error, so that the hard disk error can be found and corrected conveniently and timely.

Description

Hard disk power-off detection method and device
Technical Field
The application relates to the technical field of storage equipment, in particular to a hard disk power failure detection method and device.
Background
The sudden power failure of the computer can cause the solid state disk to lose user data and important internal data in the cache, so that enough time is needed to write the data in the cache into the solid state disk for stable storage before the computer is really powered off, and the power failure test of the solid state disk is particularly important.
In the prior art, an operating system is installed in a solid state disk, the function of the solid state disk is detected by the operating system of a computer entering the solid state disk, a computer power supply is required to be inserted into an externally-hung power supply timer for multiple tests, the computer is powered on for a certain period of time, the computer is powered off for a certain period of time, and the power-off test of the solid state disk is circularly performed. However, when the solid state disk is in error, the timer cannot stop immediately, and the power-off test is continuously and circularly executed, so that the error record of the solid state disk cannot be captured and reserved, but is covered by the subsequent power-off test, and therefore research and development personnel cannot find the error condition of the solid state disk in time and debug the solid state disk.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a method and a device for detecting hard disk outage.
In a first aspect, the present application provides a method for detecting power failure of a hard disk, where the method includes: electrifying and detecting;
wherein the energization processing includes:
the first control module is electrified;
after a first preset time period, the power supply module supplies power to the host through the first control module to enable the host to be electrified;
the host controls the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module;
the host controls the second control module to enable the power supply module to supply power to the host through the second control module;
the detection process includes:
the host detects the state of the hard disk, if the hard disk is in error, the host performs error reporting display,
if the hard disk is error-free, the host controls the second control module to enable the power supply module to stop supplying power to the host through the second control module so as to enable the host to be powered off, and the power-on processing is executed.
Preferably, the first control module comprises a timing unit, a first sub-control unit,
after the first preset duration, the power module supplies power to the host through the first control module to enable the host to be electrified, and the method comprises the following steps:
the timing unit starts timing;
after a first preset time period, the timing unit controls the first sub-control unit to enable the power supply module to supply power to the host through the first sub-control unit so as to enable the host to be electrified.
Preferably, the second control module comprises a second sub-control unit and a third sub-control unit,
the first control module is powered on, comprising:
the power supply module supplies power to the timing unit through the second sub-control unit so as to electrify the timing unit;
the host controls the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module, and the method comprises the following steps:
the host controls the second sub-control unit to enable the power supply module to stop supplying power to the timing unit through the second sub-control unit to enable the timing unit to be powered off,
the timing unit is powered off to stop controlling the first sub-control unit, so that the power supply module stops supplying power to the host through the first sub-control unit;
the host controls the second control module to enable the power supply module to supply power to the host through the second control module, and the method comprises the following steps:
the host controls the third sub-control unit to enable the power supply module to supply power to the host through the third sub-control unit.
Preferably, if the hard disk is error-free, the host controls the second control module to stop the power supply module from supplying power to the host through the second control module to power off the host, and the power-on processing is executed, including:
if the hard disk is error-free, the host controls the third sub-control unit to stop the power supply module from supplying power to the host through the third sub-control unit to power off the host,
the host controls the second sub-control unit to enable the power supply module to supply power to the timing unit through the second sub-control unit and execute power-on processing.
Preferably, if the hard disk is error-free, the host controls the third sub-control unit to stop the power supply module from supplying power to the host through the third sub-control unit to power off the host, and the host controls the second sub-control unit to supply power to the timing unit through the second sub-control unit to perform power-on processing, including:
the host computer successfully enters an operating system arranged in the hard disk, invokes and runs a test program stored in the hard disk, after a second preset time period, the host computer controls the third sub-control unit to enable the power supply module to stop supplying power to the host computer through the third sub-control unit so as to enable the host computer to be powered off,
the host controls the second sub-control unit to enable the power supply module to supply power to the timing unit through the second sub-control unit and execute power-on processing.
Preferably, the hard disk is in error, and the host computer performs error reporting display, including:
the host cannot successfully enter an operating system installed in the hard disk, and the host stays and displays in a blue screen dead state.
Preferably, the hard disk is in error, the host computer performs error reporting display, and the method further includes:
the host successfully enters an operating system installed in the hard disk, errors occur in the hard disk in the process of calling and running the test program stored in the hard disk, the operating system stops running, and the host stops and displays a frozen picture of the currently running test program.
In a second aspect, the present application further provides a hard disk power outage detection apparatus, including: the first control module, the second control module, the host, the hard disk and the power module,
the first control module is used for enabling the power supply module to supply power to the host through the first control module to enable the host to be electrified after the first control module is electrified for a first preset duration;
the host is used for controlling the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module;
the host is also used for controlling the second control module to enable the power supply module to supply power to the host through the second control module;
the host is also used for detecting the state of the hard disk, if the hard disk is in error, the host performs error reporting display, and if the hard disk is in error, the host controls the second control module to enable the power supply module to stop supplying power to the host through the second control module so as to enable the host to be powered off, and the power-on processing is executed.
Preferably, the first control module comprises a timing unit, a first sub-control unit,
the timing unit is used for starting timing, and after a first preset time length, the timing unit controls the first sub-control unit to enable the power supply module to supply power to the host through the first sub-control unit so as to enable the host to be electrified.
Preferably, the second control module comprises a second sub-control unit and a third sub-control unit,
the second sub-control unit is used for enabling the power supply module to supply power to the timing unit through the second sub-control unit so as to enable the timing unit to be electrified;
the second sub-control unit is further used for enabling the host to control the second sub-control unit to enable the power module to stop supplying power to the timing unit through the second sub-control unit so as to enable the timing unit to be powered off;
the timing unit is further used for stopping controlling the first sub-control unit when the timing unit is powered off, so that the power supply module stops supplying power to the host through the first sub-control unit; the third sub-control unit is used for enabling the host to control the third sub-control unit to enable the power supply module to supply power to the host through the third sub-control unit.
Compared with the prior art, the technical scheme provided by the application has the following advantages:
according to the hard disk power failure detection method and device, the power supply module supplies power to the host through the first control module and the second control module respectively, the power supply module supplies power to the host through the first control module, the host is started, after the host is started, the power supply module is switched to supply power to the host through the second control module, and in the power supply state, the host enters an operating system in the hard disk, and the detection program is called and operated to detect the hard disk. When the hard disk is in error, the power supply module is kept to supply power to the host through the second control module, and the host performs error reporting display; when the hard disk is error-free, the power supply module stops supplying power to the host through the second control module, the host is powered off, meanwhile, the first control module is powered on for timing again, after a first preset time period, the power supply module supplies power to the host through the first control module again, and executes subsequent actions to circularly execute the power-off test in this way until the circulation is stopped when the hard disk is in error, the host keeps and displays the current error reporting picture of the hard disk error, and the work personnel can find and correct the hard disk error in time conveniently.
The method can realize the cyclic power-off test on the hard disk, can also reserve and display the error reporting reminding of the hard disk errors in the power-off test process, and can timely discover and correct the hard disk errors, thereby improving the performance of the hard disk, reducing the test links and having very high practicability and operability; meanwhile, the method and the device greatly improve the use efficiency of the test equipment, improve the test efficiency, reduce the input cost of the test equipment and the occupied space of the test equipment, and reduce the development and production cost of companies.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a hard disk power failure detection method provided in an embodiment of the present application;
FIG. 2 is a flowchart of another method for detecting hard disk power failure according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of another method for detecting hard disk power failure according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a hard disk power failure detection device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another hard disk power failure detection apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram of an application circuit according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
Fig. 1 is a flowchart of a hard disk power failure detection method according to an embodiment of the present application, and referring to fig. 1, the method includes the following steps:
s100: the first control module is electrified;
s200: after a first preset time period, the power supply module supplies power to the host through the first control module to enable the host to be electrified;
s300: the host controls the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module;
s400: the host controls the second control module to enable the power supply module to supply power to the host through the second control module;
s500: the host detects the state of the hard disk and judges whether the hard disk is in error or not;
s600: if the hard disk is in error, the host computer performs error reporting display,
s700: if the hard disk is error-free, the host controls the second control module to enable the power supply module to stop supplying power to the host through the second control module to enable the host to be powered off, and the S100 is skipped to carry out the power-off test in a circulating way.
Step S300 and step S400 are synchronously performed, the first control module is controlled by the host to cut off power, so that the power supply module stops switching the power supply of the host through the first control module to the second control module, and the power supply module supplies power to the host through the second control module, namely the line for supplying power to the host is switched; the power supply module supplies power to the host through the first control module in a loop power-off and power-on link, so that power-off detection of the hard disk is realized, the power supply module supplies power to the host through the second control module and then enters the hard disk detection link, when the hard disk has no error, the host is powered off and jumps to the step S100 again to enter the power-off and power-on link again, and the power-off test of the hard disk is realized for a plurality of times in a loop; when the hard disk is in error, the power supply module can continuously supply power to the host through the second control module, and the power-off and power-on links are not entered any more, so that the host can display the error, and the error record of the hard disk is reserved and displayed.
Fig. 2 is a flowchart of another method for detecting hard disk power failure according to an embodiment of the present application, and referring to fig. 1 and fig. 2, the first control module includes a timing unit and a first sub-control unit,
the step S200 specifically includes:
s210: the timing unit starts timing;
s220: after a first preset time period, the timing unit controls the first sub-control unit to enable the power supply module to supply power to the host through the first sub-control unit so as to enable the host to be electrified.
Fig. 3 is a flowchart of another method for detecting hard disk power failure according to an embodiment of the present application, and referring to fig. 1, 2, and 3, the second control module includes a second sub-control unit and a third sub-control unit,
the step S300 specifically includes:
s310: the host controls the second sub-control unit to enable the power supply module to stop supplying power to the timing unit through the second sub-control unit to enable the timing unit to be powered off,
s320: the timing unit is powered off to stop controlling the first sub-control unit, so that the power supply module stops supplying power to the host through the first sub-control unit.
The power supply module supplies power to the timing unit through the second sub-control unit so as to electrify the timing unit; the timing unit starts timing, and after a first preset time length, the timing unit controls the first sub-control unit to enable the power supply module to supply power to the host through the first sub-control unit so as to enable the host to be electrified; the host controls the second sub-control unit to enable the power supply module to stop supplying power to the timing unit through the second sub-control unit to enable the timing unit to be powered off, and the timing unit is powered off to enable the timing unit to stop controlling the first sub-control unit to enable the power supply module to stop supplying power to the host through the first sub-control unit; meanwhile, the host controls the third sub-control unit to enable the power supply module to supply power to the host through the third sub-control unit; then, the host detects the state of the hard disk; if the hard disk is error-free, the host controls the third sub-control unit to enable the power supply module to stop supplying power to the host through the third sub-control unit to enable the host to be powered off, and the host controls the second sub-control unit to enable the power supply module to supply power to the timing unit through the second sub-control unit, jumps to the power supply module to supply power to the timing unit through the second sub-control unit to enable the timing unit to be powered on to enable the cycle to carry out power-off test; if the hard disk is in error, the host computer performs error reporting display.
Fig. 4 is a schematic diagram of a hard disk power outage detection apparatus according to an embodiment of the present application, and referring to fig. 4, the apparatus includes: a first control module 20, a second control module 30, a host 40, a hard disk 50, a power module 10,
the first control module 20 is configured to enable the power module 10 to supply power to the host 40 through the first control module 20 to enable the host 40 to be powered on after the first control module 20 is powered on for a first preset period of time;
the host 40 is configured to control the first control module 20 to power off, so that the power module 10 stops supplying power to the host 40 through the first control module 20;
the host 40 is further configured to control the second control module 30 to enable the power module 10 to supply power to the host 40 through the second control module 30;
the host 40 is further configured to detect a state of the hard disk 50, if the hard disk 50 is in error, the host 40 performs error reporting display, and if the hard disk 50 is in error, the host 40 controls the second control module 30 to enable the power module 10 to stop supplying power to the host 40 through the second control module 30, so that the host 40 is powered off, and power-on processing is performed.
Fig. 5 is a schematic diagram of another hard disk power outage detection apparatus according to an embodiment of the present application, and referring to fig. 4 and 5, the first control module 20 includes a timing unit 21 and a first sub-control unit 22,
the timing unit 21 is configured to start timing, and after a first preset period of time, the timing unit 21 controls the first sub-control unit 22 to enable the power module 10 to supply power to the host 40 through the first sub-control unit 22 so as to enable the host 40 to be powered on;
the second control module 30 comprises a second sub-control unit 31 and a third sub-control unit 32,
the second sub-control unit 31 is configured to enable the power module 10 to supply power to the timing unit 21 through the second sub-control unit 31 so as to enable the timing unit 21 to be powered on;
the second sub-control unit 31 is further configured to cause the host 40 to control the second sub-control unit 31 to cause the power module 10 to stop supplying power to the timing unit 21 through the second sub-control unit 31 so as to power off the timing unit 21;
the timing unit 21 is further configured to, when the timing unit 21 is powered off, cause the timing unit 21 to stop controlling the first sub-control unit 22, and cause the power module 10 to stop supplying power to the host 40 through the first sub-control unit 22;
the third sub-control unit 32 is configured to enable the host 40 to control the third sub-control unit 32 to enable the power module 10 to supply power to the host 40 through the third sub-control unit 32.
According to the hard disk power failure detection method and device, the power module 10 supplies power to the host computer 40 through the first control module 20 and the second control module 30 respectively, the power module 10 supplies power to the host computer 40 through the first control module 20, the host computer 40 is started, after the host computer 40 is started, the power module 10 is switched to supply power to the host computer 40 through the second control module 30, and in the power supply state, the host computer 40 enters an operating system in the hard disk 50, and a detection program is called and operated to detect the hard disk 50. When the hard disk 50 is in error, the power supply module 10 is kept to supply power to the host 40 through the second control module 30, the host 40 performs error reporting display, when the hard disk 50 is in error, the power supply module 10 stops supplying power to the host 40 through the second control module 30, the host 40 is shut down, meanwhile, the first control module 20 is electrified to count time again, after a first preset time period, the power supply module 10 supplies power to the host 40 through the first control module 20 again, and performs follow-up actions to perform power-off test circularly in this way until the circulation is stopped when the hard disk 50 is in error, the host 40 keeps and displays the current error reporting of the hard disk 50 in error, and the staff can find and correct the hard disk 50 error timely conveniently.
Fig. 6 is a block diagram of an application circuit provided in the embodiment of the present application, referring to fig. 5 and 6, ac is an ac power source, that is, the power module 10 of the present application may be a mains supply, the timer and the first relay including the contacts 4 and 5 are the first control module 20 of the present application, the second relay including the contacts 1, 2 and 3 is the second control module 30 of the present application, the PC is the host 40 of the present application, and the hard disk 50 is installed in the PC and is not shown.
The three points of the contacts 1, 2 and 3 are three contacts of a second relay, a relay coil of the second relay is electrically connected with a PC and is powered by the PC, the contacts 1 and 2 form a normally closed switch, namely a second sub-control unit 31, and the contacts 1 and 3 form a normally open switch, namely a third sub-control unit 32; the timer is a timing unit 21, and is used for timing, the contacts 4 and 5 are two contacts of the first relay, and form a normally open switch, namely a first sub-control unit 22, the relay coil of the first relay is electrically connected with the timer and is powered by the timer, not shown in the figure, and the closing and opening of the contacts 4 and 5 are controlled by the timer, and are shown by dotted lines with arrows in the figure.
The AC power supply AC is connected, because the contact 1 and the contact 2 are normally closed switches, the timer starts to count when the timer is electrified, the timer controls the contact 4 and the contact 5 to be connected after the first preset time length is reached, and at the moment, the AC power supply supplies power to the PC through the contacts 4 and 5, and the PC is started.
After the PC is started, a relay coil of a second relay electrically connected with the PC is electrified to disconnect the contact 1 and the contact 2, and the contact 1 and the contact 3 are connected, so that the timer stops working due to the fact that the contact 1 and the contact 2 are disconnected to form an open circuit, and then the contact 4 and the contact 5 are disconnected to form an open circuit, the AC power supply stops supplying power to the PC through the contact 4 and the contact 5, and meanwhile, the AC power supply supplies power to the PC through a closed circuit formed by the contact 1 and the contact 3.
At this time, the PC detects the hard disk 50, and when the hard disk 50 is in error, the PC cannot successfully enter the operating system installed in the hard disk 50, and the host computer stays and displays in the blue screen dead state.
When the hard disk 50 starts to have no error, the PC successfully enters an operating system installed in the hard disk 50, the hard disk 50 is in error in the process of calling and running the test program stored in the hard disk 50, the operating system stops running, and the PC stops and displays a frozen screen of the currently running test program.
When the hard disk 50 has no error, the PC successfully enters an operating system installed in the hard disk 50, a test program stored in the hard disk 50 is called and operated, after a second preset time period, the PC enables a relay coil of the second relay to be powered off, so that the contacts 1 and 3 are disconnected, an AC power supply stops supplying power to the PC through the contacts 1 and 3, the contacts 1 and 2 are connected, the AC power supply supplies power to a timer again, and a next cycle power-off test link is entered. The hard disk 50 is always subjected to the cyclic power-off test as long as the hard disk 50 has no error, and the PC can keep and display a fault report of the current error of the hard disk 50 or a freezing picture of the program running error as long as the hard disk 50 has the error.
The method realizes error reporting display when the hard disk 50 is in error, and circularly executes the power-off test when the hard disk 50 is in error, so that the hard disk 50 can be subjected to the circular power-off test, and error reporting reminding of the hard disk 50 in the power-off test process can be reserved and displayed, the error of the hard disk 50 can be found and corrected in time, the performance of the hard disk 50 is improved, the test links are reduced, and the method has very high practicability and operability; meanwhile, the method and the device greatly improve the use efficiency of the test equipment, improve the test efficiency, reduce the input cost of the test equipment and the occupied space of the test equipment, and reduce the development and production cost of companies.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A method for detecting power failure of a hard disk, the method comprising: electrifying and detecting;
wherein the energization processing includes:
the first control module is electrified;
after a first preset time period, the power supply module supplies power to the host through the first control module to enable the host to be electrified;
the host controls the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module;
the host controls the second control module to enable the power supply module to supply power to the host through the second control module;
the detection process includes:
the host detects the state of the hard disk, if the hard disk is in error, the power supply module is kept to supply power to the host through the second control module, the host performs error reporting display,
if the hard disk is error-free, the host controls the second control module to stop the power supply module from passing through the second control
The control module supplies power to the host to enable the host to be powered off, and the power-on processing is executed;
the first control module comprises a timing unit and a first sub-control unit,
after the first preset duration, the power module supplies power to the host through the first control module to enable the host to be electrified, and the method comprises the following steps:
the timing unit starts timing;
after a first preset time length, the timing unit controls the first sub-control unit to enable the power supply module to supply power to the host through the first sub-control unit so as to enable the host to be electrified;
the second control module comprises a second sub-control unit and a third sub-control unit,
the first control module is powered on, comprising:
the power supply module supplies power to the timing unit through the second sub-control unit so as to electrify the timing unit;
the host controls the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module, and the method comprises the following steps:
the host controls the second sub-control unit to enable the power supply module to stop supplying power to the timing unit through the second sub-control unit to enable the timing unit to be powered off,
the timing unit is powered off to stop controlling the first sub-control unit, so that the power supply module stops supplying power to the host through the first sub-control unit;
the host controls the second control module to enable the power supply module to supply power to the host through the second control module, and the method comprises the following steps:
the host controls the third sub-control unit to enable the power supply module to supply power to the host through the third sub-control unit.
2. The method of claim 1, wherein if the hard disk is error-free, the host controlling the second control module to stop the power module from powering the host through the second control module to power down the host, and performing the powering-on process comprises:
if the hard disk is error-free, the host controls the third sub-control unit to stop the power supply module from supplying power to the host through the third sub-control unit to power off the host,
the host controls the second sub-control unit to enable the power supply module to supply power to the timing unit through the second sub-control unit and execute power-on processing.
3. The method of claim 2, wherein if the hard disk is error-free, the host controlling the third sub-control unit to stop the power module from powering the host through the third sub-control unit to power off the host, and the host controlling the second sub-control unit to power the power module through the second sub-control unit to power on the timing unit to perform the power-on process, comprises:
the host successfully enters an operating system installed in the hard disk, and calls and runs the operating system stored in the hard disk
After a second preset time period, the host controls the third sub-control unit to stop the power supply module from supplying power to the host through the third sub-control unit to power off the host,
the host controls the second sub-control unit to enable the power supply module to supply power to the timing unit through the second sub-control unit and execute power-on processing.
4. The method of claim 2, wherein the hard disk is in error and the host computer performs error reporting display, comprising:
the host cannot successfully enter the operating system installed in the hard disk, and the host stays and is displayed in the hard disk
Blue screen dead state.
5. The method of claim 4, wherein the hard disk is in error, the host computer performs error reporting display, and further comprising:
the host successfully enters an operating system installed in the hard disk, and calls and runs the operating system stored in the hard disk
In the process of the test program, the hard disk is in error, the operation system stops running, and the host computer stops and displays a frozen picture of the current running test program.
6. A hard disk power failure detection device, comprising: the first control module, the second control module, the host, the hard disk and the power module,
the first control module is used for controlling the first control module to be electrified, after a first preset time period,
enabling the power supply module to supply power to the host through the first control module so as to enable the host to be electrified;
the host is used for controlling the first control module to cut off power, so that the power supply module stops supplying power to the host through the first control module;
the host is also used for controlling the second control module to enable the power supply module to supply power to the host through the second control module;
the host is also used for detecting the state of the hard disk, if the hard disk is in error, the power supply module is kept to supply power to the host through the second control module, the host carries out error reporting display, and if the hard disk is in error, the host controls the second control module to enable the power supply module to stop supplying power to the host through the second control module so as to enable the host to be powered off, and the power-on processing is executed;
the first control module comprises a timing unit and a first sub-control unit,
the timing unit is used for starting timing, and after a first preset time length, the timing unit controls the first sub-control unit to enable the power supply module to supply power to the host through the first sub-control unit so as to enable the host to be electrified;
the second control module comprises a second sub-control unit and a third sub-control unit,
the second sub-control unit is used for enabling the power supply module to pass through the second sub-control unit
Powering the timing unit to energize the timing unit;
the second sub-control unit is further used for enabling the host to control the second sub-control unit to enable the power module to stop supplying power to the timing unit through the second sub-control unit so as to enable the timing unit to be powered off;
the timing unit is further used for stopping controlling the first sub-control unit when the timing unit is powered off, so that the power supply module stops supplying power to the host through the first sub-control unit;
the third sub-control unit is used for enabling the host to control the third sub-control unit to enable the power supply module to supply power to the host through the third sub-control unit.
CN201910631863.1A 2019-07-12 2019-07-12 Hard disk power-off detection method and device Active CN110515783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910631863.1A CN110515783B (en) 2019-07-12 2019-07-12 Hard disk power-off detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910631863.1A CN110515783B (en) 2019-07-12 2019-07-12 Hard disk power-off detection method and device

Publications (2)

Publication Number Publication Date
CN110515783A CN110515783A (en) 2019-11-29
CN110515783B true CN110515783B (en) 2023-08-01

Family

ID=68623274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910631863.1A Active CN110515783B (en) 2019-07-12 2019-07-12 Hard disk power-off detection method and device

Country Status (1)

Country Link
CN (1) CN110515783B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005267370A (en) * 2004-03-19 2005-09-29 Fuji Xerox Co Ltd Information processor and hard disk device
CN208488977U (en) * 2018-06-22 2019-02-12 深圳玖合精工科技有限公司 Power failure test cabinet

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083580A1 (en) * 2007-09-20 2009-03-26 Postage Robert B Techniques for Background Testing a Hard Disk Drive
US8713333B1 (en) * 2011-03-24 2014-04-29 Western Digital Technologies, Inc. Apparatus and method to simulate a power trip to a disk drive
CN102737721A (en) * 2011-04-13 2012-10-17 鸿富锦精密工业(深圳)有限公司 Hard disk array on-off testing device and method
CN104850474B (en) * 2015-05-18 2019-03-05 深圳市金泰克半导体有限公司 A kind of hard disc of computer batch-testing device and test method
CN106294050A (en) * 2016-09-22 2017-01-04 深圳市嘉合劲威电子科技有限公司 The circuit breaking test device of a kind of solid state hard disc and method of testing
CN109213646A (en) * 2018-08-29 2019-01-15 深圳佰维存储科技股份有限公司 Hard disk intelligence power failure test equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005267370A (en) * 2004-03-19 2005-09-29 Fuji Xerox Co Ltd Information processor and hard disk device
CN208488977U (en) * 2018-06-22 2019-02-12 深圳玖合精工科技有限公司 Power failure test cabinet

Also Published As

Publication number Publication date
CN110515783A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN102915100B (en) Information processor and control method thereof
CN103477328B (en) Terminal device, control device, malfunction determination system, and method for determining malfunction
CN105842554B (en) Hardware fault detection method, detection system and the intelligent terminal of intelligent terminal
CN109471670A (en) Equipment starting method and electronic equipment
CN105683921A (en) Method for updating a boot loader of a multiprocessor device
CN102455772A (en) Information processing apparatus, information processing method, and program
CN112114901B (en) Standby control circuit, method, device and storage medium
CN104268041B (en) A kind of Vehicular display device equipment frequently switches on machine automatic closed loop test method
CN110515783B (en) Hard disk power-off detection method and device
CN103380474A (en) Human-machine interface for a self-supplied relay
CN105786315A (en) Time display method and device
CN106101406B (en) Shutdown alarm triggering processing method based on mobile terminal and mobile terminal
CN114537146B (en) Vehicle control method and device, electronic equipment and storage medium
CN116860535A (en) Automatic testing device, system and method
CN103648029B (en) The energising guard method of intelligent television and system
CN112579369A (en) Multithreading flashing system, method, device, equipment and storage medium
CN111897252B (en) Load detection method, system and equipment
CN111609522B (en) Control method of compressor and air conditioner
CN104252215A (en) Control system, electronic device and control method for lightening screen
CN108243358A (en) Pluggable business board
CN102033172A (en) Network-controlled AC power cycling (APC) test system and method
CN111023441A (en) Air conditioner control method and system, storage medium and air conditioner
CN113920953B (en) Electrophoretic display device, control method, and computer-readable storage medium
CN110191035A (en) The method and system that a kind of pair of intelligent electric appliance is controlled
CN105573459B (en) Electronic device and signal processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and device for detecting power outages in hard drives

Effective date of registration: 20231120

Granted publication date: 20230801

Pledgee: Bank of Shanghai Limited by Share Ltd. Shenzhen branch

Pledgor: SHENZHEN TIGO SEMICONDUCTOR Co.,Ltd.

Registration number: Y2023980066527