CN109388217A - Determine that hard disk does not power on the method, apparatus and system of duration - Google Patents

Determine that hard disk does not power on the method, apparatus and system of duration Download PDF

Info

Publication number
CN109388217A
CN109388217A CN201710683110.6A CN201710683110A CN109388217A CN 109388217 A CN109388217 A CN 109388217A CN 201710683110 A CN201710683110 A CN 201710683110A CN 109388217 A CN109388217 A CN 109388217A
Authority
CN
China
Prior art keywords
hard disk
power
duration
controller
state
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.)
Granted
Application number
CN201710683110.6A
Other languages
Chinese (zh)
Other versions
CN109388217B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710683110.6A priority Critical patent/CN109388217B/en
Publication of CN109388217A publication Critical patent/CN109388217A/en
Application granted granted Critical
Publication of CN109388217B publication Critical patent/CN109388217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention discloses method, apparatus and system that a kind of determining hard disk does not power on duration.This method comprises: controller determines that the working condition of hard disk, the working condition are power-up state or power-down state according to the supply voltage of hard disk;When the working condition of hard disk enters power-down state by power-up state, according to the operating parameter of hard disk, effective lower electric moment of recording disk;When the working condition of hard disk is again introduced into power-up state by power-down state, recording disk powers on the moment;According to effectively lower electric moment and powering on calculate hard disk constantly do not power on duration;When hard disk is not when powering on duration more than or equal to the first preset duration, prompt information is exported, what prompt information was used to prompt user's hard disk does not power on duration.The embodiment of the present invention can be avoided user because having used the mechanical hard disk not powered on for a long time, and make the loss of data being stored in mechanical hard disk, cause unnecessary loss.

Description

Determine that hard disk does not power on the method, apparatus and system of duration
Technical field
The method, apparatus of duration is not powered on the present invention relates to field of communication technology more particularly to a kind of determining hard disk and is System.
Background technique
Currently, many equipment require to save information by hard disk, for example, server will use a large amount of hard disk to protect Deposit the key messages such as user service data.The great demand of hard disk promotes seagate fast-developing, occurs miscellaneous Hard disk.From realize framework angle hard disk can be divided into mechanical hard disk, solid state hard disk etc., wherein mechanical hard disk because high performance-price ratio at For current main-stream.Usually all store a large amount of important information in hard disk, once hard disk fails, the information stored in hard disk is lost It loses, the loss that can not be estimated can be brought to user.Therefore, hard disk is avoided to break down in life cycle most important.
For mechanical hard disk, when manufacturing machine hard disk, will use volatile materials, and hold after volatile substances It is easy to stick on the magnetic head or disk of mechanical hard disk.After magnetic head or disk are stained with these volatile materials, it is easy to cause magnetic Disk failure.In order to avoid volatile materials is sticked on the magnetic head or disk of mechanical hard disk, air mistake can be set in mechanical hard disk Structure is filtered, when mechanical hard disk works on power, air filtration structure can be filtered out volatile materials.But it is if mechanical Hard disk does not power on use for a long time, and a large amount of volatile materials will be sticked to for a long time on magnetic head or disk, and user is again at this time When secondary use mechanical hard disk, mechanical hard disk is easy to break down, and loses so as to cause the data that user stores in mechanical hard disk It loses, causes unnecessary loss.
In order to avoid user is caused damages using the mechanical hard disk not powered on for a long time, usually in hard disk label or product The information such as the maximum duration that mechanical hard disk allows to be electrically disposed on not are marked in data, to prompt user in time on mechanical hard disk Electricity.But user usually will not notice these prompt informations, or can not accurately understand the use shape of mechanical hard disk Condition causes the loss when mechanical hard disk breaks down to be stored in machine so causing to have used the mechanical hard disk not powered on for a long time Data in tool hard disk cause unnecessary loss.
Summary of the invention
The embodiment of the invention provides method, apparatus and system that a kind of determining hard disk does not power on duration, can be avoided use Family uses the mechanical hard disk not powered on for a long time.
In a first aspect, the embodiment of the invention provides a kind of methods that determining hard disk does not power on duration, comprising:
Controller determines that the working condition of hard disk, working condition include power-up state and lower electricity according to the supply voltage of hard disk State;
When the working condition of hard disk enters power-down state by power-up state, operating parameter of the controller according to hard disk, note Record effective lower electric moment of hard disk;
When the working condition of hard disk is again introduced into power-up state by power-down state, when powering on of controller recording disk It carves;
Controller according to effectively lower electric moment and powering on calculate hard disk constantly do not power on duration;
When hard disk is not when powering on duration more than or equal to the first preset duration, controller exports prompt information, prompt information Duration is not powered on for prompt user's hard disk.
In the embodiment of the present invention, controller can determine the power-up state and lower electricity of hard disk by the supply voltage of hard disk State, and when hard disk operational state enters power-down state by power-up state, operating parameter based on the hard disk determines it effectively The lower electricity moment;When hard disk is again introduced into power-up state by power-down state, by the effectively lower electric moment and can power on based on constantly That calculates mechanical hard disk does not power on duration;If hard disk does not power on duration more than or equal to the first preset duration, prompt letter is exported Breath does not power on duration with prompt user's hard disk.Mechanical hard disk can so be powered in user in use, if using The mechanical hard disk not powered on for a long time can recognize the case where mechanical hard disk does not power on for a long time, in turn by prompt information Mechanical hard disk can be handled in time, be avoided because having used the mechanical hard disk not powered on for a long time, and make to be stored in machinery Loss of data in hard disk causes unnecessary loss.
With reference to first aspect, in the first possible embodiment of first aspect, controller is according to the power supply of hard disk Voltage determines the working condition of hard disk, comprising:
When the supply voltage of hard disk is greater than or equal to predeterminated voltage, controller determines that hard disk is in power-up state;
When the supply voltage of hard disk is less than predeterminated voltage, controller determines that hard disk is in power-down state.
With reference to first aspect or above-mentioned possible embodiment, in second of possible embodiment of first aspect, The operating parameter of hard disk include hard disk be in power-up state power on duration;
Operating parameter of the controller according to hard disk, effective lower electric moment of recording disk, comprising:
Recording disk be in power-up state power on duration and hard disk enter power-down state when the front lower electric moment;
When length is greater than the second preset duration upon power-up, the effectively lower electric moment it will be updated to work as the front lower electric moment;
It is failed to grow up when the second preset duration upon power-up, is kept for the effectively lower electric moment constant.
In present embodiment, duration is powered on by what hard disk was in power-up state, to judge that this hard disk powers on and whether has Effect, so determine hard disk this lower electric moment whether be it is effective, in order to the effective lower electric moment for the hard disk that timely updates, guarantor The accuracy at card effectively lower electric moment.
With reference to first aspect or above-mentioned possible embodiment, in the third possible embodiment of first aspect, Further include: controller reads the effectively lower electric moment by timing circuit and powers on the moment.
In present embodiment, timing is carried out by timing circuit, in order to which controller is read and records above-mentioned effectively lower electricity Moment facilitates with moment, realization is powered on, and structure is simple.
With reference to first aspect or above-mentioned possible embodiment, in the 4th kind of possible embodiment of first aspect, Further include:
Controller obtains the supply voltage for the hard disk that detection circuit detects, and the work of hard disk is determined according to supply voltage State.
Second aspect, the embodiment of the invention provides a kind of controllers, comprising:
Determination unit determines that the working condition of hard disk, working condition include powering on shape for the supply voltage according to hard disk State and power-down state;
Recording unit, for when the working condition of the hard disk by the power-up state enter the power-down state when, root According to the operating parameter of hard disk, effective lower electric moment of recording disk;
Recording unit is also used to when the working condition of hard disk is again introduced into power-up state by power-down state, recording disk Power on the moment;
Computing unit does not power on duration for calculate hard disk constantly according to effectively lower electric moment and powering on;
Output unit, for when hard disk is not when powering on duration more than or equal to the first preset duration, controller output to be prompted Information, what prompt information was used to prompt user's hard disk does not power on duration.
In conjunction with second aspect, in the first possible embodiment of second aspect, determination unit is specifically used for:
When the supply voltage of hard disk is greater than or equal to predeterminated voltage, determine that hard disk is in power-up state;
When the supply voltage of hard disk is less than predeterminated voltage, determine that hard disk is in power-down state.
In conjunction with second aspect or above-mentioned possible embodiment, in second of possible embodiment of second aspect, The operating parameter of hard disk include hard disk be in power-up state power on duration;
Recording unit be specifically used for recording disk be in power-up state power on duration and hard disk enters working as power-down state The front lower electricity moment;
Controller further include:
Updating unit, for that the effectively lower electric moment will be updated to work as front lower when length is greater than the second preset duration upon power-up The electric moment,
It is failed to grow up when the second preset duration upon power-up, is kept for the effectively lower electric moment constant.
In conjunction with second aspect or above-mentioned possible embodiment, in the third possible embodiment of second aspect, Further include:
Reading unit, for reading the effectively lower electric moment by timing circuit and described powering on the moment.
In conjunction with second aspect or above-mentioned possible embodiment, in the 4th kind of possible embodiment of second aspect, Further include:
Acquiring unit, for obtaining the supply voltage for the hard disk that detection circuit detects;
Detection unit, for determining the working condition of hard disk according to supply voltage.
The third aspect, the embodiment of the invention provides a kind of system that determining hard disk does not power on duration, including hard disk and such as The controller of second aspect and its any implementation.
It further include timing circuit and/or inspection in the first possible embodiment of second aspect in conjunction with second aspect Slowdown monitoring circuit, in which:
The timing circuit is read for generating system time for the controller;
The detection circuit is used to detect the supply voltage of the hard disk, and described in detecting to controller transmission Supply voltage.
Fourth aspect, the embodiment of the invention provides a kind of equipment that determining hard disk does not power on duration, comprising:
Memory, processor, communication interface and bus;
Memory, processor and communication interface are connected by bus and complete mutual communication;
Memory is for storing program code;
Processor is corresponding with executable program code to run by reading the executable program code stored in memory Program, for executing such as the method in first aspect and its each implementation.
5th aspect, the embodiment of the present invention provide a kind of computer readable storage medium, in computer readable storage medium Be stored with instruction, when run on a computer so that computer execute it is described in first aspect and its each implementation Method.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described.
Fig. 1 is the signal that a kind of determining hard disk provided according to embodiments of the present invention does not power on the method application scenarios of duration Figure;
Fig. 2 is the schematic flow chart for the method that the determination hard disk that an embodiment provides according to the present invention does not power on duration;
Fig. 3 is that the system for the method application that a kind of determining hard disk that an embodiment provides according to the present invention does not power on duration is shown It is intended to;
Fig. 4 is the schematic block diagram for the controller that an embodiment provides according to the present invention;
Fig. 5 is the schematic block diagram of the controller of another or the offer of multiple embodiments according to the present invention;
Fig. 6 is the schematic block diagram for the equipment that the determination hard disk that an embodiment provides according to the present invention does not power on duration.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.In the absence of conflict, this Shen Please in embodiment and embodiment in feature can be combined with each other.
The embodiment of the present invention is applicable in the scene for determining that hard disk does not power on duration, for example, determining when not powering on of mechanical hard disk Long scene.Fig. 1 does not power on the schematic diagram of the method application scenarios of duration for determining hard disk a kind of in the embodiment of the present invention, such as schemes Shown in 1, controller is connect with hard disk, can recorde operating parameter when hard disk is in different working condition, and power in hard disk When, operating parameter when being in different working condition according to hard disk calculates hard disk and does not power on duration, and output prompt information. In the embodiment of the present invention, controller can be the controller of hard disk, or when hard disk powers on, the host etc. that is connect with hard disk The controller of equipment can also be the controller (as shown in Figure 1) being independently arranged, or can also be the group of above controller It closes.
Fig. 2 is the schematic flow chart for the method that the determination hard disk provided according to one embodiment of the invention does not power on duration.
One embodiment of the invention provides a kind of method that determining hard disk does not power on duration, can be executed by controller, As shown in Fig. 2, this approach includes the following steps.
101, controller determines the working condition of hard disk according to the supply voltage of hard disk.
Wherein, the working condition of hard disk includes power-up state and power-down state.Power-up state refers to that hard disk and host etc. are outer The connection of portion's equipment, the equipment such as host are the state of its power supply, and hard disk can usually carry out data read-write operation at this time.Power-down state is Refer to the state that hard disk does not have external equipment for its power supply, hard disk cannot usually carry out data read-write operation at this time.For machinery For hard disk, when there is external equipment to power for it, supply voltage can achieve operating voltage, such as 5 volts, in mechanical hard disk Disk etc. can just run, i.e., mechanical hard disk is in power-up state;And when no external equipment is powered for it, supply voltage Operating voltage cannot be reached, usually 0 volt, disk in mechanical hard disk etc. cannot be run, i.e., mechanical hard disk is in power-down state. So working condition locating for hard disk and hard disk operational can be determined in the embodiment of the present invention by the supply voltage of hard disk The information such as at the time of state changes.
102, when the working condition of hard disk enters power-down state by power-up state, controller is joined according to the operation of hard disk Number, effective lower electric moment of recording disk.
Wherein, the effectively lower electric moment indicates that hard disk reaches preset duration in the lasting duration of power-up state (powering on duration) The lower electric moment of lower electricity afterwards, i.e. hard disk be in when power-up state meets or exceeds preset duration the lower electricity moment of lower electricity again.Hard disk Operating parameter may include hard disk be in power-up state power on duration.In the embodiment of the present invention, controller is determining hard disk Working condition after, that is, can determine that the operating parameter of hard disk, and then can recorde effective lower electric moment of hard disk.
It should be noted that only it continues certain time length (for example, 2 is small in power-up state for mechanical hard disk When) in the case where, air filtration structure could effectively filter the volatile materials to volatilize in mechanical hard disk, and only have The volatile materials that effect filters out mechanical hard disk could reduce the probability that mechanical hard disk breaks down.If mechanical hard disk is powering on After fail to reach certain time length just lower electricity, then mechanical hard disk this time powers on effective there is no carrying out to volatile materials therein Filtering, although mechanical hard disk is excessively electric at this time, is not still avoided that due to volatile materials is sticked to magnetic head or disk The case where causing hard disk to break down, thus in such cases the power up of mechanical hard disk be it is invalid, then in such cases The lower electric moment be also invalid.
It should be noted that controller will record when each hard disk operational state enters power-down state by power-up state The effectively lower electric moment is remembered when so effective lower electric moment of controller record being electricity under hard disk last time in the embodiment of the present invention Effective lower electric moment of record.
103, when the working condition of hard disk is again introduced into the power-up state by the power-down state, controller record is hard Disk powers on the moment.
Wherein, controller can power on the moment by recording disk when hard disk is again introduced into power-up state by power-down state, In order to not power on duration by powering on constantly for hard disk come calculate hard disk.Wherein, the record includes not having in controller The hard disk records this and powers on the moment or have been recorded with when powering on the moment of the hard disk in the controller when powering on the moment, more New record powers on the moment.
It should be noted that in one embodiment of the present invention, in step 102 and step 103 the effectively lower electric moment and Power on the moment is detected to obtain by controller;In another embodiment of the present invention, effectively lower electricity in step 102 and step 103 Moment and power on the moment can by controller by read timing circuit generation time obtain.
104, controller according to effectively lower electric moment and powering on calculate hard disk constantly do not power on duration.
Wherein, controller defines powering on for hard disk when hard disk operational state enters power-up state by power-down state Moment, in conjunction with the effectively lower electric moment of hard disk can calculate hard disk do not power on duration.It is described a length of described when not powering on The difference at the effective lower electric moment for powering on moment and the hard disk of hard disk.
105, when hard disk is not when powering on duration more than or equal to the first preset duration, controller exports prompt information.
Wherein, what prompt information was used to prompt user's hard disk do not power on duration, i.e. prompt user's hard disk does not power on duration The first preset duration is reached, the probability to break down is higher, and user is needed to handle in time.First preset duration can root It determines, such as is set as 6 months according to the specific performance of hard disk.
It should be noted that step 103 to step 105 is hard disk operational state by power-down state in the embodiment of the present invention The data handling procedure executed when into power-up state, for controller when hard disk powers on, calculate hard disk immediately does not power on duration, If the duration that do not power on of hard disk reaches the first preset time, user can be prompted at the first time, avoids hard disk in subsequent use It breaks down in the process.Step 101 with step 103 to step 105 there is no stringent chronological order, i.e., on hard disk When electric, need to be implemented step 103 to step 105, and it is electric under hard disk when, need to be implemented step 102, in order to be able to guarantee hard The accuracy at disk effectively lower electric moment, and then guarantee that the hard disk being calculated does not power on the accuracy of duration.
In the embodiment of the present invention, controller can determine the power-up state and power-down state of hard disk by supply voltage, And when hard disk operational state enters power-down state by power-up state, operating parameter based on the hard disk determines its effectively lower electricity Moment;When hard disk is again introduced into power-up state by power-down state, based on the effectively lower electric moment and moment computer can be powered on Tool hard disk does not power on duration;If hard disk does not power on duration more than or equal to the first preset duration, prompt information is exported, with Prompt user's hard disk does not power on duration.Mechanical hard disk can so be powered in user in use, if when using long Between the mechanical hard disk that does not power on, can recognize the case where mechanical hard disk does not power on for a long time by prompt information, and then can be with Mechanical hard disk is handled in time, is avoided because having used the mechanical hard disk not powered on for a long time, and makes to be stored in mechanical hard disk In loss of data, cause unnecessary loss.
In a kind of optional embodiment of the embodiment of the present invention when supply voltage is greater than or equal to predeterminated voltage, determine Hard disk is in power-up state;When supply voltage is less than predeterminated voltage, determine that hard disk is in power-down state.
Wherein, in the embodiment of the present invention, predeterminated voltage indicates required voltage when hard disk works normally, so working as power supply When voltage is greater than or equal to predeterminated voltage, voltage needed for expression power supply has reached hard disk operational, hard disk be can work normally, Determine that hard disk is in power-up state;When supply voltage is less than predeterminated voltage, electricity needed for expression power supply is not up to hard disk operational Pressure, hard disk can not work, and determine that hard disk is in power-down state.
It should be noted that the value of predeterminated voltage can be configured according to concrete scene, usually more than hard disk is normal The value of supply voltage when work.The variation of supply voltage value embodies the variation of hard disk operational state, while hard disk is in power supply electricity Pressure could work normally when reaching the voltage value needed for working normally, so the change situation of supply voltage also embodies hard disk work Make the situation of change of state.When electric under hard disk, supply voltage can drop to zero from normal operating voltage value.It is default in setting When the value of voltage, if the controller in the embodiment of the present invention includes hard disk controller, that is, pass through hard disk controller recording disk Effective lower electric moment, then need to guarantee that hard disk controller after determining that hard disk enters power-down state, can have sufficient time to Effective lower electric moment of recording disk, therefore to avoid predeterminated voltage setting too small, cause hard disk controller to determine that hard disk enters After power-down state, have little time effective lower electric moment of recording disk, so cause record the effectively lower electric moment and calculating it is hard Disk powers on duration and mistake occurs.
In the optional embodiment of another of the embodiment of the present invention, the operating parameter of hard disk include hard disk be in power on shape State powers on duration;So when hard disk enters power-down state by power-up state, according to the operating parameter of hard disk in step 101, The step of effective lower electric moment of recording disk, can specifically execute are as follows: what recording disk be in power-up state powers on duration and firmly Disk enter power-down state when the front lower electric moment;When length is greater than the second preset duration upon power-up, it will update at the effectively lower electric moment For when the front lower electric moment;It is failed to grow up when the second preset duration upon power-up, is kept for the effectively lower electric moment constant.
Wherein, due to for mechanical hard disk, only it is after normally powering on and reaching certain time length, i.e., hard disk is in upper Electricity condition powers on duration greater than the second preset duration, could carry out effective mistake to the volatile materials to volatilize in mechanical hard disk Filter, so be in powering on duration and determining and whether effectively to power on for power-up state based on hard disk in the embodiment of the present invention, and then true Whether what is recorded surely is effective when the front lower electric moment.If it is determined that when the front lower electric moment is effective, then by effective lower electric moment of hard disk It is updated to when the front lower electric moment;If it is determined that will then keep the effectively lower electric moment constant when the front lower electric moment is invalid.Power on duration It can be determined, such as be set as two hours according to the specific performance of hard disk.
In the embodiment of the present invention, power on duration by what hard disk was in power-up state, come judge this hard disk power on whether Effectively, so determine hard disk this lower electric moment whether be it is effective, in order to the effective lower electricity moment for the hard disk that timely updates, Guarantee the accuracy at effectively lower electric moment.
In a kind of optional embodiment of the embodiment of the present invention, controller can detecte the supply voltage of hard disk;At this In the optional embodiment of the another kind of inventive embodiments, in the embodiment of the present invention before step 101, controller can also be obtained The supply voltage for the hard disk for taking detection circuit to detect.
Wherein, detection circuit can be used for detecting the supply voltage of hard disk.Controller acquisition detection circuit detects hard After the supply voltage of disk, the working condition of hard disk is determined based on the voltage value of acquisition.
As the present invention implement in a kind of determining hard disk do not power on duration method specific embodiment, controller can be with It is connect respectively with timing circuit, detection circuit.Clocking capability may be implemented in timing circuit, and controller is allow to need to record firmly When each moment of disk working condition, the time for needing to record is obtained by timing circuit.Timing circuit can be set in hard disk On, and powered by independent battery, to can also work when hard disk does not power on.Detection circuit can be used to detect hard disk Supply voltage allows controller and determines based on the supply voltage that detection circuit detects the working condition of hard disk.
Fig. 3 does not power on the system schematic of the method concrete application of duration for determining hard disk a kind of in the embodiment of the present invention.
It needs to be determined that hard disk 20 does not power on duration in the embodiment of the present invention, as shown in figure 3, hard disk 20 includes controller 21, timing circuit 22, detection circuit 23 and voltage comparator circuit 24.Timing circuit 22 includes battery VCC2 and real-time clock (real-time clock, RTC) chip 221, one end of RTC chip 221 are connect with the anode of battery VCC2, RTC chip 221 The other end connect with controller 21.Voltage comparator circuit 24 include two input terminals and an output end, wherein output end with Controller 21 connects, and an input terminal is connect with the anode of battery VCC2, the output end of another input terminal and detection circuit 23 Connection.Detection circuit 23 include concatenated two resistance R1 and R2, R1 and R2 series connection after both ends in, the confession of one end and hard disk 20 The anode connection of power supply VCC1, other end ground connection, R1 and the concatenated junction A of R2 are the output end of detection circuit 23.
In system shown in Fig. 3, controller 21 is interior performed by controller in above-mentioned embodiment illustrated in fig. 2 for executing Hold.
Timing circuit 22 can be set on hard disk 20, clocking capability be realized by RTC chip 221, in order to guarantee hard disk When in power-down state, RTC chip can continue to work, so being set as the battery VCC2 of RTC chip power supply.By timing circuit 22 are set on hard disk and guarantee that it is in running order always, it is ensured that controller 21 records the accuracy at each moment, i.e., The temporal information required when calculating hard disk 20 and not powering on duration of controller 21 passes through the timing circuit 22 continued working and obtains, So as to reduce the error between each temporal information, the accuracy of calculating is improved.
Detection circuit 23 can be set on hard disk 20, will test one end in circuit 23 after R1 and R2 series connection and VCC1 Anode connection, the other end ground connection, then concatenated R1 and R2 both end voltage is the voltage of VCC1, by detection series resistance R1 and The voltage of the junction A of R2 detects the voltage value of VCCl.In the embodiment of the present invention, the resistance value of R1 and R2 can be adjusted It is whole, i.e. the different resistance value ratio of setting R1 and R2, so as to be arranged the dividing ratios between R1 and R2, so it is adjustable not With the voltage at the A detected in situation, so as to the voltage value of flexible setting predeterminated voltage, detection so can be improved The flexibility and sensitivity of VCC1.
It should be noted that the voltage value that detection circuit 23 exports can be transferred directly to controller 21, controller 21 can Step 101 is executed with voltage based on the received.In the embodiment of the present invention, in order to mitigate the burden of controller 21, it can also be arranged Voltage comparator circuit 24 realizes the treatment process of step 101 by voltage comparator circuit 24.
Voltage comparator circuit 24 realizes that the treatment process of step 101 needs will test the voltage value of the detection of circuit 23 and presets Voltage is compared, so an input terminal of voltage comparator circuit 24 is the voltage value that detection circuit 23 detects, another is defeated Entering end is predeterminated voltage, exports the comparison result of the voltage value and predeterminated voltage that detect for detection circuit 23.Voltage comparator circuit 24 output end is connect with controller 21, and controller 21 can receive the comparison result of voltage comparator circuit 24, is tied based on comparing Fruit determines the working condition of hard disk 20.
Since an input terminal of voltage comparator circuit 24 is predeterminated voltage, so continual and steady power supply is needed to provide this Input signal.And in timing circuit 22, provided with the battery VCC2 to power for RTC chip 221, battery VCC2 can be exported and be held Continue stable voltage, so can compare to simplify circuit structure by the battery VCC1 in timing circuit 22 for voltage Circuit 24 provides the input signal as predeterminated voltage, i.e., as shown in figure 3, the input terminal and battery of voltage comparator circuit 24 The anode connection of VCC2.
In structure shown in Fig. 3, controller 21 is the controller of hard disk 20, can by the signal that voltage comparator circuit 24 exports To determine that hard disk 20 enters power-up state or power-down state, and the time by reading the generation of timing circuit 22 is come recording disk 20 power on the moment and when the front lower electric moment, and in 20 power up of hard disk, recording disk powers on duration.Controller 21 Powering on duration and determine whether to update effective lower electric moment of hard disk by hard disk 20, when need to update hard disk it is effective under it is electric It is updated when the moment.
Meanwhile controller 21 also powers on moment and note based on hard disk 20 when determining that hard disk 20 enters power-up state The effectively lower electric moment calculating hard disk of record does not power on duration, and does not power on duration more than or equal to the first preset duration in hard disk When, prompt information is exported, that is, executes the treatment process of step 104 and step 105.Controller 21 at this time can believe the prompt In breath output to the equipment such as the host being connect with hard disk 20, by device prompts such as hosts to user, or can also be in hard disk Setting prompt equipment on 20, controller 20 is by prompting equipment to export the prompt information.
As a kind of optional embodiment of the embodiment of the present invention, the controller 21 in system shown in Figure 3 can also be The controller of the equipment such as the host being connect with hard disk 20.Controller 21 executes effective lower electricity moment of recording disk 20 and upper at this time Process (the step 101- step 103) at electric moment.After hard disk 20 enters power-up state, the equipment such as host being connect with hard disk 20 Controller can read effective lower electric moment of hard disk from controller 21 and power on the moment, then calculate hard disk not on Electric duration, and when not powering on duration more than or equal to the first preset duration, prompt information is exported in hard disk.In this case it exports Prompt information directly pass through the device prompts such as host to user, do not need that prompt equipment is arranged in hard disk, while can Prompt information is timely exported, there are failure risks to prompt user's hard disk, need to carry out the processing such as replacement hard disk as early as possible.
In the above-described embodiments, timing circuit 22 can be connect by bus with controller 21, for example, twin wire is serially total Line (inter-integrated circuit, I2C), Serial Peripheral Interface (SPI) (Serial Peripheral Interface, The buses such as SPI).When the voltage value that voltage comparator circuit 24 compares the detection of detection circuit 23 is less than predeterminated voltage, Ke Yitong The mode notification controller 21 interrupted is crossed, in order to which controller 21 can carry out the relevant treatment process of lower electricity in time, record has The effect lower electric moment.
Fig. 4 is the schematic block diagram for the controller 200 that an embodiment provides according to the present invention.As shown in figure 4, the controller 200 include:
Determination unit 201 determines that the working condition of hard disk, working condition include powering on for the supply voltage according to hard disk State and power-down state;
Recording unit 202, for when the working condition of hard disk enters power-down state by power-up state, according to the fortune of hard disk Row parameter, effective lower electric moment of recording disk;
Recording unit 202 is also used to when the working condition of hard disk enters power-up state by power-down state, recording disk Power on the moment;
Computing unit 203 does not power on duration for calculate hard disk constantly according to effectively lower electric moment and powering on;
Output unit 204, for when hard disk is not when powering on duration more than or equal to the first preset duration, controller output to be mentioned Show information, what prompt information was used to prompt user's hard disk does not power on duration.
In the embodiment of the present invention, controller 200 can determine the power-up state and lower electric shape of hard disk by supply voltage State, and when hard disk operational state enters power-down state by power-up state, operating parameter based on the hard disk, under determining that its is effective The electric moment;When hard disk enters power-up state by power-down state, based on the effectively lower electric moment and moment calculating machine can be powered on Hard disk does not power on duration;If hard disk does not power on duration more than or equal to the first preset duration, prompt information is exported, to mention That shows user's hard disk does not power on duration.Mechanical hard disk can so be powered in user in use, if using for a long time The mechanical hard disk not powered on, can recognize mechanical hard disk the case where not powering on for a long time by prompt information, so can and When mechanical hard disk is handled, avoid because having used the mechanical hard disk that does not power on for a long time, and make to be stored in mechanical hard disk Loss of data, cause unnecessary loss.
It is understood that determination unit is specifically used for:
When the supply voltage of hard disk is greater than or equal to predeterminated voltage, determine that hard disk is in power-up state;
When the supply voltage of hard disk is less than predeterminated voltage, determine that hard disk is in power-down state.
Fig. 5 is the schematic block diagram of the controller 200 provided according to the present invention another or multiple embodiments.
It is understood that the operating parameter of hard disk include hard disk be in power-up state power on duration;
Recording unit 202 is specifically used for when hard disk enters power-down state by power-up state, and recording disk is in and powers on shape State power on duration and hard disk enter power-down state when the front lower electric moment;
As shown in figure 5, controller 200 can also include:
Updating unit 205, for that will be updated to currently at the effectively lower electric moment when length is greater than the second preset duration upon power-up It at the lower electricity moment, is failed to grow up when the second preset duration upon power-up, is kept for the effectively lower electric moment constant.
It is understood that as shown in figure 5, controller 200 can also include:
Reading unit 206, for reading the effectively lower electric moment by timing circuit and described powering on the moment.
It is understood that as shown in figure 5, controller 200 can also include:
Acquiring unit 207, for obtaining the supply voltage for the hard disk that detection circuit detects;
Detection unit 208, for determining the working condition of hard disk according to supply voltage.
Controller 200 according to an embodiment of the present invention can correspond to determining hard disk according to an embodiment of the present invention and not power on Executing subject in the method for duration, and above and other operation and/or function difference of the modules in controller 200 In order to realize the corresponding process of each method in Fig. 2, for sake of simplicity, details are not described herein.
Fig. 6 is the schematic block diagram for the equipment 300 that determining hard disk according to an embodiment of the invention does not power on duration.Such as figure Shown in 6, equipment 300 includes processor 301, memory 302 and communication interface 303, and memory 302 is for storing executable journey Sequence code, processor 301 is run by reading the executable program code stored in memory 302 and executable program code Corresponding program, communication interface 303 is used for and external device communication, and equipment 300 can also include bus 304, and bus 304 is used for Processor 301, memory 302 and communication interface 303 are connected, passes through processor 301, memory 302 and communication interface 303 total Line 304 is in communication with each other.
Specifically, processor 301 is also used to execute a kind of method that determining hard disk does not power on duration, determines that hard disk does not power on The method of duration, comprising:
Determine that the working condition of hard disk, working condition include power-up state and power-down state according to the supply voltage of hard disk;
When the working condition of hard disk enters power-down state by power-up state, according to the operating parameter of hard disk, recording disk Effective lower electric moment;
When the working condition of hard disk enters power-up state by power-down state, recording disk powers on the moment;
According to effectively lower electric moment and powering on calculate hard disk constantly do not power on duration;
When hard disk is not when powering on duration more than or equal to the first preset duration, output prompt information, prompt information is for mentioning That shows user's hard disk does not power on duration.
Determining hard disk according to an embodiment of the present invention does not power on the equipment 300 of duration, can correspond to implement according to the present invention The determination hard disk of example does not power on the executing subject in the method for duration, and in determining the equipment 300 that hard disk does not power on duration Modules above and other operation and/or function respectively in order to realize the corresponding process of each method in Fig. 2, in order to Succinctly, details are not described herein.
One embodiment of the invention provides a kind of system that determining hard disk does not power on duration, including hard disk and controller, control The specific structure of device processed is as shown in Fig. 4 or Fig. 5.
As a kind of optional embodiment of the embodiment of the present invention, system can also include timing circuit and/detection electricity Road.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk (solid state disk, SSD)) etc..

Claims (12)

1. a kind of method that determining hard disk does not power on duration characterized by comprising
Controller determines the working condition of the hard disk according to the supply voltage of hard disk, the working condition include power-up state and Power-down state;
When the working condition of the hard disk enters the power-down state by the power-up state, the controller is according to described hard The operating parameter of disk records effective lower electric moment of the hard disk;
When the working condition of the hard disk is again introduced into the power-up state by the power-down state, the controller records institute That states hard disk powers on the moment;
The controller according to the effectively lower electric moment and it is described power on calculate the hard disk constantly do not power on duration;
When the hard disk is not when powering on duration more than or equal to the first preset duration, the controller exports prompt information, described What prompt information was used to prompt hard disk described in user does not power on duration.
2. the method according to claim 1, wherein the controller is determined according to the supply voltage of the hard disk The working condition of the hard disk, comprising:
When the supply voltage of the hard disk be greater than or equal to predeterminated voltage when, the controller determine the hard disk be in it is described on Electricity condition;
When the supply voltage of the hard disk is less than the predeterminated voltage, the controller determines that the hard disk is in the lower electricity State.
3. method according to claim 1 or 2, which is characterized in that the operating parameter of the hard disk includes at the hard disk Duration is powered in the power-up state;
The controller records effective lower electric moment of the hard disk according to the operating parameter of the hard disk, comprising:
Record the hard disk be in the power-up state power on duration and the hard disk enter power-down state when front lower electricity It carves;
When it is described power on duration greater than the second preset duration when, the effectively lower electric moment is updated to described when front lower electricity It carves;
When it is described power on duration no more than second preset duration when, kept for the effectively lower electric moment constant.
4. method described in any one of -3 according to claim 1, which is characterized in that the method also includes: the control Device reads the effectively lower electric moment by timing circuit and described powers on the moment.
5. method described in any one of -4 according to claim 1, which is characterized in that the method also includes:
The controller obtains the supply voltage for the hard disk that detection circuit detects, and determines institute according to the supply voltage State the working condition of hard disk.
6. a kind of controller characterized by comprising
Determination unit determines that the working condition of the hard disk, the working condition include upper for the supply voltage according to hard disk Electricity condition and power-down state;
Recording unit, for when the working condition of the hard disk by the power-up state enter the power-down state when, according to institute The operating parameter for stating hard disk records effective lower electric moment of the hard disk;
The recording unit is also used to be again introduced into the power-up state by the power-down state when the working condition of the hard disk When, record the hard disk powers on the moment;
Computing unit, for according to the effectively lower electric moment and it is described power on calculate the hard disk constantly do not power on duration;
Output unit, for when the hard disk is not when powering on duration more than or equal to the first preset duration, the controller to be exported Prompt information, what the prompt information was used to prompt hard disk described in user does not power on duration.
7. controller according to claim 6, which is characterized in that the determination unit is specifically used for:
When the supply voltage of the hard disk is greater than or equal to predeterminated voltage, determine that the hard disk is in the power-up state;
When the supply voltage of the hard disk is less than the predeterminated voltage, determine that the hard disk is in the power-down state.
8. controller according to claim 6 or 7, which is characterized in that the operating parameter of the hard disk includes the hard disk Duration is powered in the power-up state;
The recording unit be specifically used for record the hard disk be in the power-up state power on duration and the hard disk entrance Power-down state works as the front lower electric moment;
The controller further include:
Updating unit, for when it is described power on duration greater than the second preset duration when, the effectively lower electric moment is updated to institute State when the front lower electric moment, when it is described power on duration no more than the second preset duration when, kept for the effectively lower electric moment constant.
9. according to controller described in claim 6-8 any one, which is characterized in that further include:
Reading unit, for reading the effectively lower electric moment by timing circuit and described powering on the moment.
10. the controller according to any one of claim 6-9, which is characterized in that further include:
Acquiring unit, for obtaining the supply voltage for the hard disk that detection circuit detects;
Detection unit, for determining the working condition of the hard disk according to the supply voltage.
11. a kind of system that determining hard disk does not power on duration, which is characterized in that including hard disk and as claim 6-10 is any one Controller described in.
12. system according to claim 11, which is characterized in that further include timing circuit and/or detection circuit, in which:
The timing circuit is read for generating system time for the controller;
The detection circuit is used to detect the supply voltage of the hard disk, and the power supply detected is sent to the controller Voltage.
CN201710683110.6A 2017-08-10 2017-08-10 Method, device and system for determining duration of unpowered hard disk Active CN109388217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710683110.6A CN109388217B (en) 2017-08-10 2017-08-10 Method, device and system for determining duration of unpowered hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710683110.6A CN109388217B (en) 2017-08-10 2017-08-10 Method, device and system for determining duration of unpowered hard disk

Publications (2)

Publication Number Publication Date
CN109388217A true CN109388217A (en) 2019-02-26
CN109388217B CN109388217B (en) 2020-08-14

Family

ID=65415417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710683110.6A Active CN109388217B (en) 2017-08-10 2017-08-10 Method, device and system for determining duration of unpowered hard disk

Country Status (1)

Country Link
CN (1) CN109388217B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110554718A (en) * 2019-09-16 2019-12-10 珠海格力电器股份有限公司 Temperature compensation method and device, storage medium and temperature controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050044436A1 (en) * 2003-01-31 2005-02-24 Microsoft Corporation Dynamic power control apparatus, systems and methods
CN105204784A (en) * 2015-10-16 2015-12-30 联想(北京)有限公司 Monitoring method and electronic equipment
CN105260267A (en) * 2015-09-28 2016-01-20 联想(北京)有限公司 Data refreshing method and solid state disk

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050044436A1 (en) * 2003-01-31 2005-02-24 Microsoft Corporation Dynamic power control apparatus, systems and methods
CN105260267A (en) * 2015-09-28 2016-01-20 联想(北京)有限公司 Data refreshing method and solid state disk
CN105204784A (en) * 2015-10-16 2015-12-30 联想(北京)有限公司 Monitoring method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110554718A (en) * 2019-09-16 2019-12-10 珠海格力电器股份有限公司 Temperature compensation method and device, storage medium and temperature controller
WO2021051915A1 (en) * 2019-09-16 2021-03-25 珠海格力电器股份有限公司 Method and device for temperature compensation, storage medium, and thermostat

Also Published As

Publication number Publication date
CN109388217B (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN110191018B (en) Abnormity monitoring method and device for vehicle CAN bus and computer equipment
TWI450103B (en) Remote management systems and methods for servers, and computer program products thereof
JP2008533954A (en) Method for improving reliability in DC brushless motor and cooling fan by microcontroller
CN109733238B (en) Fault detection method, device, storage medium and processor
CN103486068A (en) Smart fan and control detecting method and device for smart fan
CN103631685A (en) Fault self-inspection system and method
CN106716161B (en) Battery control method and system and battery
CN110703096B (en) Motor working state detection method, device, equipment and storage medium
CN108223344A (en) Electric pump control method and system
CN115658408A (en) Sensor state detection method and device and readable storage medium
CN110345100A (en) Monitoring method, device, equipment and the readable storage medium storing program for executing of server fan rotating speed
CN110457907A (en) A kind of firmware program detecting method and device
CN116381542A (en) Health diagnosis method and device of power supply equipment based on artificial intelligence
CN113487182B (en) Device health state evaluation method, device, computer device and medium
CN109388217A (en) Determine that hard disk does not power on the method, apparatus and system of duration
CN114878960A (en) Fault diagnosis method, storage medium, power acquisition terminal, and fault diagnosis system
CN111211596B (en) Method and device for monitoring power utilization state of charging cabinet
CN115623464B (en) Fault processing method and device for Bluetooth module of electric energy meter and electric energy meter
CN114083987B (en) Correction method and device for battery monitoring parameters and computer equipment
CN110501554A (en) A kind of detection method and device of storage chip installation
CN112946562B (en) Power failure protection method and device for double-core intelligent electric meter and double-core intelligent electric meter
CN211066718U (en) Ultrasonic diagnostic apparatus fault diagnosis device and equipment maintenance management system
CN105158611B (en) A kind of information processing method and electronic equipment
CN104346252A (en) Filtering method of monitoring chip for abnormal sensing data
CN112505548A (en) Method and related device for monitoring service life of CMOS battery

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