Summary of the invention
The purpose of the embodiment of the invention provides a kind of power-off protection of solid state disk method, Apparatus and system; at super capacitor as the relatively low shortcoming of its reliability of power down protection power supply; the design of the power down protection power supply that the embodiment of the invention is formed with first super-capacitor module and second super-capacitor module with redundancy properties; and detect by the state to first super-capacitor module, realized when SSD place system generation powered-off fault phenomenon, improving the purpose of SSD place system data security.
For achieving the above object, the embodiment of the invention provides a kind of power-off protection of solid state disk method, comprising:
Obtain the self-discharge time of first super-capacitor module;
When described self-discharge time during less than preset value, send the second super-capacitor module discharge information to charge-discharge circuit to connect the second super-capacitor module discharge loop, be the solid state hard disc power supply by second super-capacitor module.
Further, the embodiment of the invention provides a kind of power-off protection of solid state disk device, comprising:
Acquisition module, the self-discharge time that is used to obtain first super-capacitor module;
Handover module was used for when described self-discharge time during less than preset value, send the second super-capacitor module discharge information to charge-discharge circuit to connect the second super-capacitor module discharge loop, be the solid state hard disc power supply by second super-capacitor module.
Again further, the embodiment of the invention provides a kind of power-off protection of solid state disk system, comprising:
The power down protection power supply comprises two super-capacitor module, is used for storage and discharges electric energy, and send starting potential information, charging voltage information or self-discharge information of voltage;
Voltage comparator is used for according to described starting potential information output starting potential status information; According to described charging voltage information output charging voltage status information; According to described self-discharge information of voltage output self-discharge voltage status information;
Controller is used for obtaining the self-discharge time of a super-capacitor module in described two super-capacitor module according to described starting potential status information, charging voltage status information and self-discharge voltage status information; When described self-discharge time during less than preset value, send another super-capacitor module discharge information to charge-discharge circuit to connect another super-capacitor module discharge loop, be the solid state hard disc power supply by another super-capacitor module;
Charge-discharge circuit is used to receive the discharge information of described super-capacitor module, to connect described super-capacitor module discharge loop.
The embodiment of the invention is in self-discharge time during less than preset value; discerning first super-capacitor module lost efficacy; and send the second super-capacitor module discharge information to connect the second super-capacitor module discharge loop; by second super-capacitor module is the technical scheme of solid state hard disc power supply; utilization detects the state of first super-capacitor module; and adopt the design of the power down protection power supply that first super-capacitor module and second super-capacitor module form with redundancy properties, realized when SSD place system generation powered-off fault phenomenon, improving the purpose of SSD place system data security.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is embodiment of the invention part embodiment, rather than whole embodiment.Based on the embodiment in the embodiment of the invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of embodiment of the invention protection.
Fig. 2 is the process flow diagram of embodiment of the invention power-off protection of solid state disk method embodiment one.As shown in Figure 2, the power-off protection of solid state disk method of this enforcement comprises:
Step 201, the self-discharge time of obtaining first super-capacitor module;
There are first super-capacitor module and two standby power supplies of second super-capacitor module in SSD place system.First super-capacitor module is as the standby power supply of acquiescence, after SSD place system powers on, whether the self-discharge time of obtaining first super-capacitor module is working properly to detect first super-capacitor module, to prevent the generation power down of SSD place system, and when powering by first super-capacitor module because first super-capacitor module lost efficacy can not normal power supply and cause loss of data.
Step 202, when self-discharge time during less than preset value, send the second super-capacitor module discharge information to charge-discharge circuit to connect the second super-capacitor module discharge loop, be the SSD power supply by second super-capacitor module.
Because normal super capacitor self-discharge needs a period of time, if the self-discharge time is too short, then super capacitor may be in invalid state, and therefore the inefficacy of first super-capacitor module can be weighed by the self-discharge time of first super-capacitor module.Particularly, when the generation power down of SSD place system, and the self-discharge time of judging first super-capacitor module is less than preset value, illustrate that first super-capacitor module is in invalid state and can't SSD be powered as standby power supply, in order to guarantee not lost of data, send this moment the second super-capacitor module discharge information to charge-discharge circuit connecting the second super-capacitor module discharge loop, be the SSD power supply by the second standby super-capacitor module.
A kind of power-off protection of solid state disk method that present embodiment provided; at super capacitor as the relatively low shortcoming of its reliability of power down protection power supply; the design of the power down protection power supply that the embodiment of the invention is formed with first super-capacitor module and second super-capacitor module with redundancy properties; and detect by the state to first super-capacitor module, realized when SSD place system generation powered-off fault phenomenon, improving the purpose of SSD place system data security.
Fig. 3 is the process flow diagram of embodiment of the invention power-off protection of solid state disk method embodiment two.As shown in Figure 3, the power-off protection of solid state disk method of this enforcement comprises:
Step 301, the record initial moment of self-discharge;
In the present embodiment, the initial moment of self-discharge is the initial moment of the first super-capacitor module self-discharge, and first super-capacitor module began to discharge from the initial moment of self-discharge.Self-discharge can for the super capacitor in first super-capacitor module by with the slow process of discharge of its parallel resistor.Further, the self-discharge time of first super-capacitor module can be first super-capacitor module time used from overvoltage condition self-discharge to under-voltage condition.Particularly, the initial moment of self-discharge is that first super-capacitor module is in overvoltage condition, and in the initial moment that the first super-capacitor module charge circuit and the first super-capacitor module discharge loop all disconnect, the record initial moment of self-discharge specifically can realize by following steps:
Step 3011, obtain the starting potential status information of first super-capacitor module that sends from voltage comparator;
Step 3012, according to the starting potential status information, judge whether first super-capacitor module is in overvoltage condition, if not, then send the first super-capacitor module charge information to connect the first super-capacitor module charge circuit, target is for the charging of first super-capacitor module, until making first super-capacitor module be in overvoltage condition
Step 3013, in the process of first super-capacitor module charging, obtain the charging voltage status information of first super-capacitor module that sends from voltage comparator in real time;
Step 3014, according to the charging voltage status information, detect first super-capacitor module in real time and whether be in overvoltage condition, if, then send first super-capacitor module charging disconnection information to charge-discharge circuit to disconnect the first super-capacitor module charge circuit;
Step 3015 and to write down the moment that the first super-capacitor module charge circuit disconnects be the initial moment of self-discharge;
Further, according to the starting potential status information, if judge first super-capacitor module is to be in overvoltage condition, and if connecting the first super-capacitor module charge circuit this moment is the charging of first super-capacitor module, then need send first super-capacitor module charging disconnection information, disconnecting the first super-capacitor module charge circuit, and the moment that record disconnects the first super-capacitor module charge circuit be the initial moment of self-discharge.
Step 302, record self-discharge stop constantly;
In the present embodiment, self-discharge stops the termination moment that the moment is the first super-capacitor module self-discharge.Particularly, self-discharge stops constantly can be the moment of the first super-capacitor module self-discharge to under-voltage condition, and the moment of under-voltage condition can be the first super capacitor mould and begins self-discharge just to moment of under-voltage condition from the initial moment of self-discharge.Wherein, the record initial moment of self-discharge specifically can realize by following steps:
Step 3021, in the process of the first super-capacitor module self-discharge of above-mentioned steps 301, obtain first super-capacitor module that sends from voltage comparator begins self-discharge from the initial moment of self-discharge self-discharge voltage status information in real time;
Step 3022 and according to self-discharge voltage status information detects first super-capacitor module in real time and whether is in under-voltage condition, if then writing down the moment that first super-capacitor module just arrives under-voltage condition is that self-discharge stops constantly.
Step 303, further, carry out the difference computing according to the initial moment of self-discharge that self-discharge that step 301 write down stops constantly and step 302 is write down, just can obtain the self-discharge time of first super-capacitor module from overvoltage condition self-discharge to under-voltage condition.
Step 304, because normal super capacitor self-discharge needs a period of time, if the self-discharge time is too short, then super capacitor may be in invalid state, and therefore the inefficacy of first super-capacitor module can be weighed by the self-discharge time of first super-capacitor module.Particularly, when the generation power down of SSD place system, and the self-discharge time of judging first super-capacitor module is less than preset value, illustrate that first super-capacitor module is in invalid state and can't SSD be powered as standby power supply, in order to guarantee not lost of data, send this moment the second super-capacitor module discharge information to charge-discharge circuit connecting the second super-capacitor module discharge loop, be the SSD power supply by the second standby super-capacitor module.
Further, when the generation power down of SSD place system, be not less than preset value if judge the self-discharge time, then first super-capacitor module did not lose efficacy, and acquiescence sends the first super-capacitor module discharge information, to connect the first super-capacitor module discharge loop, be the SSD power supply by first super-capacitor module.
The power-off protection of solid state disk method that present embodiment provided; at in the prior art power-off protection of solid state disk device and method only with one group of super-capacitor module as SSD power down standby power supply; and super-capacitor module was not lost efficacy and detected; in case and cause SSD place system generation powered-off fault phenomenon; data still can not get effective preservation among its Cache; cause the technical matters of loss of data; when the technical scheme of present embodiment passes through to judge that the self-discharge time is less than preset value; discerning first super-capacitor module lost efficacy; and send the second super-capacitor module discharge information; to connect the second super-capacitor module discharge loop; by second super-capacitor module is the technical scheme of solid state hard disc power supply; utilization detects the state of first super-capacitor module; and adopt the design of the power down protection power supply that first super-capacitor module and second super-capacitor module form with redundancy properties, realized when SSD place system generation powered-off fault phenomenon, improving the purpose of SSD place system data security.
Fig. 4 is the structural representation of embodiment of the invention power-off protection of solid state disk device.As shown in Figure 4, the power-off protection of solid state disk device of present embodiment comprises acquisition module 401 and handover module 402.Wherein, acquisition module 401 obtains the self-discharge time of first super-capacitor module; Handover module 402 was used for when self-discharge time during less than preset value, send the second super-capacitor module discharge information to charge-discharge circuit to connect the second super-capacitor module discharge loop, be the solid state hard disc power supply by second super-capacitor module.
Further, Fig. 5 is the structural representation of acquisition module in the embodiment of the invention power-off protection of solid state disk device, as shown in Figure 5, acquisition module 401 among Fig. 4 also comprises first record cell 501, second record cell 502 and acquiring unit 503, wherein, the 501 record initial moment of self-discharge of first record cell, the initial moment of self-discharge is that first super-capacitor module is in overvoltage condition, and initial moment of all disconnecting of the first super-capacitor module charge circuit and the first super-capacitor module discharge loop; The 502 record self-discharges of second record cell stop constantly, and it is the moment of the first super-capacitor module self-discharge to under-voltage condition that self-discharge stops constantly; Acquiring unit 503 is connected to first record cell 501 and second record cell 502, stop constantly and the difference in the initial moment of self-discharge according to self-discharge, obtain the self-discharge time of first super-capacitor module from overvoltage condition self-discharge to under-voltage condition.Again further, first record cell 501 comprises that first obtains subelement 5011, judgment sub-unit 5012, first and handle subelement 5013, second and obtain the subelement 5014 and the first detection record subelement 5015, wherein first obtains the starting potential status information that subelement 5011 obtains first super-capacitor module; Judgment sub-unit 5012 judges according to the starting potential status information whether first super-capacitor module is in overvoltage condition; First handles subelement 5013 is used for when first judgment sub-unit is judged first super-capacitor module and is not in overvoltage condition, and sending the first super-capacitor module charge information to charge-discharge circuit is that first super-capacitor module is charged to connect the first super-capacitor module charge circuit; Second obtains the charging voltage status information that subelement 5014 obtains first super-capacitor module; The first detection record subelement 5015 is according to the charging voltage status information, detect first super-capacitor module in real time and whether be in overvoltage condition, if, then send first super-capacitor module charging disconnection information to charge-discharge circuit disconnecting the first super-capacitor module charge circuit, and to write down the moment that the first super-capacitor module charge circuit disconnects be the initial moment of self-discharge.Again further, first record cell 502 comprises that the 3rd obtains the subelement 5021 and the second detection record subelement 5022, wherein, the 3rd obtain subelement 5021 and obtain first super-capacitor module begins self-discharge from the initial moment of self-discharge self-discharge voltage status information; The second detection record subelement 5022 detects first super-capacitor module in real time and whether is in under-voltage condition according to self-discharge voltage status information, if then be recorded as self-discharge and stop constantly.
Here it should be noted that the power-off protection of solid state disk device in this enforcement, does not repeat them here as described in specifically describing among the above-mentioned power-off protection of solid state disk method embodiment the concrete grammar of power-off protection of solid state disk.
The power-off protection of solid state disk method that present embodiment provided; at in the prior art power-off protection of solid state disk device and method only with one group of super-capacitor module as SSD power down standby power supply; and super-capacitor module was not lost efficacy and detected; in case and cause SSD place system generation powered-off fault phenomenon; data still can not get effective preservation among its Cache; cause the technical matters of loss of data; the technical scheme of present embodiment is judged when self-discharge time during less than preset value by utilizing handover module; send the second super-capacitor module discharge information to charge-discharge circuit to connect the second super-capacitor module discharge loop; by second super-capacitor module is the technical scheme of solid state hard disc power supply; utilization detects the state of first super-capacitor module; and adopt the design of the power down protection power supply that first super-capacitor module and second super-capacitor module form with redundancy properties, realized when SSD place system generation powered-off fault phenomenon, improving the purpose of SSD place system data security.
Fig. 6 is the structural representation of embodiment of the invention power-off protection of solid state disk system.As shown in Figure 6, the power-off protection of solid state disk system that present embodiment provided comprises power down protection power supply 601, voltage comparator 602, charge-discharge circuit 603 and controller 604.
Power down protection power supply 601 can comprise two super-capacitor module, particularly, power down protection power supply 601 comprises first super-capacitor module 6011 and second super-capacitor module 6012, first super-capacitor module 6011 is connected in voltage comparator 602, as Fig. 7 is shown in the embodiment of the invention first super-capacitor module structural representation, and be shown in the embodiment of the invention second super-capacitor module structural representation as Fig. 8, first super-capacitor module comprises 6011 by super capacitor C1 and resistance R 1, and resistance R 1 is parallel to super capacitor C1, second super-capacitor module 6012 comprises super capacitor C2 and resistance R 2, and resistance R 2 is parallel to super capacitor C2, storage and release electric energy, and send starting potential information, charging voltage information or self-discharge information of voltage;
Voltage comparator 602 is connected in first super-capacitor module 6011, as Fig. 9 is shown in the embodiment of the invention voltage comparator structural representation, comprise voltage comparison unit 1 and voltage comparison unit 2, wherein "+" end of "+" of voltage comparison unit 1 end and voltage comparison unit 2 links to each other as the voltage comparator input end, "-" end of voltage comparison unit 1 connects overvoltage threshold, "-" end of voltage comparison unit 2 connects under-voltage threshold value, voltage comparison unit 1 is as voltage comparator output terminal output overvoltage state, and voltage comparison unit 2 is as voltage comparator output terminal output under-voltage condition; Particularly, starting potential information is inserted the voltage comparator input end, and export the starting potential status information to controller 604 in the back with overvoltage threshold and under-voltage threshold ratio, controller 604 judges whether first super-capacitor module 6011 is in overvoltage condition; Charging voltage information is inserted the voltage comparator input end, and with overvoltage press threshold value and under-voltage threshold ratio back output charging voltage status information to controller 604, controller 604 judges whether first super-capacitor module 6011 is in overvoltage condition or the self-discharge information of voltage is inserted the voltage comparator input end, and back output charging voltage status information is to controller 604 to press threshold value and under-voltage threshold ratio with overvoltage, and controller 604 judges whether first super-capacitor module 6011 is in under-voltage condition;
Charge-discharge circuit 603, be connected in first super-capacitor module 6011 and second super-capacitor module 6012, as Figure 10 is shown in the embodiment of the invention charge-discharge circuit structural representation, comprise the first super-capacitor module charge circuit and the first super-capacitor module discharge loop, the second super-capacitor module charge circuit and the second super-capacitor module discharge loop, and first K switch 1, second switch K2, the 3rd K switch 3 and the 4th K switch 4, the first super-capacitor module charge circuit and the second super-capacitor module charge circuit, one end are connected in charge power supply, and the first super-capacitor module discharge loop and the second super-capacitor module discharge loop, one end are connected in discharge power supply; The other end of the first super-capacitor module charge circuit is connected in first super-capacitor module 6011 by first K switch 1, is used to 6011 chargings of first super-capacitor module; The other end of the first super-capacitor module discharge loop is connected in first super-capacitor module 6011 by second switch K2, is used to 6011 discharges of first super-capacitor module; The other end of the second super-capacitor module charge circuit is connected in second super-capacitor module 6012 by the 3rd K switch 3, is used to 6012 chargings of second super-capacitor module; The other end of the second super-capacitor module discharge loop is connected in second super-capacitor module 6012 by the 4th K switch 4, is used to 6012 discharges of second super-capacitor module;
Controller 604 is connected in first K switch 1, second switch K2, the 3rd K switch 3 and the 4th K switch 4 of voltage comparator 602 and charge-discharge circuit 603, and is connected in first super-capacitor module 6011 by voltage comparator 602; When voltage comparator 602 according to the starting potential status information, when judging first super-capacitor module and not being in overvoltage condition, send the first super-capacitor module charge information, closed first K switch 1 is to connect the first super-capacitor module charge circuit; When voltage comparator 602 according to the charging voltage status information, when judging first super-capacitor module and being in overvoltage condition, send first super-capacitor module charging disconnection information, open first K switch 1, disconnecting the first super-capacitor module charge circuit, and record is the initial moment of self-discharge this moment; When voltage comparator 602 according to self-discharge voltage status information, when judging first super-capacitor module 6011 and being in under-voltage condition, record self-discharge stops constantly; Stop constantly and the difference in the initial moment of self-discharge according to the self-discharge of being write down, obtain the self-discharge time of first super-capacitor module 6011 from overvoltage condition self-discharge to under-voltage condition; When self-discharge time during whether less than preset value, then discern first super-capacitor module 6011 and lost efficacy, and closed the 4th K switch 4, to connect the second super-capacitor module discharge loop, power for solid state hard disc by second super-capacitor module 6012.
Here it should be noted that; power-off protection of solid state disk system in this enforcement can comprise each module, unit and the subelement in the above-mentioned power-off protection of solid state disk device; and to the concrete grammar of power-off protection of solid state disk as described in specifically describing among the above-mentioned power-off protection of solid state disk method embodiment, do not repeat them here.
The power-off protection of solid state disk system that present embodiment provided; at in the prior art power-off protection of solid state disk device and method only with one group of super-capacitor module as SSD power down standby power supply; and super-capacitor module was not lost efficacy and detected; in case and cause SSD place system generation powered-off fault phenomenon; data still can not get effective preservation among its Cache; cause the technical matters of loss of data; when the technical scheme of the embodiment of the invention judges that by controller the self-discharge time is less than preset value; discerning first super-capacitor module lost efficacy; and send the second super-capacitor module discharge information; to connect the second super-capacitor module discharge loop; by second super-capacitor module is the technical scheme of solid state hard disc power supply; utilize controller that the state of first super-capacitor module is detected; and adopt the design of the power down protection power supply that first super-capacitor module and second super-capacitor module are formed in the power down protection power supply with redundancy properties, realized when SSD place system generation powered-off fault phenomenon, improving the purpose of SSD place system data security.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM (read-only memory) (ROM), random access device (RAM), magnetic disc or CD.
It should be noted that at last: above embodiment only in order to the explanation embodiment of the invention technical scheme but not limit it, although the embodiment of the invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that: it still can make amendment or be equal to replacement the technical scheme of the embodiment of the invention, and these modifications or be equal to replacement and also can not make amended technical scheme break away from the spirit and scope of embodiment of the invention technical scheme.