WO2019227769A1 - 一种控制存储设备的方法、装置及电子设备 - Google Patents

一种控制存储设备的方法、装置及电子设备 Download PDF

Info

Publication number
WO2019227769A1
WO2019227769A1 PCT/CN2018/105399 CN2018105399W WO2019227769A1 WO 2019227769 A1 WO2019227769 A1 WO 2019227769A1 CN 2018105399 W CN2018105399 W CN 2018105399W WO 2019227769 A1 WO2019227769 A1 WO 2019227769A1
Authority
WO
WIPO (PCT)
Prior art keywords
power
storage device
power consumption
abnormal
module
Prior art date
Application number
PCT/CN2018/105399
Other languages
English (en)
French (fr)
Inventor
梁小庆
李志雄
邓恩华
Original Assignee
深圳市江波龙电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市江波龙电子有限公司 filed Critical 深圳市江波龙电子有限公司
Publication of WO2019227769A1 publication Critical patent/WO2019227769A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error 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/0706Error 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/0727Error 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

Definitions

  • Embodiments of the present invention relate to the technical field of storage devices, and in particular, to a method, an apparatus, and an electronic device for controlling a storage device.
  • Storage devices include U disks (USB flash drives, USB flash disks), SSDs, emmc, EMCP, ufs, SD cards and other devices, which are widely used in various products, such as computers, mobile phones and other electronic products. As the functions of electronic products become more and more abundant, the capacity of storage devices is getting larger and larger, and the power consumption of devices is getting higher and higher, and storage devices usually do not have their own power supply, they are powered by the host connected to them.
  • the inventor of the present invention found that in the related art, when the host has insufficient power supply and cannot meet the demand voltage of the storage device, the storage device is reset, and as the service life of the host increases, , The device will aging, the host will be prone to continuous insufficient power supply, but the current storage device's required voltage is fixed, in this case, it will cause the storage device to constantly reset and fail to work, serious, it will also affect the storage device Cause damage.
  • the embodiments of the present invention provide a method, an apparatus, and an electronic device for controlling a storage device, which can effectively avoid a situation where the storage device is continuously reset due to insufficient power supply and affects the normal use of the storage device.
  • an embodiment of the present invention provides a method for controlling a storage device.
  • the method includes: when a reset is initiated on the storage device, determining whether the storage device meets an abnormal power-on condition; if so, reducing the storage The power consumption level of the device; causes the storage device to perform a power-on operation according to the reduced power consumption level; if not, the storage device performs a power-on operation according to a preset power consumption condition.
  • the determining whether the storage device meets an abnormal power-on condition includes:
  • the preset threshold value is a natural number greater than zero; if it is, the abnormal power-on condition is satisfied; if not, the abnormal power-on condition is not satisfied Electrical conditions.
  • the method further includes: marking the power-on status of the storage device as being powered on before the storage device performs a power-on operation; and when the storage device is successfully powered on, The power state is marked as power-on completion, and the number of recent consecutive abnormal power-on times is cleared; before the step of determining whether the storage device meets the abnormal power-on condition, the method further includes: judging the storage device If the power-on state is power-on or power-on is completed; if the power-on state is power-on, increase the number of recent consecutive abnormal power-on times by a preset value, and enter the judgment of the latest of the storage device.
  • causing the storage device to perform a power-on operation according to the reduced power consumption level includes: obtaining a maximum power consumption value in the reduced power consumption level; causing the storage device to perform the maximum power consumption value.
  • the power consumption value performs a power-on operation.
  • the method further includes: when it is determined that the storage device meets the abnormal power-on condition, determining whether the current power consumption level of the storage device is the lowest level; if not, entering the reducing the storage device Step of the power consumption level; if yes, an alarm signal is output.
  • the preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
  • an embodiment of the present invention provides a device for controlling a storage device, where the device includes: an abnormal power-on determination module, configured to determine whether the storage device satisfies an abnormal condition when the storage device is reset. Electrical conditions; a module for reducing power consumption for reducing the power consumption level of the storage device if satisfied; a module for reducing power consumption for powering on the storage device to perform a power-on operation according to the reduced power consumption level:
  • a preset power consumption power-on module is configured to cause the storage device to perform a power-on operation according to a preset power consumption condition if the power consumption module is not satisfied.
  • the abnormal power-on determination module is specifically configured to determine whether the latest consecutive abnormal power-on times of the storage device is greater than or equal to a preset threshold, where the preset threshold is a natural number greater than zero; if yes, Then the abnormal power-on condition is met; if not, the abnormal power-on condition is not met.
  • the apparatus further includes: a power-on marking module, configured to mark the power-on status of the storage device as being power-on before the storage device performs a power-on operation; the power-on completion marking module, When the storage device is successfully powered on, marking the power-on status as power-on completion, and clearing the number of recent consecutive abnormal power-on times; before the abnormal power-on determination module, the device It also includes: a power-on status judgment module for determining whether the power-on status of the storage device is being powered on or completed, and an abnormal power-on counting module for, if the power-on status is on, then The number of recent consecutive abnormal power-on times is increased by a preset value, and the step of determining whether the number of recent continuous abnormal power-on times of the storage device is greater than or equal to a preset threshold; a power-up completion module is used if the power-on When the power state is completed, it directly enters the preset power consumption power-on module.
  • a power-on marking module configured to mark the power-on status
  • the power consumption reduction power-on module includes: an obtaining unit configured to obtain a maximum power consumption value in the reduced power consumption level; an execution unit configured to cause the storage device to perform the operation according to the maximum power The consumption value performs a power-on operation.
  • the apparatus further includes: a power consumption level judging module, 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; A level module is used to enter the step of reducing the power consumption level of the storage device if not, and an alarm module is used to output an alarm signal if it is.
  • a power consumption level judging module 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
  • a level module is used to enter the step of reducing the power consumption level of the storage device if not, and an alarm module is used to output an alarm signal if it is.
  • the preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
  • an embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a memory that can be processed by the at least one processor Instructions executed by the processor, the instructions being executed by the at least one processor, so that the at least one processor can execute the method described above.
  • 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, where the electronic device is connected to the storage device.
  • an embodiment of the present invention provides a computer program product.
  • the computer program product includes a computer program stored on a non-volatile computer-readable storage medium.
  • the computer program includes program instructions. When the instructions are executed by a computer, the computer is caused to execute the method of controlling a storage device as described above.
  • an embodiment of the present invention further provides a non-volatile computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute as described above.
  • the storage device when the storage device is reset, it is determined whether the storage device meets the abnormal power-on condition. If it is satisfied, the power consumption level of the storage device is reduced.
  • the storage device is reset abnormally when there is a mismatch, and the abnormal power-on condition is used to reflect the abnormal reset of the storage device. Therefore, when the storage device is reset, the abnormal power-on condition can be used to determine whether the storage device is abnormally reset.
  • FIG. 1 is a schematic structural diagram of a storage system according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a storage device of the storage system in FIG. 1;
  • FIG. 3 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a method for controlling a storage device according to another embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for controlling a storage device according to another embodiment of the present invention.
  • FIG. 6 is a schematic diagram of function modules of a device 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.
  • FIG. 1 is a schematic structural diagram of a storage system according to an embodiment of the present invention.
  • the storage system 1 includes a storage device 10 and a host 11.
  • the host 11 is connected to the storage device 10.
  • the host 11 can store data in the storage device, read data from the storage device, or edit data in the storage device.
  • the host 11 also supplies power to the storage device 10, that is, the power for the storage device 10 comes from the host 11.
  • the storage device 10 may also provide its own power supply, but as the service life of the storage device 10 increases, the self-provided power supply of the storage device 10 may also experience unstable power supply and decreased power supply.
  • the storage device 10 may be a U disk (USB flash disk), SSD, emmc, EMCP, ufs, and SD card. As shown in FIG. 2, the storage device 10 includes a storage control The storage unit 11 and the storage medium 12 are electrically connected between the storage controller 11 and the storage medium 12.
  • the function of the memory controller 11 may be implemented by a control chip, for example, a single chip microcomputer.
  • the function of the storage medium 12 may be specifically implemented by a storage chip, the storage chip is a flash chip, and the flash type chip may be specifically a NAND flash chip.
  • the reset operation can be divided into internal reset and external event reset, among which external event reset includes power-on reset, RES reset, and low-voltage reset.
  • external event reset includes power-on reset, RES reset, and low-voltage reset.
  • the power-on reset and the RES reset are artificial normal power-on resets, which are implemented by externally connected reset circuits; the low-voltage reset is an automatic reset of the memory controller 11, and can be achieved by connecting the voltage detection chip to the RES pin of the memory controller 11.
  • the storage controller 11 When the power supply voltage supplied by the storage device 10 is lower than the required voltage of the storage device 10, the storage controller 11 performs a reset operation. After resetting the storage device 10, since the power supply voltage of the storage device 10 is still lower than the demand of the storage device 10 Voltage, the storage device 10 still cannot work normally, the storage device 10 resets again, causing the storage device 10 to constantly reset and never work normally.
  • storage device 10 is divided into two levels of power consumption, namely power consumption level 1 and power consumption level 2, and power consumption level 1 includes power consumption value A, power consumption value B, power consumption value C, power consumption value A, power consumption value B And the power consumption value C correspond to the required voltage of 5V, the required voltage of 4V, and the required voltage of 3V, respectively.
  • the present invention does not specifically limit the implementation of different power consumption levels of the storage device, for example, by enabling different functions of the storage controller 11 and so on.
  • FIG. 3 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present invention. The method is applied to the storage device described above.
  • the method for controlling a storage device includes:
  • step 210 When the storage device is reset, determine whether the storage device meets the abnormal power-on condition. If so, go to step 220. If not, go to step 240.
  • the aforementioned "reset to the storage device” may include power-on reset, RES reset, and low-voltage reset.
  • power-on reset and RES reset are artificial normal power-on resets, which are implemented by externally connected reset circuits; low-voltage reset is the storage device.
  • the automatic reset can be realized by connecting the voltage detection chip to the RES pin of the storage device.
  • the abnormal power-on condition is used to determine whether the storage device was previously caused by an abnormal reset.
  • determining whether the storage device meets the abnormal power-on condition includes determining whether the number of recent consecutive abnormal power-on times of the storage device is greater than Or it is equal to a preset threshold, where the preset threshold is a natural number greater than zero; if it is, the abnormal power-on condition is satisfied; if not, the abnormal power-on condition is not satisfied.
  • determining whether the storage device meets the abnormal power-on condition is not limited to the method described above.
  • “Recent consecutive abnormal power-on times” is the number of recent consecutive abnormal power-on times.
  • the storage device When the power supply is insufficient, the storage device will continue to be abnormally powered on. When the power supply does not match the required voltage of the storage device (that is, the power supply is insufficient), a continuous reset situation is caused.
  • the calculation method of the recent continuous abnormal power-on times is specifically: if the storage device is abnormally powered on once, the recent continuous abnormal power-on count is added to a preset value, and in some embodiments, the preset value may be selected as 1, therefore, After the storage device is abnormally powered on 5 times in a row, the storage device has been powered on abnormally 5 times consecutively.
  • the “preset threshold” is a preset threshold, which is a natural number greater than zero, and can be set by the user or the system. For example, if the preset threshold is 10, if the number of recent consecutive abnormal power-on times of the storage device is obtained, It is 5, that is, the number of recent consecutive abnormal power-ups is less than the preset threshold, and the abnormal power-up conditions are not met; if the recent continuous abnormal power-up times of the storage device are obtained, that is, the number of recent continuous abnormal power-ups is equal to the preset Threshold, it meets abnormal power-on conditions.
  • the “power consumption level” is a storage device divided in advance, and different power consumption levels correspond to different power consumption ranges. Among them, the power consumption levels can be 2, 3, 4, etc., and can be freely set according to actual needs.
  • reduce the power consumption level of the storage device For example, suppose the power consumption level of the storage device is divided into A and B, A> B, the current power consumption level of the storage device is A, and when the storage device is determined When the abnormal power-on condition is previously met, the power consumption level of the storage device is reduced to B.
  • the storage device After reducing the power consumption level of the storage device, the storage device performs a power-on operation according to the reduced power consumption level to enter the reset phase. As the power consumption level of the storage device decreases, the required voltage of the storage device also decreases, so that The storage device adapts to the power supply, which can avoid the reset of the storage device caused by insufficient power supply.
  • the storage device in order to ensure the stable operation of the storage device at the set power consumption level, when the storage device is powered on, the storage device can be powered on at the maximum power consumption value in the power consumption level. It may be specifically: acquiring a maximum power consumption value in the reduced power consumption level, so that the storage device performs a power-on operation according to the maximum power consumption value.
  • the maximum power consumption of the storage device during the actual operation does not exceed the maximum value of the set power consumption level. While each power consumption level corresponds to a power consumption range, the maximum power consumption value is the maximum value of the power consumption range corresponding to the power consumption level. Therefore, when the storage device is powered on with the maximum power consumption level, And when the power is successfully turned on, during the actual operation of the storage device, the voltage supplied by the power supply device can meet the demand voltage of the storage device, and the situation of insufficient power supply during the operation will not occur unless the power supply changes. When the storage device is powered on at the maximum 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 work stably in the corresponding power consumption level.
  • the aforementioned “preset power consumption condition” is a preset power consumption condition.
  • the preset power consumption condition is a maximum power consumption value in a maximum power consumption level. For example: Assume that the power consumption level of the storage device is divided into A, B, C, and A> B> C, and the current power consumption level of the storage device is A. When it is determined that the storage device has not previously met the abnormal power-on condition, the storage device previously For normal power-on, the storage device performs a power-on operation according to the maximum power consumption value of the maximum power consumption level A.
  • the storage device when the storage device is reset, it is determined whether the storage device meets the abnormal power-on condition. If it is satisfied, the power consumption level of the storage device is reduced.
  • the storage device is reset abnormally when there is a mismatch, and the abnormal power-on condition is used to reflect the abnormal reset of the storage device. Therefore, when the storage device is reset, the abnormal power-on condition can be used to determine whether the storage device is abnormally reset.
  • FIG. 4 is a schematic flowchart of a method for controlling a storage device according to another embodiment of the present invention.
  • the method for controlling a storage device includes:
  • the storage device When the storage device is reset, it is determined whether the number of recent consecutive abnormal power-on times of the storage device is greater than or equal to a preset threshold, where the preset threshold is a natural number greater than zero.
  • the power consumption level of the storage device When the power consumption level of the storage device is the lowest level, it means that the power consumption level of the storage device can no longer be reduced. At this time, an alarm signal can be prompted to remind the user that the current power supply of the host cannot meet the demand and needs to be replaced.
  • a method for reducing the power consumption value at the lowest power consumption level may also be collected, specifically: when the power consumption value is lowered at the lowest power consumption level, and then stored The device is powered on again. If the device is powered on successfully, make the storage device run according to the corresponding power consumption value as the maximum upper limit value. If the storage device is not powered on successfully, continue to reduce the power consumption value, and then power on. This cycle operation. When the storage device has no way to power on the lowest power consumption value of the lowest power consumption level, it will prompt an alarm signal.
  • the alarm signal may be a sound signal, a prompt message, or the like.
  • the storage device when it is determined that the storage device previously meets the abnormal power-on condition, before reducing the power consumption level of the storage device, first determine whether the current power consumption level of the storage device is the lowest level. If it is not the lowest level, the power consumption level of the storage device is reduced; if the current power consumption level of the storage device is the lowest level, the power consumption level of the storage device is not reduced, and an alarm signal is output to remind the user.
  • FIG. 5 is a schematic flowchart of a method for controlling a storage device according to another embodiment of the present invention.
  • the method for controlling a storage device includes:
  • step 420 Determine whether the power-on status of the storage device is being powered on or completed. If it is powered on, go to step 430, and if it is powered on, go to step 460;
  • step 440 Determine whether the number of recent consecutive abnormal power-on times of the storage device is greater than or equal to a preset threshold; if yes, go to step 450; if not, go to step 460;
  • step 460 Before the storage device performs a power-on operation, mark the power-on status of the storage device as being powered on; it should be noted that the specific position of step 460 is not limited to the position described in the accompanying drawings, only After step 420, steps 470 and 480 are sufficient.
  • the storage device performs a power-on operation according to the reduced power consumption level.
  • Powering on indicates the state when the storage device is performing a power-on operation without completing power-on.
  • the storage device When the storage device is powered on, if the power supply is insufficient to meet the required voltage of the storage device, the storage device will automatically enter the reset, but the power-on status has not changed, and it is still powered on; if the power supply is sufficient, the required voltage of the storage device If it is satisfied, the storage device will complete the entire power-on process, and the power-on state will be completed. Therefore, when resetting, you can determine whether the abnormal reset or normal reset is based on the power-on status of the storage device. And according to the power-on state to determine whether to increase the number of recent consecutive abnormal power-on times. In addition, when the storage device is successfully powered on, the number of recent consecutive abnormal power-on times is cleared, so it is not a continuous abnormal voltage and will not be recorded in the recent continuous abnormal power-on times.
  • a power-on state is introduced, and whether the reset here is a normal reset or an abnormal reset is determined by the power-on state, so as to determine whether to increase the number of recent consecutive abnormal power-on times.
  • the number of recent consecutive abnormal power-on times will be cleared. Therefore, it is not a continuous abnormal reset and will not be recorded in the recent consecutive abnormal power-on times. It is a good way to identify the continuous reset of the storage device due to insufficient power supply.
  • the recording method for the number of recent continuous abnormal power-on is not limited to the method described above, as long as it can record the number of recent continuous abnormal power-on.
  • FIG. 6 is a schematic diagram of functional modules of a device for controlling a storage device according to an embodiment of the present invention, which is applied to the above storage device.
  • the apparatus 500 for controlling a storage device includes an abnormal power-on determination module 510, a power-reduction level module 520, a power-reduction power-on module 530, and a preset power-on power-on module 540.
  • the abnormal power-on determination module 510 is connected to the power-reduction power-down module 520 and the preset power-up power-on module 540, respectively, and the power-down power-level module 520 is connected to the power-down power-on module 530.
  • the abnormal power-on judgment module 510 is configured to determine whether the storage device meets the abnormal power-on condition when the storage device is reset; and the power-reduction level module 520 is used to reduce the power consumption level of the storage device if it is satisfied.
  • a power reduction module 530 for reducing power consumption is used to enable the storage device to perform a power-on operation according to the reduced power consumption level; a power consumption module 540 for preset power consumption is used to cause the storage device to perform a preset power operation if it is not satisfied; The power consumption operation is performed, in which a preset power consumption condition is a maximum power consumption value in a maximum power consumption level.
  • the power reduction module 520 includes an obtaining unit 521 and an execution unit 522.
  • the obtaining unit 521 is configured to obtain a maximum power consumption value in the reduced power consumption level;
  • the execution unit 522 is configured to cause the storage device to perform a power-on operation according to the maximum power consumption value.
  • the storage device When the storage device is reset, determine whether the storage device is abnormally reset through abnormal power-on conditions. When the storage device is reset, reduce the power consumption level of the storage device, thereby reducing the required voltage of the storage device, so that the power supply voltage of the host and the storage device The demand voltage of the storage device matches the demand voltage of the storage device and the power supply voltage of the host reaches a new balance, which effectively prevents the storage device from being continuously reset due to insufficient power supply and affects the normal use of the storage device.
  • 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, wherein the abnormal power-on determination module 510 is specifically configured to determine whether the recent continuous abnormal power-on times of the storage device is greater than Or it is equal to a preset threshold, where the preset threshold is a natural number greater than zero; if it is, the abnormal power-on condition is satisfied; if not, the abnormal power-on condition is not satisfied.
  • the number of consecutive abnormal power-on times can be obtained by identifying and calculating the power-on status.
  • the device 500 may further include: a power-on marking module 550, a power-on completion marking module 560, a power-on status judgment module 570, and abnormal power-on.
  • the counting module 580 and the power-up completion module 590 are examples of the power-on.
  • the power-on marking module 550 is used to mark the power-on status of the storage device as being powered on before the storage device performs a power-on operation; the power-on completion marking module 560 is used when the storage device is successfully powered on When the power-on state is marked as power-on completion, and the number of recent consecutive abnormal power-on times is cleared.
  • the power-on status determination module 570 is configured to determine whether the power-on status of the storage device is being powered on or completed.
  • the abnormal power-on counting module 580 is configured to increase the number of recent continuous abnormal power-on times by a preset value if the power-on state is in the power-on state, and enter the judgment of the latest continuous abnormal power-on times of the storage device. Whether it is greater than or equal to a preset threshold.
  • the power-on completion module 590 is configured to directly enter the preset power-on power-on module 540 if the power-on state is power-on completion.
  • the apparatus 500 may further include a power consumption level judging module 511, a reduced power consumption level module 512, and an alarm module 513.
  • the power consumption level judging 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; Then enter the step of reducing the power consumption level of the storage device; the alarm module 513 is configured to output an alarm signal if it is.
  • the apparatus 500 determines whether the storage device previously meets the abnormal power-on condition through the abnormal power-on determination module 510, and the power consumption reduction module 520 reduces the power consumption of the storage device when the storage device previously meets the abnormal power-on condition.
  • Level, reducing power consumption The power-on module 530 causes the storage device to perform a power-on operation according to the reduced power consumption level.
  • the preset power-on power-on module 540 causes the storage device to perform a preset function when the storage device does not previously meet abnormal power-on conditions. Power-on operation is performed under power consumption conditions. When the storage device is reset, you can determine whether the storage device is abnormally reset through abnormal power-on conditions.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device may be an independent electronic device, or may be integrated into a module or a unit in the storage controller 11 shown in FIG. 2.
  • the electronic device 600 includes: one or more processors 601 and a memory 602.
  • One processor 601 is taken as an example in FIG. 7.
  • the processor 601 and the memory 602 may be connected through a bus or in other manners. In FIG. 7, the connection through the bus is taken as an example.
  • the memory 602 is a non-volatile computer-readable storage medium and can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions corresponding to the software upgrade method in the embodiment of the present invention.
  • / Module for example, the abnormal power-on determination module 510, the power-reduction level module 520, the power-reduction power-on module 530, the preset power-on power-on module 540, and the like shown in FIG. 6).
  • the processor 601 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions, and units stored in the memory 602, that is, the method for controlling the storage device according to the method embodiment.
  • the memory 602 may include a storage program area and a storage data area, where the storage program area may store an operating system and application programs 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.
  • the memory 602 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device.
  • the memory 602 may optionally include a memory remotely set relative to the processor 601, and these remote memories may be connected to the electronic device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, 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 methods and apparatuses for controlling a storage device in Embodiments 1 to 5.
  • the electronic device can execute the method and device for controlling a storage device in Embodiment 1 to Embodiment 5 of the arbitrary method, and has corresponding function modules and beneficial effects of executing the method.
  • the electronic device can execute the method and device for controlling a storage device in the first to fifth embodiments.
  • An embodiment of the present invention provides a computer program product.
  • the computer program product includes a computer program stored on a non-volatile computer-readable storage medium.
  • the computer program includes program instructions. When the program instructions are executed by an electronic device, When executed, the electronic device is caused to execute the method and apparatus for controlling a storage device in Embodiments 1 to 5. For example, the method steps 210 to 240 in FIG. 3 described above are performed to implement the functions of the 510-540 module in FIG. 6.
  • An embodiment of the present invention provides a non-volatile computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause an electronic device to execute Embodiments 1 to 1.
  • the electronic devices in the embodiments of the present application may exist in various forms, including but not limited to: electronic devices with a storage function, such as a smart phone, a computer, a smart watch, a smart bracelet, a tablet computer, a palmtop computer, and the like.
  • a storage function such as a smart phone, a computer, a smart watch, a smart bracelet, a tablet computer, a palmtop computer, and the like.
  • the device embodiments described above are only schematic, and the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical Units, which can be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • the embodiments can be implemented by means of software plus a general hardware platform, and of course, also by hardware.
  • the program can be stored in a computer-readable storage medium, and the program is being executed. In this case, the process of the embodiment of each method may be included.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random, Access Memory, RAM).

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

本发明实施例涉及存储设备技术领域,公开了一种控制存储设备的方法、装置及电子设备。其中,所述方法包括:当对存储设备启动复位时,确定所述存储设备是否满足异常上电条件;若满足,降低所述存储设备的功耗级别;使所述存储设备按下降后的功耗级别执行上电操作;若不满足,使所述存储设备按预设功耗条件执行上电操作。通过以上方式,本发明实施例可以有效避免因为供电不足而造成的存储设备持续复位,影响存储设备的正常使用的情况。

Description

一种控制存储设备的方法、装置及电子设备 【技术领域】
本发明实施例涉及存储设备技术领域,尤其涉及一种控制存储设备的方法、装置及电子设备。
【背景技术】
存储设备包括U盘(USB闪存盘,USB flash disk)、SSD、emmc、EMCP、ufs、SD卡等设备,被广泛应用在各种产品中,例如计算机、手机等电子产品。随着电子产品的功能越来越丰富,存储设备的容量越来越大,设备功耗也越来越高,而存储设备通常不会自备电源,都是由与其连接的主机进行供电。
本发明的发明人在实现本发明的过程中,发现:在相关技术中,当主机出现供电不足,无法满足存储设备的需求电压时,存储设备就会复位,而随着主机的使用年限的增长,设备会出现老化,主机会容易出现持续供电不足的情况,但是目前存储设备的需求电压是固定的,在这种情况下,会造成存储设备不断复位无法工作,严重的,还会对存储设备造成损坏。
【发明内容】
本申请发明实施例提供一种控制存储设备的方法、装置及电子设备,可以有效避免因为供电不足而造成的存储设备持续复位,影响存储设备的正常使用的情况。
本发明实施例公开了如下技术方案:
第一方面,本发明实施例提供了一种控制存储设备的方法,所述方法包括:当对存储设备启动复位时,确定所述存储设备是否满足异常上电条件;若满足,降低所述存储设备的功耗级别;使所述存储设备按下降后的功耗级别执行上电操作;若不满足,使所述存储设备按预设功耗条件执行上电操作。
可选地,所述确定所述存储设备是否满足异常上电条件,包括:
判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数;若是,则满足异常上电条件;若否,则不满足异常上电条件。
可选地,所述方法还包括:在所述存储设备执行上电操作前,将所述存储设备的上电状态标记为上电中;当所述存储设备成功上电时,将所述上电状态标记为上电完成,并且将所述最近连续异常上电次数清零;在所述确定所述存储设备是否满足异常上电条件的步骤之前,所述方法还包括:判断所述存储设备的上电状态为上电中还是上电完成;若所述上电状态为上电中,则将所述最近连续异常上电次数增加预设数值,并且进入所述判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值的步骤;若所述上电状态为上电完成,则直接进入所述使所述存储设备按预设功耗条件执行上电操作的步骤。
可选地,所述使所述存储设备按下降后的功耗级别执行上电操作,包括:获取所述下降后的功耗级别中的最大功耗值;使所述存储设备按所述最大功耗值执行上电操作。
可选地,所述方法还包括:当确定所述存储设备满足异常上电条件时,判断所述存储设备当前的功耗级别是否为最低级别;若否,则进入所述降低所述存储设备的功耗级别的步骤;若是,则输出告警信号。
可选地,所述预设功耗条件为最大功耗级别中的最大功耗值。
第二方面,本发明实施例提供了一种控制存储设备的装置,所述装置包括:异常上电判断模块,用于在对所述存储设备启动复位时,确定所述存储设备是否满足异常上电条件;降低功耗级别模块,用于若满足,降低所述存储设备的功耗级别;降低功耗上电模块,用于使所述存储设备按下降后的功耗级别执行上电操作:预设功耗上电模块,用于若不满足,使所述存储设备按预设功耗条件执行上电操作。
可选地,所述异常上电判断模块具体用于:判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数;若是,则满足异常上电条件;若否,则不满足异常上电条件。
可选地,所述装置还包括:上电中标记模块,用于在所述存储设备执行上电操作前,将所述存储设备的上电状态标记为上电中;上电完成标记模块,用于当所述存储设备成功上电时,将所述上电状态标记为上电完成,并且将所述最近连续异常上电次数清零;在所述异常上电判断模块之前,所述装置还包括:上电状态判断模块,用于判断所述存储设备的上电状态为上电中还是上电完成;异常上电计数模块,用于若所述上电状态为上电中,则将所述最近连续异常上电次数增加预设数值,并且进入所述判断所述存储设备的最近连续异常上电次 数是否大于或者等于预设阈值的步骤;上电完成模块,用于若所述上电状态为上电完成,则直接进入所述预设功耗上电模块。
可选地,所述降低功耗上电模块包括:获取单元,用于获取所述下降后的功耗级别中的最大功耗值;执行单元,用于使所述存储设备按所述最大功耗值执行上电操作。
可选地,所述装置还包括:功耗级别判断模块,用于当确定所述存储设备满足异常上电条件时,判断所述存储设备当前的功耗级别是否为最低级别;进入降低功耗级别模块,用于若否,则进入所述降低所述存储设备的功耗级别的步骤;告警模块,用于若是,则输出告警信号。
可选地,所述按预设功耗条件为最大功耗级别中的最大功耗值。
第三方面,本发明实施例提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的方法。
第四方面,本发明实施例提供了一种控制存储设备的系统,包括:存储设备以及如上所述的电子设备,所述电子设备与所述存储设备连接。
第五方面,本发明实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如上所述的控制存储设备的方法。
第六方面,本发明实施例还提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如上所述的控制存储设备的方法。
在本发明实施例中,当对存储设备复位时,判断该存储设备是否满足异常上电条件,若满足,则降低存储设备的功耗级别,由于对存储设备的供电电压与存储设备的需求电压不匹配时存储设备会异常复位,而异常上电条件用于反映存储设备异常复位,因此,当存储设备复位时,可以通过异常上电条件确定存储设备是否为异常复位,当为异常复位时,降低存储设备的功耗级别,从而降低存储设备的需求电压,以使主机的供电电压与存储设备的需求电压匹配,存储设备的需求电压与主机的供电电压达到新的平衡,有效避免因为供电不足而造成的存储设备持续复位,影响存储设备的正常使用。
【附图说明】
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1为本发明实施例中存储系统的结构示意图;
图2为图1中的存储系统的存储设备的结构示意图;
图3为本发明其中一实施例提供的一种控制存储设备的方法的流程示意图;
图4为本发明另一实施例提供的一种控制存储设备的方法的流程示意图;
图5为本发明又一实施例提供的一种控制存储设备的方法的流程示意图;
图6为本发明其中一实施例提供的一种控制存储设备的装置的功能模块示意图;
图7是本发明实施例提供的一种电子设备的结构示意图。
【具体实施方式】
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。
请参阅图1,图1为本发明实施例中存储系统的结构示意图。存储系统1包括存储设备10和主机11。
主机11与存储设备10连接,主机11可以向存储设备存储数据,也可以从存储设备读取数据,或者编辑存储设备中的数据。此外,主机11还向存储设备10供电,既为存储设备10的电源来源于主机11。当然,在一些实施例中,存储设备10也可以自备电源,但随着存储设备10的使用年限的增加,存储设备10的自备电源也会出现供电不稳,供电下降的情况。
在一些实施例中,存储设备10可以具体为U盘(USB闪存盘,USB flash disk)、SSD、emmc、EMCP、ufs、及SD卡等设备,如图2所示,存储设备10包括存储控制器11和存储介质12两部分,存储控制器11和存储介质12之间电性连 接。存储控制器11的功能可具体由控制芯片实现,例如:单片机。存储介质12的功能可具体由存储芯片实现,存储芯片为flash芯片,flash类型的芯片可具体为NAND flash芯片等。
当存储设备10发生故障时,存储控制器11会进行复位操作以尝试恢复,以使其从预设的状态开始工作。复位操作可以分为内部复位与外部事件复位,其中,外部事件复位包括上电复位、RES复位和低电压复位。上电复位和RES复位是人为的正常加电复位,通过外部连接复位电路实现;低电压复位是存储控制器11的自动复位,可以通过电压检测芯片与存储控制器11的RES引脚连接实现。
当存储设备10供电的电源电压低于存储设备10的需求电压时,存储控制器11会进行复位操作,对存储设备10进行复位之后,由于存储设备10的电源电压仍低于存储设备10的需求电压,存储设备10还是不能正常工作,存储设备10再次进行复位,造成存储设备10不断复位,从无法正常工作,为了避免由于供电不足出现存储设备10不断复位的情况,在本发明实施例中,先为存储设备10划分若干个功耗级别,每个功耗级别包含预定功耗范围,功耗值决定存储设备10的需求电压,功耗值越高其需求电压就越高,例如:存储设备10划分两层功耗级别,分别为功耗级别1和功耗级别2,而功耗级别1包含功耗值A、功耗值B、功耗值C,功耗值A、功耗值B和功耗值C分别对应需求电压5V、需求电压4V、需求电压3V。
值得说明的是:对于存储设备的不同的功耗级别的实现本发明不作具体限定,例如:通过开启存储控制器11的不同功能实现等等。
实施例1:
请参阅图3,图3为本发明其中一实施例提供的一种控制存储设备的方法的流程示意图,该方法应用于上述所描述的存储设备,该控制存储设备的方法包括:
210、当对存储设备启动复位时,确定存储设备是否满足异常上电条件,若满足,执行步骤220,若不满足,执行步骤240。
上述“对存储设备复位”可以包括上电复位、RES复位和低电压复位等,其中,上电复位和RES复位是人为的正常加电复位,通过外部连接复位电路实现;低电压复位是存储设备的自动复位,可以通过电压检测芯片与存储设备的 RES引脚连接实现。
需要说明的是:在对存储设备启动复位时是指对存储设备重新加电,但是存储设备并没有进入复位阶段。
异常上电条件用于确定存储设备先前是不是由于异常复位造成的,在一些实施例中,确定存储设备是否满足异常上电条件,包括:判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数;若是,则满足异常上电条件,若否,则不满足异常上电条件。当然,确定存储设备是否满足异常上电条件也不限定于上述描述的方法。
“最近连续异常上电次数”为记录到的最近连续的异常上电次数,当供电不足时,存储设备会持续出现异常上电,因此,通过最近连续异常上电次数可以很好地识别出因供电与存储设备的需求电压不匹配(即供电不足)时,造成的持续复位的情况。最近连续异常上电次数的计算方法具体为:若存储设备异常上电一次,则最近连续异常上电次数计数加预设数值,在一些实施例中,该预设数值可选为1,因此,当存储设备连续5次异常上电后,此时存储设备的最近连续异常上电次数为5。
“预设阈值”为预先设定的阈值,其为大于零的自然数,可以由用户设定或系统自由设置,例如:假设预设阈值为10,若获取到存储设备的最近连续异常上电次数为5,即,最近连续异常上电次数小于预设阈值,则不满足异常上电条件;若获取到存储设备的最近连续异常上电次数为10,即,最近连续异常上电次数等于预设阈值,则满足异常上电条件。
220、若满足,降低存储设备的功耗级别;
“功耗级别”为预先对存储设备划分好的,不同功耗级别对应不同的功耗范围,其中,功耗级别可以为2个、3个、4个等等,可以根据实际需要自由设置。当存储设备满足异常上电条件时,降低存储设备的功耗级别,例如:假设存储设备的功耗级别分为A和B,A>B,存储设备当前功耗级别为A,当确定存储设备先前满足异常上电条件时,则将存储设备的功耗级别降低为B。
230、使存储设备按下降后的功耗级别执行上电操作;
在降低存储设备的功耗级别后,使存储设备按照下降后的功耗级别执行上电操作进入复位阶段,由于存储设备的功耗级别下降了,存储设备的需求电压也就下降了,以使存储设备适应电源供电,可以很好地避免因供电不足而造成的存储设备复位。
在一些实施例中,为了保证存储设备在设置的功耗级别中稳定运行,可以在存储设备上电时,可以让存储设备以功耗级别中的最大功耗值进行上电,则步骤230又可以具体:获取所述下降后的功耗级别中的最大功耗值,使所述存储设备按所述最大功耗值执行上电操作。
由于存储设备在实际的操作过程功耗值会有一定变化的,但是存储设备在实际的操作过程的功耗最大值不超过所设定的功耗级别的最大值。而每一功耗级别对应的是一个功耗范围,则最大功耗值为该功耗级别对应的功耗范围的最大值,因此,当存储设备以该功耗级别的最大值进行上电,并且成功上电时,则存储设备在实际操作过程中,供电设备所供给的电压就能满足存储设备的需求电压,不会在操作的过程中出现供电不足的情况,除非供电发生变化。而当存储设备以该功耗级别的最大值进行上电,并且没有成功上电时,则需要进一步下降功耗级别,以保证存储设备在对应的功耗级别中能够稳定工作。
240、若不满足,使存储设备按预设功耗条件执行上电操作。
上述“预设功耗条件”为预先设置的功耗条件,在一些实施例中,预设功耗条件为最大功耗级别中的最大功耗值。例如:假设存储设备的功耗级别分为A、B、C,且A>B>C,存储设备当前功耗级别为A,当确定存储设备先前不满足异常上电条件时,即存储设备先前为正常上电,则存储设备按照最大功耗级别A的最大功耗值执行上电操作。
在本发明实施例中,当对存储设备复位时,判断该存储设备是否满足异常上电条件,若满足,则降低存储设备的功耗级别,由于对存储设备的供电电压与存储设备的需求电压不匹配时存储设备会异常复位,而异常上电条件用于反映存储设备异常复位,因此,当存储设备复位时,可以通过异常上电条件确定存储设备是否为异常复位,当为异常复位时,降低存储设备的功耗级别,从而降低存储设备的需求电压,以使主机的供电电压与存储设备的需求电压匹配,存储设备的需求电压与主机的供电电压达到新的平衡,有效避免因为供电不足而造成的存储设备持续复位,影响存储设备的正常使用。
实施例2:
请参阅图4,图4为本发明另一实施例提供的一种控制存储设备的方法的流程示意图,该控制存储设备的方法包括:
310、当对存储设备启动复位时,判断存储设备的最近连续异常上电次数是 否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数。
320、若最近连续异常上电次数大于或者等于预设阈值,则判断存储设备当前的功耗级别是否为最低级别;
330、若不是最低级别,则降低存储设备的功耗级别,并且使存储设备按下降后的功耗级别执行上电操作;
340、若是最低级别,则输出告警信号。
当存储设备的功耗级别是最低级别时,说明存储设备的功耗级别无法再下降,此时,可以通过提示告警信号,以提醒用户当前的主机的供电无法满足需求,需要进行更换。当然,在另一些实施例中,当下降到最低功耗级别之后,也可以采集在最低功耗级别中降低功耗值的方法,具体为:当最低功耗级别中下降功耗值,然后存储设备重新上电,如果成功上电,使存储设备按对应功耗值作为最大上限值进行运行,如果没有成功上电,继续下降功耗值,然后上电,如此循环操作。当最低功耗级别的最低功耗值,存储设备都没有办法成功上电时提示告警信号。
在一些实施例中,该告警信号可以为声音信号、提示消息等等。
350、若最近连续异常上电次数小于预设阈值,则使存储设备按预设功耗条件执行上电操作。
在本实施例中,当确定存储设备先前满足异常上电条件时,在降低存储设备的功耗级别之前,先判断存储设备当前的功耗级别是否为最低级别,若存储设备当前的功耗级别不是最低级别,则进行降低存储设备的功耗级别;若存储设备当前的功耗级别为最低级别,则不进行降低存储设备的功耗级别,输出告警信号,以提醒用户。
实施例3:
请参阅图5,图5为本发明又一实施例提供的一种控制存储设备的方法的流程示意图,该控制存储设备的方法包括:
410:对存储设备启动复位;
420:判断存储设备的上电状态为上电中还是上电完成,若为上电中,则执行步骤430,若为上电完成,则执行步骤460;
430:将最近连续异常上电次数增加预设数值;
440:判断存储设备的最近连续异常上电次数是否大于或者等于预设阈值; 若是,则执行步骤450;若否,则执行步骤460;
450:降低存储设备的功耗级别;
460:在存储设备执行上电操作前时,将存储设备的上电状态标记为上电中;需要说明的是:步骤460的具体位置并不限定为说明书附图中所描述的位置,只需要在步骤420之后,在步骤470和步骤480之前即可。
470:存储设备按下降后的功耗级别执行上电操作;
480:使存储设备按预设功耗条件执行上电操作;
490:当所述存储设备成功上电时,将所述上电状态标记为上电完成,并且将所述最近连续异常上电次数清零。
“上电中”表示存储设备正在执行上电操作而没有完成上电时的状态。当存储设备在上电过程中,若供电不足无法满足存储设备的需求电压,则存储设备会自动进入复位,但是上电状态没有更改,仍然是上电中;若供电充足,存储设备的需求电压得到满足,则存储设备会完成整个上电过程中,则上电状态变为上电完成,因此,在复位的时候,可以通过存储设备的上电状态来判断是此次异常复位还是正常复位,并且根据上电状态来确定是否增加最近连续异常上电次。另外,由于当所述存储设备成功上电时,最近连续异常上电次数清零,因此,不是连续异常电压,不会记录在最近连续异常上电次中。
在本实施例中,引入上电状态,并且通过上电状态来判断此处复位是正常复位,还是异常复位,从而确定是否增加最近连续异常上电次数,另外,当当所述存储设备成功上电时,最近连续异常上电次数会清零,因此,不是连续异常复位,不会记录在最近连续异常上电次中,很好地识别出因供电不足而造成的存储设备不断复位的情况。
可以理解的是:对于最近连续异常上电次数的记录方式不限定于上述所描述的方式,只要能够实现记录最近连续异常上电次数即可。
实施例5:
请参阅图6,图6为本发明其中一实施例提供的一种控制存储设备的装置的功能模块示意图,应用于上述存储设备。该控制存储设备的装置500包括异常上电判断模块510、降低功耗级别模块520、降低功耗上电模块530和预设功耗上电模块540。
在本实施例中,异常上电判断模块510分别与降低功耗级别模块520、预设 功耗上电模块540连接,降低功耗级别模块520与降低功耗上电模块530连接。异常上电判断模块510用于当对所述存储设备启动复位时,确定所述存储设备是否满足异常上电条件;降低功耗级别模块520用于若满足,降低所述存储设备的功耗级别;降低功耗上电模块530用于使所述存储设备按下降后的功耗级别执行上电操作;预设功耗上电模块540用于若不满足,使所述存储设备按预设功耗条件执行上电操作,其中,按预设功耗条件为最大功耗级别中的最大功耗值。
在一些实施例中,降低功耗上电模块520包括获取单元521和执行单元522。其中,获取单元521用于获取所述下降后的功耗级别中的最大功耗值;执行单元522用于使所述存储设备按所述最大功耗值执行上电操作。
当存储设备复位时,通过异常上电条件确定存储设备是否为异常复位,当为异常复位时,降低存储设备的功耗级别,从而降低存储设备的需求电压,以使主机的供电电压与存储设备的需求电压匹配,存储设备的需求电压与主机的供电电压达到新的平衡,有效避免因为供电不足而造成的存储设备持续复位,影响存储设备的正常使用。
在一些实施例中,异常上电条件可以为连续异常上电次数大于或者等于预设阈值,其中,异常上电判断模块510具体用于:判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数;若是,则满足异常上电条件;若否,则不满足异常上电条件。而连续异常上电次数可以通过上电状态进行识别计算得到的,具体的,装置500还可以包括:上电中标记模块550、上电完成标记模块560、上电状态判断模块570、异常上电计数模块580和上电完成模块590。
上电中标记模块550用于在所述存储设备执行上电操作前,将所述存储设备的上电状态标记为上电中;上电完成标记模块560用于当所述存储设备成功上电时,将所述上电状态标记为上电完成,并且将所述最近连续异常上电次数清零。
在异常上电判断模块510之前,上电状态判断模块570用于判断所述存储设备的上电状态为上电中还是上电完成。异常上电计数模块580用于若所述上电状态为上电中,则将所述最近连续异常上电次数增加预设数值,并且进入所述判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值的步骤。上电完成模块590用于若所述上电状态为上电完成,则直接进入所述预设 功耗上电模块540。
进一步地,装置500还可以包括功耗级别判断模块511、进入降低功耗级别模块512和告警模块513。其中,功耗级别判断模块511用于当确定所述存储设备满足异常上电条件时,判断所述存储设备当前的功耗级别是否为最低级别;进入降低功耗级别模块512用于若否,则进入所述降低所述存储设备的功耗级别的步骤;告警模块513用于若是,则输出告警信号。
需要说明的是,本发明实施例中的控制存储设备的装置中的各个模块之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,具体内容同样适用于控制存储设备的装置。本发明实施例中的各个模块能作为单独的硬件或软件来实现,并且可以根据需要使用单独的硬件或软件来实现各个单元的功能的组合。未在控制存储设备的装置300的实施例中详尽描述的技术细节,可参见本发明实施例1、实施例2和实施例3所提供的控制存储设备的方法。
在本发明实施例中,该装置500通过异常上电判断模块510确定存储设备先前是否满足异常上电条件,降低功耗级别模块520在存储设备先前满足异常上电条件时降低存储设备的功耗级别,降低功耗上电模块530使存储设备按下降后的功耗级别执行上电操作,预设功耗上电模块540在存储设备先前不满足异常上电条件时使存储设备按预设功耗条件执行上电操作,当存储设备复位时,可以通过异常上电条件确定存储设备是否为异常复位,当为异常复位时,降低存储设备的功耗级别,从而降低存储设备的需求电压,以使主机的供电电压与存储设备的需求电压匹配,存储设备的需求电压与主机的供电电压达到新的平衡,有效避免因为供电不足而造成的存储设备持续复位,影响存储设备的正常使用。
实施例6:
如图7所示,图7为本发明实施例提供的一种电子设备的结构示意图。其中,电子设备可以为独立的电子设备,也可以整合成图2所示的存储控制器11中的模块或单元。所述电子设备600包括:一个或多个处理器601以及存储器602,图7中以一个处理器601为例。
处理器601和存储器602可以通过总线或者其他方式连接,图7中以通过总线连接为例。
存储器602作为一种非易失性计算机可读存储介质,可用于存储非易失性 软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的软件升级方法对应的程序指令/模块(例如,附图6所示的异常上电判断模块510、降低功耗级别模块520、降低功耗上电模块530、预设功耗上电模块540等等)。处理器601通过运行存储在存储器602中的非易失性软件程序、指令以及单元,从而执行电子设备的各种功能应用以及数据处理,即实现所述方法实施例的控制存储设备的方法。
存储器602可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据电子设备使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器602可选包括相对于处理器601远程设置的存储器,这些远程存储器可以通过网络连接至电子设备。所述网络的实施例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个单元存储在所述存储器602中,当被所述一个或者多个处理器601执行时,执行实施例1至实施例5中的控制存储设备的方法和装置。
该电子设备可执行所述任意方法实施例1至实施例5中的控制存储设备的方法和装置,具备执行方法相应的功能模块和有益效果。未在电子设备实施例中详尽描述的技术细节,可参见执行实施例1至实施例5中的控制存储设备的方法和装置。
本发明实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被电子设备执行时,使所述电子设备执行实施例1至实施例5中的控制存储设备的方法和装置。例如,执行以上描述的图3中的方法步骤210至步骤240,实现图6中的510-540模块的功能。
本发明实施例提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使电子设备执行实施例1至实施例5中的控制存储设备的方法和装置。
本申请实施例的电子设备可以以多种形式存在,包括但不限于:智能手机、计算机、智能手表、智能手环、平板电脑、掌上电脑等等具有存储功能的电子设备。
需要说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为 分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施例的描述,本领域普通技术人员可以清楚地了解到各实施例可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现所述实施例方法中的全部或部分流程是可以通过计算机程序指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如所述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (13)

  1. 一种控制存储设备的方法,其中,包括:
    当对存储设备启动复位时,确定所述存储设备是否满足异常上电条件;
    若满足,降低所述存储设备的功耗级别;
    使所述存储设备按下降后的功耗级别执行上电操作;
    若不满足,使所述存储设备按预设功耗条件执行上电操作。
  2. 根据权利要求1所述的方法,其中,所述确定所述存储设备是否满足异常上电条件,包括:
    判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数;
    若是,则满足异常上电条件;
    若否,则不满足异常上电条件。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    在所述存储设备执行上电操作前,将所述存储设备的上电状态标记为上电中;
    当所述存储设备成功上电时,将所述上电状态标记为上电完成,并且将所述最近连续异常上电次数清零;
    在所述确定所述存储设备是否满足异常上电条件的步骤之前,所述方法还包括:
    判断所述存储设备的上电状态为上电中还是上电完成;
    若所述上电状态为上电中,则将所述最近连续异常上电次数增加预设数值,并且进入所述判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值的步骤;
    若所述上电状态为上电完成,则直接进入所述使所述存储设备按预设功耗条件执行上电操作的步骤。
  4. 根据权利要求1-3任一项所述的方法,其中,
    所述使所述存储设备按下降后的功耗级别执行上电操作,包括:
    获取所述下降后的功耗级别中的最大功耗值;
    使所述存储设备按所述最大功耗值执行上电操作。
  5. 根据权利要求1-3任一项所述的方法,其中,所述方法还包括:
    当确定所述存储设备满足异常上电条件时,判断所述存储设备当前的功耗级别是否为最低级别;
    若否,则进入所述降低所述存储设备的功耗级别的步骤;
    若是,则输出告警信号。
  6. 根据权利要求1-3任一项所述的方法,其中,
    所述预设功耗条件为最大功耗级别中的最大功耗值。
  7. 一种控制存储设备的装置,其中,包括:
    异常上电判断模块,用于在对所述存储设备启动复位时,确定所述存储设备是否满足异常上电条件;
    降低功耗级别模块,用于若满足,降低所述存储设备的功耗级别;
    降低功耗上电模块,用于使所述存储设备按下降后的功耗级别执行上电操作;
    预设功耗上电模块,用于若不满足,使所述存储设备按预设功耗条件执行上电操作。
  8. 根据权利要求7所述的装置,其中,所述异常上电判断模块具体用于:
    判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值,其中,所述预设阈值为大于零的自然数;
    若是,则满足异常上电条件;
    若否,则不满足异常上电条件。
  9. 根据权利要求8所述的装置,其中,
    所述装置还包括:
    上电中标记模块,用于在所述存储设备执行上电操作前,将所述存储设备的上电状态标记为上电中;
    上电完成标记模块,用于当所述存储设备成功上电时,将所述上电状态标记为上电完成,并且将所述最近连续异常上电次数清零;
    在所述异常上电判断模块之前,所述装置还包括:
    上电状态判断模块,用于判断所述存储设备的上电状态为上电中还是上电完成;
    异常上电计数模块,用于若所述上电状态为上电中,则将所述最近连续异常上电次数增加预设数值,并且进入所述判断所述存储设备的最近连续异常上电次数是否大于或者等于预设阈值的步骤;
    上电完成模块,用于若所述上电状态为上电完成,则直接进入所述预设功耗上电模块。
  10. 根据权利要求7-9任一项所述的装置,其中,所述降低功耗上电模块包括:
    获取单元,用于获取所述下降后的功耗级别中的最大功耗值;
    执行单元,用于使所述存储设备按所述最大功耗值执行上电操作。
  11. 根据权利要求7-9任一项所述的装置,其中,所述装置还包括:
    功耗级别判断模块,用于当确定所述存储设备满足异常上电条件时,判断所述存储设备当前的功耗级别是否为最低级别;
    进入降低功耗级别模块,用于若否,则进入所述降低所述存储设备的功耗级别的步骤;
    告警模块,用于若是,则输出告警信号。
  12. 根据权利要求7-9任一项所述的装置,其中,
    所述按预设功耗条件为最大功耗级别中的最大功耗值。
  13. 一种电子设备,其中,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-6任一项所 述的方法。
PCT/CN2018/105399 2018-05-31 2018-09-13 一种控制存储设备的方法、装置及电子设备 WO2019227769A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810548319.6A CN108984330B (zh) 2018-05-31 2018-05-31 一种控制存储设备的方法、装置及电子设备
CN201810548319.6 2018-05-31

Publications (1)

Publication Number Publication Date
WO2019227769A1 true WO2019227769A1 (zh) 2019-12-05

Family

ID=64542854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105399 WO2019227769A1 (zh) 2018-05-31 2018-09-13 一种控制存储设备的方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN108984330B (zh)
WO (1) WO2019227769A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112578297A (zh) * 2020-11-27 2021-03-30 浙江威星智能仪表股份有限公司 一种基于通信模组工作特征的设备电量状态检测方法
CN114138098B (zh) * 2022-02-07 2022-04-29 苏州浪潮智能科技有限公司 功耗调节方法、装置、存储设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216788A (zh) * 2008-01-21 2008-07-09 珠海中慧微电子有限公司 复位监控芯片及方法
CN102141939A (zh) * 2010-02-01 2011-08-03 杭州华三通信技术有限公司 可记录整机重启原因的装置
CN102830985A (zh) * 2011-06-15 2012-12-19 英业达股份有限公司 开机方法
CN106021006A (zh) * 2016-05-17 2016-10-12 广东欧珀移动通信有限公司 一种终端开机异常的处理方法及终端
CN107145410A (zh) * 2017-06-08 2017-09-08 郑州云海信息技术有限公司 一种系统异常掉电后自动上电开机的方法、系统及设备

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255019A (ja) * 1988-04-04 1989-10-11 Alps Electric Co Ltd マイクロコンピュータの電源回路
JPH06111034A (ja) * 1992-09-28 1994-04-22 Sharp Corp マイクロコンピュータシステム
US8161225B2 (en) * 2003-08-06 2012-04-17 Panasonic Corporation Semiconductor memory card, access device and method
KR100630713B1 (ko) * 2004-11-06 2006-10-02 삼성전자주식회사 스핀들 모터 기동 전류 제어 방법 및 이를 이용한 디스크드라이브
JP5111791B2 (ja) * 2006-06-20 2013-01-09 オンセミコンダクター・トレーディング・リミテッド 低電圧検知リセット回路
CN201152970Y (zh) * 2007-11-13 2008-11-19 汉能科技有限公司 一种单片机复位电路
CN201315545Y (zh) * 2008-12-08 2009-09-23 海信(山东)空调有限公司 一种抗干扰电路及具有所述电路的电器设备
CN101626159B (zh) * 2009-01-14 2012-01-25 华为终端有限公司 防止终端设备反复重启的方法与装置
JP4846813B2 (ja) * 2009-03-12 2011-12-28 株式会社東芝 不揮発性半導体記憶装置
JP2012190145A (ja) * 2011-03-09 2012-10-04 Renesas Electronics Corp 半導体集積回路
US8634267B2 (en) * 2012-05-14 2014-01-21 Sandisk Technologies Inc. Flash memory chip power management for data reliability and methods thereof
CN106160712B (zh) * 2016-07-08 2019-04-12 深圳市博巨兴实业发展有限公司 一种带lvr功能的por电路

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216788A (zh) * 2008-01-21 2008-07-09 珠海中慧微电子有限公司 复位监控芯片及方法
CN102141939A (zh) * 2010-02-01 2011-08-03 杭州华三通信技术有限公司 可记录整机重启原因的装置
CN102830985A (zh) * 2011-06-15 2012-12-19 英业达股份有限公司 开机方法
CN106021006A (zh) * 2016-05-17 2016-10-12 广东欧珀移动通信有限公司 一种终端开机异常的处理方法及终端
CN107145410A (zh) * 2017-06-08 2017-09-08 郑州云海信息技术有限公司 一种系统异常掉电后自动上电开机的方法、系统及设备

Also Published As

Publication number Publication date
CN108984330A (zh) 2018-12-11
CN108984330B (zh) 2021-05-11

Similar Documents

Publication Publication Date Title
KR102563833B1 (ko) 지능적 백업 커패시터 관리
US9235245B2 (en) Startup performance and power isolation
US10007507B2 (en) Method for updating firmware of a battery included in a rechargeable battery module, portable electronic device, and rechargeable battery module
US10860425B2 (en) Method for recovering basic input/output system image file of a computer system and the computer system
US9367446B2 (en) Computer system and data recovery method for a computer system having an embedded controller
US10115442B2 (en) Demand-based provisioning of volatile memory for use as non-volatile memory
US10936038B2 (en) Power control for use of volatile memory as non-volatile memory
CN107797642B (zh) 一种备电方法及装置
WO2019227769A1 (zh) 一种控制存储设备的方法、装置及电子设备
CN111142644A (zh) 一种硬盘运行控制方法、装置及相关组件
WO2015081129A2 (en) Hard power fail architecture
US10788872B2 (en) Server node shutdown
US10359826B2 (en) Use of volatile memory as non-volatile memory
WO2016110000A1 (zh) 单板掉电重启的调整方法、装置及系统
US20210141441A1 (en) Method and apparatus for improving power management by controlling a system input current in a power supply unit
CN108287770B (zh) 电子设备、信息处理方法及可读存储介质
CN115514031A (zh) 充电控制方法、装置、计算机设备及存储介质
US8527792B2 (en) Power saving method and apparatus thereof
US20210096624A1 (en) Electronic apparatus and operation information output method
WO2016114755A1 (en) Selectively enabling loads using a backup power supply
TW201931141A (zh) 記憶體控制裝置與記憶體控制方法
CN113835512B (zh) 存储器存储装置的电源控制方法与存储器存储系统
CN107580148B (zh) 一种智能调整关机电压的方法、存储介质及智能终端
TWI839136B (zh) 基板管理控制器的下游裝置的韌體更新方法
CN116599198A (zh) 智能门锁双电池供电切换方法、装置、存储介质及门锁

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18920700

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18920700

Country of ref document: EP

Kind code of ref document: A1