CN108984330A - A kind of method, apparatus and electronic equipment of control storage equipment - Google Patents
A kind of method, apparatus and electronic equipment of control storage equipment Download PDFInfo
- Publication number
- CN108984330A CN108984330A CN201810548319.6A CN201810548319A CN108984330A CN 108984330 A CN108984330 A CN 108984330A CN 201810548319 A CN201810548319 A CN 201810548319A CN 108984330 A CN108984330 A CN 108984330A
- Authority
- CN
- China
- Prior art keywords
- power
- power consumption
- storage device
- storage equipment
- abnormal
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000002159 abnormal effect Effects 0.000 claims abstract description 118
- 230000009467 reduction Effects 0.000 claims description 9
- 230000007423 decrease Effects 0.000 abstract description 2
- 230000005611 electricity Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000001514 detection method Methods 0.000 description 2
- 230000032683 aging Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0727—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The present embodiments relate to storage equipment technical fields, disclose the method, apparatus and electronic equipment of a kind of control storage equipment.Wherein, which comprises when resetting to storage equipment starting, determine whether the storage equipment meets abnormal power-up conditions;If satisfied, reducing the power consumption level of the storage equipment;The storage equipment is set to execute power on operation by the power consumption level after decline;If not satisfied, the storage equipment is made to execute power on operation by preset power consumption condition.In the above manner, the embodiment of the present invention it is possible to prevente effectively from because electricity shortage and caused by storage equipment lasts for reset, influence store equipment normal use the case where.
Description
Technical Field
The embodiment of the invention relates to the technical field of storage equipment, in particular to a method and a device for controlling the storage equipment and electronic equipment.
Background
The storage device includes a USB flash disk (USB flash disk), an SSD, an emmc, an EMCP, a ufs, an SD card, and the like, and is widely applied to various products, such as electronic products, such as computers and mobile phones. With the functions of electronic products becoming more and more rich, the capacity of storage devices becomes larger and larger, and the power consumption of the devices also becomes higher and higher, while the storage devices usually cannot be self-provided with power supplies and are powered by hosts connected with the storage devices.
In the process of implementing the invention, the inventor of the invention finds that: in the correlation technique, when the host computer the power supply is not enough, can't satisfy storage device's demand voltage, storage device will reset, and along with the increase of host computer's service life, equipment can appear ageing, and the host computer can appear continuously the condition of power supply not enough easily, but storage device's demand voltage is fixed at present, under this condition, can cause storage device constantly to reset unable work, and is serious, still can cause the damage to storage device.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for controlling a storage device, and an electronic device, which can effectively avoid a situation that the normal use of the storage device is affected due to continuous reset of the storage device caused by insufficient power supply.
The embodiment of the invention discloses the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for controlling a storage device, where the method includes: when resetting is started on the storage equipment, determining whether the storage equipment meets an abnormal power-on condition; if so, reducing the power consumption level of the storage equipment; enabling the storage device to execute power-on operation according to the reduced power consumption level; and if not, enabling the storage equipment to execute power-on operation according to a preset power consumption condition.
Optionally, the determining whether the storage device meets an abnormal power-on condition includes: judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero; if yes, an abnormal power-on condition is met; if not, the abnormal power-on condition is not met.
Optionally, the method further comprises: before the storage equipment executes the power-on operation, the power-on state of the storage equipment is marked as being powered on; when the storage equipment is successfully electrified, marking the power-on state as power-on completion, and clearing the latest continuous abnormal power-on times; before the step of determining whether the storage equipment meets the abnormal power-on condition, the method also comprises the steps of judging whether the power-on state of the storage equipment is in power-on or is finished; if the power-on state is in power-on, increasing the latest continuous abnormal power-on times by a preset value, and entering the step of judging whether the latest continuous abnormal power-on times of the storage device is greater than or equal to a preset threshold value; and if the power-on state is the power-on completion, directly entering the step of enabling the storage device to execute the power-on operation according to the preset power consumption condition.
Optionally, the causing the storage device to perform the power-on operation according to the reduced power consumption level includes acquiring a maximum power consumption value in the reduced power consumption level; and enabling the storage equipment to execute power-on operation according to the maximum power consumption value.
Optionally, the method further comprises: when the storage equipment is determined to meet the abnormal power-on condition, judging whether the current power consumption level of the storage equipment is the lowest level; if not, entering the step of reducing the power consumption level of the storage equipment; if yes, an alarm signal is output.
Optionally, the preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
In a second aspect, an embodiment of the present invention provides an apparatus for controlling a storage device, where the apparatus includes: the abnormal power-on judging module is used for determining whether the storage equipment meets the abnormal power-on condition when the storage equipment is reset; a power consumption level reduction module for reducing the power consumption level of the storage device if the power consumption level is met; a power consumption reduction power-on module, configured to enable the storage device to perform a power-on operation according to the reduced power consumption level: and the preset power consumption electrifying module is used for enabling the storage equipment to execute electrifying operation according to the preset power consumption condition if the preset power consumption condition is not met.
Optionally, the abnormal power-on determining module is specifically configured to: judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero; if yes, an abnormal power-on condition is met; if not, the abnormal power-on condition is not met.
Optionally, the apparatus further comprises: the power-on marking module is used for marking the power-on state of the storage equipment as power-on before the storage equipment executes the power-on operation; a power-on completion marking module, configured to mark the power-on state as power-on completion and clear the latest consecutive abnormal power-on times when the storage device is successfully powered on; before the abnormal power-on judging module, the device also comprises a power-on state judging module, a power-on state judging module and a power-on state judging module, wherein the power-on state judging module is used for judging whether the power-on state of the storage equipment is in power-on or is finished; an abnormal power-on counting module, configured to increase the latest continuous abnormal power-on frequency by a preset value if the power-on state is in a power-on state, and perform the step of determining whether the latest continuous abnormal power-on frequency of the storage device is greater than or equal to a preset threshold; and the power-on completion module is used for directly entering the preset power consumption power-on module if the power-on state is power-on completion.
Optionally, the power-down power-up module includes an obtaining unit, configured to obtain a maximum power consumption value in the power consumption level after the power consumption level is decreased; and the execution unit is used for enabling the storage equipment to execute power-on operation according to the maximum power consumption value.
Optionally, the apparatus further comprises: the power consumption level judging module is used for judging whether the current power consumption level of the storage equipment is the lowest level or not when the storage equipment is determined to meet the abnormal power-on condition; entering a power consumption level reduction module, and if not, entering the step of reducing the power consumption level of the storage device; and the alarm module is used for outputting an alarm signal if the alarm signal is positive.
Optionally, the preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
In a fourth aspect, an embodiment of the present invention provides a system for controlling a storage device, including: a storage device and an electronic device as described above, the electronic device being connected to the storage device.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform a method of controlling a storage device as described above.
In a sixth aspect, the present invention also provides a non-transitory computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions for causing a computer to execute the method for controlling a storage device as described above.
In the embodiment of the invention, when the storage device is reset, whether the storage device meets the abnormal power-on condition or not is judged, if yes, the power consumption level of the storage device is reduced, since the memory device is abnormally reset when the supply voltage to the memory device does not match the required voltage of the memory device, and the abnormal power-on condition is used to reflect an abnormal reset of the memory device, so that, when the memory device is reset, whether the memory device is abnormally reset may be determined by an abnormal power-on condition, and when the memory device is abnormally reset, the power consumption level of the memory device is reduced, therefore, the required voltage of the storage device is reduced, the supply voltage of the host is matched with the required voltage of the storage device, the required voltage of the storage device and the supply voltage of the host reach new balance, and the problem that the normal use of the storage device is influenced due to continuous resetting of the storage device caused by insufficient power supply is effectively avoided.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic structural diagram of a memory system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a memory device of the memory system of FIG. 1;
FIG. 3 is a flowchart illustrating a method for controlling a storage device according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for controlling a storage device according to another embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for controlling a storage device according to another embodiment of the present invention;
FIG. 6 is a functional block diagram of an apparatus for controlling a storage device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a memory system according to an embodiment of the invention. The storage system 1 includes a storage device 10 and a host 11.
The host 11 is connected to the storage device 10, and the host 11 may store data in the storage device, read data from the storage device, or edit data in the storage device. In addition, the host 11 also supplies power to the storage device 10, i.e., the power for the storage device 10 is sourced from the host 11. Of course, in some embodiments, the storage device 10 may also be self-contained, but as the service life of the storage device 10 increases, the self-contained power supply of the storage device 10 may be unstable and power supply may decrease.
In some embodiments, the storage device 10 may be embodied as a device such as a USB flash disk (USB flash disk), an SSD, an emmc, an EMCP, a ufs, and an SD card, as shown in fig. 2, the storage device 10 includes two parts, namely a storage controller 11 and a storage medium 12, and the storage controller 11 and the storage medium 12 are electrically connected. The functions of the memory controller 11 may be implemented by a control chip, for example: and a single chip microcomputer. The function of the storage medium 12 may be specifically realized by a memory chip, the memory chip may be a flash chip, and the flash type chip may be specifically a NAND flash chip or the like.
When the memory device 10 fails, the memory controller 11 performs a reset operation to attempt recovery so as to operate from a preset state. The reset operation may be divided into an internal reset and an external event reset, wherein the external event reset includes a power-on reset, a RES reset, and a low voltage reset. The power-on reset and the RES reset are artificial normal power-on reset and are realized by an external connection reset circuit; the low voltage reset is an automatic reset of the memory controller 11, and may be implemented by connecting a voltage detection chip to the RES pin of the memory controller 11.
When the power supply voltage of the storage device 10 is lower than the required voltage of the storage device 10, the storage controller 11 performs a reset operation, after the storage device 10 is reset, because the power supply voltage of the storage device 10 is still lower than the required voltage of the storage device 10, the storage device 10 may not normally operate, and the storage device 10 is reset again, so that the storage device 10 is continuously reset and cannot normally operate, in order to avoid a situation that the storage device 10 is continuously reset due to insufficient power supply, in the embodiment of the present invention, a plurality of power consumption levels are first divided for the storage device 10, each power consumption level includes a predetermined power consumption range, a power consumption value determines the required voltage of the storage device 10, and the higher the power consumption value is, the higher the required voltage is, for example: the storage device 10 is divided into two power consumption levels, namely a power consumption level 1 and a power consumption level 2, wherein the power consumption level 1 comprises a power consumption value A, a power consumption value B and a power consumption value C, and the power consumption value A, the power consumption value B and the power consumption value C respectively correspond to a required voltage 5V, a required voltage 4V and a required voltage 3V.
It is worth mentioning that: the invention is not particularly limited to the implementation of different power consumption levels of the memory device, for example: by turning on different functional implementations of the memory controller 11, etc.
Example 1:
referring to fig. 3, fig. 3 is a flowchart illustrating a method for controlling a storage device according to an embodiment of the present invention, where the method is applied to the storage device described above, and the method for controlling the storage device includes:
210. when the storage device is reset, it is determined whether the storage device meets the abnormal power-on condition, if yes, step 220 is executed, and if not, step 240 is executed.
The "resetting the storage device" may include power-on reset, RES reset, low-voltage reset, and the like, where the power-on reset and the RES reset are artificial normal power-on resets and are implemented by an external connection reset circuit; the low-voltage reset is an automatic reset of the storage device and can be realized by connecting a voltage detection chip with an RES pin of the storage device.
It should be noted that: initiating a reset on a storage device refers to powering the storage device back up, but the storage device does not enter a reset phase.
The abnormal power-on condition is used to determine whether the storage device was previously caused by an abnormal reset, and in some embodiments, determining whether the storage device satisfies the abnormal power-on condition includes: judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero; if yes, the abnormal power-on condition is met, and if not, the abnormal power-on condition is not met. Of course, determining whether the storage device satisfies the abnormal power-on condition is not limited to the method described above.
The last continuous abnormal power-on times are recorded last continuous abnormal power-on times, and when the power supply is insufficient, the storage device can continuously generate abnormal power-on, so that the continuous reset condition caused by the fact that the power supply is not matched with the required voltage of the storage device (namely, the power supply is insufficient) can be well identified through the last continuous abnormal power-on times. The method for calculating the number of the latest continuous abnormal power-on times specifically comprises the following steps: if the memory device is powered on abnormally once, the number of the latest continuous abnormal power-on times is added with a preset value, and in some embodiments, the preset value may be 1, so that when the memory device is powered on abnormally for 5 times continuously, the latest continuous abnormal power-on times of the memory device is 5.
The "preset threshold" is a preset threshold, which is a natural number greater than zero, and may be set by a user or freely set by the system, for example: if the preset threshold is 10, if the last continuous abnormal power-on frequency of the obtained storage device is 5, that is, the last continuous abnormal power-on frequency is less than the preset threshold, the abnormal power-on condition is not met; if the last continuous abnormal power-on frequency acquired by the storage device is 10, namely the last continuous abnormal power-on frequency is equal to a preset threshold, the abnormal power-on condition is met.
220. If so, reducing the power consumption level of the storage equipment;
the power consumption levels are pre-divided for the storage devices, and different power consumption levels correspond to different power consumption ranges, wherein the power consumption levels can be 2, 3, 4 and the like, and can be freely set according to actual needs. When the storage device meets the abnormal power-on condition, reducing the power consumption level of the storage device, for example: assuming that the power consumption level of the storage device is divided into A and B, wherein A > B, the current power consumption level of the storage device is A, and when the storage device is determined to meet the abnormal power-on condition previously, the power consumption level of the storage device is reduced to B.
230. Enabling the storage device to execute power-on operation according to the reduced power consumption level;
after the power consumption level of the storage device is reduced, the storage device executes the power-on operation according to the reduced power consumption level to enter a reset stage, and as the power consumption level of the storage device is reduced, the required voltage of the storage device is reduced, so that the storage device is suitable for power supply, and the storage device reset caused by insufficient power supply can be well avoided.
In some embodiments, in order to ensure that the storage device stably operates in the set power consumption level, when the storage device is powered on, the storage device may be powered on at a maximum power consumption value in the power consumption level, and then step 230 may be specifically: and acquiring the maximum power consumption value in the reduced power consumption level, and enabling the storage equipment to execute power-on operation according to the maximum power consumption value.
The power consumption value of the storage device in the actual operation process is changed to some extent, but the maximum power consumption value of the storage device in the actual operation process does not exceed the maximum value of the set power consumption level. And each power consumption level corresponds to a power consumption range, and the maximum power consumption value is the maximum value of the power consumption range corresponding to the power consumption level, so that when the storage device is powered on at the maximum value of the power consumption level and is successfully powered on, the voltage supplied by the power supply device can meet the required voltage of the storage device in the actual operation process of the storage device, and the condition of insufficient power supply cannot occur in the operation process unless the power supply is changed. When the storage device is powered on at the maximum value of the power consumption level and is not successfully powered on, the power consumption level needs to be further reduced to ensure that the storage device can stably work in the corresponding power consumption level.
240. And if not, enabling the storage equipment to execute power-on operation according to a preset power consumption condition.
The "preset power consumption condition" is a preset power consumption condition, and in some embodiments, the preset power consumption condition is a maximum power consumption value in a maximum power consumption level. For example: assuming that the power consumption level of the memory device is A, B, C, and a > B > C, the current power consumption level of the memory device is a, when it is determined that the memory device previously does not satisfy the abnormal power-on condition, i.e., the memory device previously is normally powered on, the memory device performs the power-on operation according to the maximum power consumption value of the maximum power consumption level a.
In the embodiment of the invention, when the storage device is reset, whether the storage device meets the abnormal power-on condition or not is judged, if yes, the power consumption level of the storage device is reduced, since the memory device is abnormally reset when the supply voltage to the memory device does not match the required voltage of the memory device, and the abnormal power-on condition is used to reflect an abnormal reset of the memory device, so that, when the memory device is reset, whether the memory device is abnormally reset may be determined by an abnormal power-on condition, and when the memory device is abnormally reset, the power consumption level of the memory device is reduced, therefore, the required voltage of the storage device is reduced, the supply voltage of the host is matched with the required voltage of the storage device, the required voltage of the storage device and the supply voltage of the host reach new balance, and the problem that the normal use of the storage device is influenced due to continuous resetting of the storage device caused by insufficient power supply is effectively avoided.
Example 2:
referring to fig. 4, fig. 4 is a schematic flowchart illustrating a method for controlling a storage device according to another embodiment of the present invention, where the method for controlling the storage device includes:
310. when the storage device is reset, judging whether the latest continuous abnormal power-on times of the storage device is greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero.
320. If the number of the latest continuous abnormal power-on times is larger than or equal to a preset threshold, judging whether the current power consumption level of the storage equipment is the lowest level;
330. if the power consumption level is not the lowest level, reducing the power consumption level of the storage device, and enabling the storage device to execute power-on operation according to the reduced power consumption level;
340. and if the level is the lowest level, outputting an alarm signal.
When the power consumption level of the storage device is the lowest level, the power consumption level of the storage device cannot be reduced, and at the moment, a user can be reminded that the power supply of the current host cannot meet the requirement and needs to be replaced through a prompt alarm signal. Of course, in other embodiments, after the power consumption is reduced to the minimum power consumption level, a method for reducing the power consumption value in the minimum power consumption level may also be collected, specifically: and when the power consumption value is reduced in the lowest power consumption level, the storage equipment is powered on again, if the power on is successful, the storage equipment is operated according to the corresponding power consumption value as the maximum upper limit value, if the power on is not successful, the power consumption value is continuously reduced, then the power on is carried out, and the operation is circulated. And when the storage equipment has no way to be successfully powered on at the lowest power consumption value of the lowest power consumption level, prompting an alarm signal.
In some embodiments, the alert signal may be a sound signal, a prompt message, or the like.
350. And if the latest continuous abnormal power-on times are less than the preset threshold value, the storage equipment executes the power-on operation according to the preset power consumption condition.
In this embodiment, when it is determined that the storage device previously satisfies the abnormal power-on condition, before the power consumption level of the storage device is reduced, it is determined whether the current power consumption level of the storage device is the lowest level, and if the current power consumption level of the storage device is not the lowest level, the power consumption level of the storage device is reduced; and if the current power consumption level of the storage equipment is the lowest level, not reducing the power consumption level of the storage equipment, and outputting an alarm signal to remind a user.
Example 3:
referring to fig. 5, fig. 5 is a schematic flowchart illustrating a method for controlling a storage device according to another embodiment of the present invention, where the method for controlling the storage device includes:
410: starting reset to the storage device;
420: judging whether the power-on state of the storage device is power-on or power-on completion, if so, executing step 430, and if so, executing step 460;
430: increasing the number of the latest continuous abnormal power-on times by a preset value;
440: judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value or not; if yes, go to step 450; if not, go to step 460;
450: reducing the power consumption level of the storage device;
460: when the storage equipment is in power-on operation before the storage equipment is powered on, marking the power-on state of the storage equipment as power-on; it should be noted that: the specific location of step 460 is not limited to the location described in the drawings, and only after step 420, before steps 470 and 480.
470: the storage equipment executes power-on operation according to the reduced power consumption level;
480: enabling the storage equipment to execute power-on operation according to a preset power consumption condition;
490: when the storage equipment is successfully powered on, the power-on state is marked as power-on completion, and the latest continuous abnormal power-on times are cleared.
"power-on" indicates a state when the memory device is performing a power-on operation without completing the power-on. When the storage equipment is powered on, if the power supply is insufficient and the required voltage of the storage equipment cannot be met, the storage equipment can automatically enter the reset state, but the power-on state is not changed and still powered on; if the power supply is sufficient and the required voltage of the storage device is met, the storage device can complete the whole power-on process, and the power-on state is changed into the power-on completion state, so that the abnormal reset or the normal reset can be judged according to the power-on state of the storage device in the reset process, and whether the latest continuous abnormal power-on times are increased or not is determined according to the power-on state. In addition, when the storage device is successfully powered on, the latest continuous abnormal power-on times are cleared, so that the latest continuous abnormal power-on times are not recorded in the non-continuous abnormal voltage.
In the embodiment, a power-on state is introduced, and whether the reset is a normal reset or an abnormal reset is judged according to the power-on state, so as to determine whether to increase the latest continuous abnormal power-on times.
It can be understood that: the method for recording the number of the latest continuous abnormal power-on times is not limited to the above-described method, as long as the number of the latest continuous abnormal power-on times can be recorded.
Example 5:
referring to fig. 6, fig. 6 is a schematic diagram of functional modules of an apparatus for controlling a storage device according to an embodiment of the present invention, which is applied to the storage device. The apparatus 500 for controlling a storage device includes an abnormal power-up determining module 510, a power consumption level reducing module 520, a power consumption reducing power-up module 530, and a preset power consumption power-up module 540.
In this embodiment, the abnormal power-up determining module 510 is respectively connected to the power consumption level reducing module 520 and the preset power consumption power-up module 540, and the power consumption level reducing module 520 is connected to the power consumption level reducing power-up module 530. The abnormal power-on judging module 510 is configured to determine whether the storage device meets an abnormal power-on condition when the storage device is reset; a power consumption reduction level module 520 for reducing the power consumption level of the storage device if satisfied; the power consumption reduction powering-on module 530 is configured to enable the storage device to perform a powering-on operation according to the reduced power consumption level; the preset power consumption power-on module 540 is configured to, if the preset power consumption level is not met, enable the storage device to perform a power-on operation according to a preset power consumption condition, where the preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
In some embodiments, the reduced power consumption power up module 520 includes an acquisition unit 521 and an execution unit 522. The obtaining unit 521 is configured to obtain a maximum power consumption value in the lowered power consumption level; the execution unit 522 is configured to enable the storage device to perform a power-on operation according to the maximum power consumption value.
When the storage device is reset, whether the storage device is abnormally reset or not is determined through the abnormal power-on condition, and when the storage device is abnormally reset, the power consumption level of the storage device is reduced, so that the required voltage of the storage device is reduced, the power supply voltage of the host is matched with the required voltage of the storage device, the required voltage of the storage device and the power supply voltage of the host reach a new balance, and the problem that the storage device is continuously reset due to insufficient power supply to influence the normal use of the storage device is effectively avoided.
In some embodiments, the abnormal power-on condition may be that the number of consecutive abnormal power-on times is greater than or equal to a preset threshold, where the abnormal power-on determining module 510 is specifically configured to: judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero; if yes, an abnormal power-on condition is met; if not, the abnormal power-on condition is not met. The continuous abnormal power-on frequency may be obtained by performing identification calculation on the power-on state, specifically, the apparatus 500 may further include: a power-on flag module 550, a power-on completion flag module 560, a power-on status determination module 570, an abnormal power-on count module 580, and a power-on completion module 590.
The power-on marking module 550 is configured to mark a power-on state of the storage device as power-on before the storage device performs a power-on operation; the power-on completion marking module 560 is configured to mark the power-on state as power-on completion and clear the latest consecutive abnormal power-on times when the storage device is successfully powered on.
Before the abnormal power-on judging module 510, the power-on state judging module 570 is used for judging whether the power-on state of the storage device is in power-on or power-on completion. The abnormal power-on counting module 580 is configured to, if the power-on state is in power-on, increase the latest consecutive abnormal power-on number by a preset value, and enter the step of determining whether the latest consecutive abnormal power-on number of the storage device is greater than or equal to a preset threshold. The power-up completion module 590 is configured to directly enter the preset power consumption power-up module 540 if the power-up state is power-up completion.
Further, the apparatus 500 may further include a power consumption level determination module 511, an entry power consumption reduction level module 512, and an alarm module 513. The power consumption level determining module 511 is configured to determine whether the current power consumption level of the storage device is the lowest level when it is determined that the storage device meets the abnormal power-on condition; entering a power consumption level reduction module 512 for entering the step of reducing the power consumption level of the storage device if not; the alarm module 513 is configured to output an alarm signal if the determination result is positive.
It should be noted that, as the contents of information interaction, execution process, and the like between the modules in the apparatus for controlling a storage device in the embodiment of the present invention are based on the same concept as the method embodiment of the present invention, the specific contents are also applicable to the apparatus for controlling a storage device. The respective modules in the embodiments of the present invention can be implemented as separate hardware or software, and the combination of the functions of the respective units can be implemented using separate hardware or software as necessary. For technical details that are not described in detail in the embodiment of the apparatus 300 for controlling a memory device, reference may be made to the methods for controlling a memory device provided in embodiments 1, 2, and 3 of the present invention.
In the embodiment of the present invention, the apparatus 500 determines whether the storage device previously satisfies the abnormal power-on condition through the abnormal power-on determining module 510, reduces the power consumption level of the storage device when the storage device previously satisfies the abnormal power-on condition, reduces the power consumption level of the storage device according to the reduced power consumption level through the reduced power consumption power-on module 530, causes the storage device to perform the power-on operation according to the preset power consumption condition through the preset power consumption power-on module 540 when the storage device previously does not satisfy the abnormal power-on condition, determines whether the storage device is abnormally reset through the abnormal power-on condition when the storage device is reset, reduces the power consumption level of the storage device when the storage device is abnormally reset, thereby reducing the required voltage of the storage device so that the supply voltage of the host matches the required voltage of the storage device, and the required voltage of the storage device and the supply voltage of the host reach a, the problem that the normal use of the storage device is influenced due to the fact that the storage device is continuously reset due to insufficient power supply is effectively avoided.
Example 6:
as shown in fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device may be a stand-alone electronic device, or may be integrated into a module or unit in the memory controller 11 shown in fig. 2. The electronic device 600 includes: one or more processors 601 and a memory 602, one processor 601 being illustrated in fig. 7.
The processor 601 and the memory 602 may be connected by a bus or other means, such as the bus connection shown in fig. 7.
The memory 602, serving as a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the software upgrading method in the embodiment of the present invention (for example, the abnormal power-up determining module 510, the power consumption level reducing module 520, the power consumption reducing power-up module 530, the preset power consumption power-up module 540, and the like shown in fig. 6). The processor 601 executes various functional applications and data processing of the electronic device, i.e. implements the method of controlling a storage device of the method embodiment, by running non-volatile software programs, instructions and units stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 602 optionally includes memory located remotely from the processor 601, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory 602, and when executed by the one or more processors 601, perform the method and apparatus for controlling a storage device of embodiments 1 to 5.
The electronic device can execute the method and the device for controlling the storage device in any method embodiment 1 to embodiment 5, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiments of the electronic device, reference may be made to methods and apparatuses for controlling a storage device in embodiments 1 to 5.
Embodiments of the present invention provide a computer program product including a computer program stored on a non-volatile computer-readable storage medium, the computer program including program instructions that, when executed by an electronic device, cause the electronic device to perform the method and apparatus for controlling a storage device of embodiments 1 to 5. For example, the above-described method steps 210 through 240 in fig. 3 are performed to implement the functionality of the modules 510-540 in fig. 6.
An embodiment of the present invention provides a non-volatile computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to enable an electronic device to execute the method and apparatus for controlling a storage device in embodiments 1 to 5.
The electronic device of the embodiment of the application can exist in various forms, including but not limited to a smart phone, a computer, a smart watch, a smart bracelet, a tablet computer, a palm computer and other electronic devices with a storage function.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes in the methods for implementing the embodiments may be implemented by hardware associated with computer program instructions, and the programs may be stored in a computer readable storage medium, and when executed, may include processes of the embodiments of the methods as described. The storage medium may be a magnetic disk, an optical disk, a Read-only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (13)
1. A method of controlling a storage device, comprising:
when resetting is started on the storage equipment, determining whether the storage equipment meets an abnormal power-on condition;
if so, reducing the power consumption level of the storage equipment;
enabling the storage device to execute power-on operation according to the reduced power consumption level;
and if not, enabling the storage equipment to execute power-on operation according to a preset power consumption condition.
2. The method of claim 1, wherein determining whether the storage device satisfies an abnormal power-up condition comprises:
judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero;
if yes, an abnormal power-on condition is met;
if not, the abnormal power-on condition is not met.
3. The method of claim 2, further comprising:
before the storage equipment executes the power-on operation, the power-on state of the storage equipment is marked as being powered on;
when the storage equipment is successfully electrified, marking the power-on state as power-on completion, and clearing the latest continuous abnormal power-on times;
prior to the step of determining whether the storage device satisfies an abnormal power-on condition, the method further comprises:
judging whether the power-on state of the storage equipment is in power-on or is finished;
if the power-on state is in power-on, increasing the latest continuous abnormal power-on times by a preset value, and entering the step of judging whether the latest continuous abnormal power-on times of the storage device is greater than or equal to a preset threshold value;
and if the power-on state is the power-on completion, directly entering the step of enabling the storage device to execute the power-on operation according to the preset power consumption condition.
4. The method according to any one of claims 1 to 3,
the causing the storage device to perform a power-on operation according to the reduced power consumption level includes:
acquiring a maximum power consumption value in the reduced power consumption level;
and enabling the storage equipment to execute power-on operation according to the maximum power consumption value.
5. The method according to any one of claims 1-3, further comprising:
when the storage equipment is determined to meet the abnormal power-on condition, judging whether the current power consumption level of the storage equipment is the lowest level;
if not, entering the step of reducing the power consumption level of the storage equipment;
if yes, an alarm signal is output.
6. The method according to any one of claims 1 to 3,
the preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
7. An apparatus for controlling a storage device, comprising:
the abnormal power-on judging module is used for determining whether the storage equipment meets the abnormal power-on condition when the storage equipment is reset;
a power consumption level reduction module for reducing the power consumption level of the storage device if the power consumption level is met;
the power consumption reducing and electrifying module is used for enabling the storage equipment to execute electrifying operation according to the reduced power consumption level;
and the preset power consumption electrifying module is used for enabling the storage equipment to execute electrifying operation according to the preset power consumption condition if the preset power consumption condition is not met.
8. The apparatus according to claim 7, wherein the abnormal power-up determining module is specifically configured to:
judging whether the latest continuous abnormal power-on times of the storage device are greater than or equal to a preset threshold value, wherein the preset threshold value is a natural number greater than zero;
if yes, an abnormal power-on condition is met;
if not, the abnormal power-on condition is not met.
9. The apparatus of claim 8,
the device further comprises:
the power-on marking module is used for marking the power-on state of the storage equipment as power-on before the storage equipment executes the power-on operation;
a power-on completion marking module, configured to mark the power-on state as power-on completion and clear the latest consecutive abnormal power-on times when the storage device is successfully powered on;
before the abnormal power-on judging module, the apparatus further includes:
the power-on state judgment module is used for judging whether the power-on state of the storage device is in power-on or is finished;
an abnormal power-on counting module, configured to increase the latest continuous abnormal power-on frequency by a preset value if the power-on state is in a power-on state, and perform the step of determining whether the latest continuous abnormal power-on frequency of the storage device is greater than or equal to a preset threshold;
and the power-on completion module is used for directly entering the preset power consumption power-on module if the power-on state is power-on completion.
10. The apparatus of any of claims 7-9, wherein the reduced power consumption power-up module comprises:
an obtaining unit, configured to obtain a maximum power consumption value in the lowered power consumption level;
and the execution unit is used for enabling the storage equipment to execute power-on operation according to the maximum power consumption value.
11. The apparatus according to any one of claims 7-9, further comprising:
the power consumption level judging module is used for judging whether the current power consumption level of the storage equipment is the lowest level or not when the storage equipment is determined to meet the abnormal power-on condition;
entering a power consumption level reduction module, and if not, entering the step of reducing the power consumption level of the storage device;
and the alarm module is used for outputting an alarm signal if the alarm signal is positive.
12. The apparatus according to any one of claims 7 to 9,
and the preset power consumption condition is a maximum power consumption value in the maximum power consumption level.
13. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810548319.6A CN108984330B (en) | 2018-05-31 | 2018-05-31 | Method and device for controlling storage equipment and electronic equipment |
PCT/CN2018/105399 WO2019227769A1 (en) | 2018-05-31 | 2018-09-13 | Method and apparatus for controlling storage device, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810548319.6A CN108984330B (en) | 2018-05-31 | 2018-05-31 | Method and device for controlling storage equipment and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108984330A true CN108984330A (en) | 2018-12-11 |
CN108984330B CN108984330B (en) | 2021-05-11 |
Family
ID=64542854
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810548319.6A Active CN108984330B (en) | 2018-05-31 | 2018-05-31 | Method and device for controlling storage equipment and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108984330B (en) |
WO (1) | WO2019227769A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112578297A (en) * | 2020-11-27 | 2021-03-30 | 浙江威星智能仪表股份有限公司 | Equipment electric quantity state detection method based on communication module working characteristics |
WO2023147727A1 (en) * | 2022-02-07 | 2023-08-10 | 苏州浪潮智能科技有限公司 | Power consumption adjusting method and apparatus, storage device, and non-volatile readable storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01255019A (en) * | 1988-04-04 | 1989-10-11 | Alps Electric Co Ltd | Power source circuit for microcomputer |
JPH06111034A (en) * | 1992-09-28 | 1994-04-22 | Sharp Corp | Microcomputer system |
US20060097679A1 (en) * | 2004-11-06 | 2006-05-11 | Samsung Electronics Co., Ltd. | Method of controlling startup current of motor and disk drive using the method |
CN1833229A (en) * | 2003-08-06 | 2006-09-13 | 松下电器产业株式会社 | Semiconductor memory card, and accessing device and method |
CN101093988A (en) * | 2006-06-20 | 2007-12-26 | 三洋电机株式会社 | Low-voltage detection reset circuit |
CN201152970Y (en) * | 2007-11-13 | 2008-11-19 | 汉能科技有限公司 | Micro-controller reset circuit |
CN201315545Y (en) * | 2008-12-08 | 2009-09-23 | 海信(山东)空调有限公司 | Anti-interference circuit and electric equipment with same |
CN101626159A (en) * | 2009-01-14 | 2010-01-13 | 深圳华为通信技术有限公司 | Method for preventing repeated restart of terminal device and device thereof |
CN101840731A (en) * | 2009-03-12 | 2010-09-22 | 株式会社东芝 | Nonvolatile semiconductor memory device and repositioning method thereof |
JP2012190145A (en) * | 2011-03-09 | 2012-10-04 | Renesas Electronics Corp | Semiconductor integrated circuit |
CN104380381A (en) * | 2012-05-14 | 2015-02-25 | 桑迪士克科技股份有限公司 | Memory chip power management |
CN106160712A (en) * | 2016-07-08 | 2016-11-23 | 深圳市博巨兴实业发展有限公司 | A kind of por circuit of band LVR function |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216788B (en) * | 2008-01-21 | 2010-06-09 | 珠海中慧微电子有限公司 | Reset control chip and method |
CN102141939B (en) * | 2010-02-01 | 2013-03-27 | 杭州华三通信技术有限公司 | Device capable of recording restart reason of whole machine |
CN102830985A (en) * | 2011-06-15 | 2012-12-19 | 英业达股份有限公司 | Starting method |
CN106021006B (en) * | 2016-05-17 | 2019-03-26 | Oppo广东移动通信有限公司 | A kind of processing method and terminal that terminal booting is abnormal |
CN107145410B (en) * | 2017-06-08 | 2021-06-29 | 郑州云海信息技术有限公司 | Method, system and equipment for automatically powering on and starting up system after abnormal power failure |
-
2018
- 2018-05-31 CN CN201810548319.6A patent/CN108984330B/en active Active
- 2018-09-13 WO PCT/CN2018/105399 patent/WO2019227769A1/en active Application Filing
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01255019A (en) * | 1988-04-04 | 1989-10-11 | Alps Electric Co Ltd | Power source circuit for microcomputer |
JPH06111034A (en) * | 1992-09-28 | 1994-04-22 | Sharp Corp | Microcomputer system |
CN1833229A (en) * | 2003-08-06 | 2006-09-13 | 松下电器产业株式会社 | Semiconductor memory card, and accessing device and method |
US20060097679A1 (en) * | 2004-11-06 | 2006-05-11 | Samsung Electronics Co., Ltd. | Method of controlling startup current of motor and disk drive using the method |
CN101093988A (en) * | 2006-06-20 | 2007-12-26 | 三洋电机株式会社 | Low-voltage detection reset circuit |
CN201152970Y (en) * | 2007-11-13 | 2008-11-19 | 汉能科技有限公司 | Micro-controller reset circuit |
CN201315545Y (en) * | 2008-12-08 | 2009-09-23 | 海信(山东)空调有限公司 | Anti-interference circuit and electric equipment with same |
CN101626159A (en) * | 2009-01-14 | 2010-01-13 | 深圳华为通信技术有限公司 | Method for preventing repeated restart of terminal device and device thereof |
CN101840731A (en) * | 2009-03-12 | 2010-09-22 | 株式会社东芝 | Nonvolatile semiconductor memory device and repositioning method thereof |
JP2012190145A (en) * | 2011-03-09 | 2012-10-04 | Renesas Electronics Corp | Semiconductor integrated circuit |
CN104380381A (en) * | 2012-05-14 | 2015-02-25 | 桑迪士克科技股份有限公司 | Memory chip power management |
CN106160712A (en) * | 2016-07-08 | 2016-11-23 | 深圳市博巨兴实业发展有限公司 | A kind of por circuit of band LVR function |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112578297A (en) * | 2020-11-27 | 2021-03-30 | 浙江威星智能仪表股份有限公司 | Equipment electric quantity state detection method based on communication module working characteristics |
CN112578297B (en) * | 2020-11-27 | 2024-07-02 | 浙江威星智能仪表股份有限公司 | Equipment electric quantity state detection method based on communication module working characteristics |
WO2023147727A1 (en) * | 2022-02-07 | 2023-08-10 | 苏州浪潮智能科技有限公司 | Power consumption adjusting method and apparatus, storage device, and non-volatile readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108984330B (en) | 2021-05-11 |
WO2019227769A1 (en) | 2019-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9367446B2 (en) | Computer system and data recovery method for a computer system having an embedded controller | |
CN105740690B (en) | A kind of unlocking method and mobile terminal | |
EP3036600B1 (en) | Method and controller for power throttling system on portable device, corresponding portable device, and corresponding computer program product | |
CN104572226A (en) | Method and device for detecting mainboard starting abnormity | |
CN108984330B (en) | Method and device for controlling storage equipment and electronic equipment | |
CN110021792B (en) | Charging control method and device, terminal equipment and computer storage medium | |
CN107576930B (en) | power supply and relay status detection circuit and method | |
CN108027780B (en) | Memory content protection circuit | |
US20160092201A1 (en) | Method and Device for Updating Program Data | |
US20130283028A1 (en) | Adapter identification system and method for computer | |
US20200220371A1 (en) | Method and device for controlling charging on basis of state of battery | |
CN112912743B (en) | Calculation force control method, device, equipment and storage medium | |
CN108287770B (en) | Electronic device, information processing method, and readable storage medium | |
CN113608930A (en) | System chip and electronic device | |
CN112558742A (en) | Power-on control method, programmable logic device and power-on control system | |
CN106293796B (en) | A kind of information processing method and electronic equipment | |
CN107943259B (en) | Power failure reset method and device based on VxWorks system | |
CN104035784A (en) | Device starting system and method | |
CN112673539B (en) | Power supply device and method for managing DC power at power supply device | |
CN113608760A (en) | Firmware upgrading method and device for battery unit control chip | |
CN104868509B (en) | A kind of control method and external battery | |
CN116225479A (en) | Upgrade circuit and method for VRD firmware and computing device | |
CN109684890B (en) | Method and device for reducing power consumption | |
CN106787648B (en) | Method and system for protecting startup of mobile terminal | |
CN116991636B (en) | Data incremental backup method, system and storage medium based on distributed storage |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 518000 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Applicant after: Shenzhen jiangbolong electronic Limited by Share Ltd Address before: 518000 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Applicant before: Shenzhen jiangbolong Electronic Co., Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |