1. Technical Field
Embodiments of the present disclosure relate to power management technology, and particularly to an electronic device and method for reducing energy consumption of storage devices using the electronic device.
2. Description of Related Art
For large data storage, more and more storage devices (e.g., hard disk drives) are configured in an electronic device (e.g., a computer and a server). However, some of the storage devices may be idle for a long time, thus, the power consumption of the storage devices are wasted. Therefore, an efficient method for reducing energy consumption of the storage devices is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
The management system 10 reduces energy consumption of the storage devices 12 by turning off one or more storage devices 12 when they are idle for a predetermined duration, and turning on one or more target storage devices when files stored in the target storage devices need to be processed or accessed, therefore saving power consumption of the storage devices 12.
The electronic device 1 further includes at least one processor 11 and a display device 13. The at least one processor 11 is used to execute the management system 10 and other applications installed in the electronic device 1, such as an operating system of the electronic device 1. The storage devices 12 store one or more programs, such as the operating system and applications of the electronic device 1.
In the first embodiment, the storage devices 12 are installed inside of the electronic device 1.
In some embodiments (not limited in the above two embodiments), as shown in
In other embodiments, as shown in
In step S2, the index generation module 100 establishes a directory index of the files in the plurality of storage devices 12, and stores the directory index in one of the storage devices 12 or in a memory of the electronic device 1. For example, the index generation module 100 stores the directory index in a specified storage device. The specified storage device may be predetermined from the storage devices 12, and is enabled when the electronic device 1 is powered on, so that the user of the electronic device 1 may search files through the directory index in the specified storage device.
The directory index may include, but is not limited to file names and storage paths of the files, such as, “C:\folder\user,” for example.
In some embodiments, the index generation module 100 establishes the directory index for all of the files in the storage devices 12, or establishes a specific directory index for specific files in the storage devices 12. The specific files may have predetermined content or be in predetermined forms, such as image files having JPG format, for example.
In step S4, the power control module 102 turn off the storage devices 12. In a first embodiment, when the index generation module 100 finishes storing the directory index, the power control module 102 turns off the storage devices 12 to reduce the energy consumption of the storage devices 12.
In a second embodiments, when the directory index is finished storing, the power control module 102 does not turn off the storage devices 12 until the electronic device 1 is powered off. That is, the storage devices 12 are turned off when the electronic device 1 is powered off, and then when the electronic device 1 is restarted (e.g., is powered on the next time), the power control module 102 controls the storage devices 12 not to turn on. That is, the power control module 102 controls the power supplies 14 not to supply power to the storage devices 12, or controls the switches 15 to disconnect the storage devices 12 from the power supplies 14.
In other embodiments, one or more storage devices 12 may be predetermined to be the specified storage devices that are always powered on with the electronic device 1, to provide necessary data for the user. That is, the power supplies 14 or the switches 15 of the specified storage devices 21 are not shut down by the power control module 102.
In step S6, the determination module 104 receives a user request for processing a target file, such as accessing the target file, modifying the target file, copying the target file, or deleting the target file, for example. The user request for processing the target file may include, but is not limited to a file name. The user request may be inputted through an inputting device (e.g., a physical keyboard or a virtual keyboard) of the electronic device 1. The user request may be received by the determination module 104 from other electronic devices through a network (e.g., the Internet or WIFI) or a data connection (e.g., a data cable).
In step S8, the determination module 104 determines whether the directory index includes information of the target file. When the directory index does not include the information of the target file, step S10 is executed. When the directory index includes the information of the target file, step S12 is executed.
In step S10, the determination module 104 outputs a prompt message to indicate that the target file is not stored in the storage devices 12, and then the procedure ends. In other embodiments, the determination module 104 further prompts the user to input a new user request.
In step S12, the determination module 104 determines a target storage device that stores the target file. The determination module 104 may determine a storage path of the target file that records in the directory index, and then determine the target storage device according to the determined storage path. For example, a name of the target storage device is “A.”
In step S14, the power control module 102 turns on the target storage device, and transmit the user request to the target storage device.
In step S16, the file management module 106 processes the target file according to the user request, such as opens the target file, modifies the target file, saves the target file, deletes the target file, or copies the target file, for example.
In other embodiments, if the user request is for accessing a folder of a required storage device, the determination module 104 determines that the user request is for accessing a directory of the required storage device, but not for accessing files in the required storage device directly. The determination module 104 further determines whether the directory index includes information of files stored in the folder of the required storage device. When the directory index includes information of the files stored in the folder of the required storage device, the determination module 104 presents the directory of the folder in the required storage device by displaying the file information of the files stored in the folder of required storage device, on the display device 13. For example, the user request is for accessing a folder B in a storage device “A,” such as “A:\B,” the determination module 104 presents file information of files in the folder B of the storage device A.
Depending on the above embodiments, when the user needs to process a file in a storage device 12 that is powered off, the management system 10 may determine the storage device 12 to be the target storage device when information of the file is recorded in the directory index, and then turn on the target storage device by controlling a power supply 14 of the target storage device or connecting the target storage device to the poser supply 14 using a corresponding switch 15. In addition, when the user needs to access a folder of a storage device 12, the management system 10 determines that the user needs to access a directory of the folder, and presents the directory of the folder in the storage device 12 without turning on the storage device 12.
In other embodiments, the timer 108 calculates idle time of the target storage device. When the idle time is equal to a predetermined time duration (e.g., 5 minutes), the file management module 106 stores the target file and closes the target file, and the power control module 102 turns off the target storage device.
For example, the timer 108 starts to time the idle time when the target storage device receives the user request, and is reset when the target storage device receives a new user request. When the idle time is equal to the predetermined time duration and no new user request is received, as mentioned above, the power control module 102 turns off the target storage device after storing the target file, and the timer 108 stops working until another storage device receives user requests. The management system 10 may have a plurality of timers 108 to time idle time of multiple target storage devices synchronously.
In other embodiments, the timer 108 starts to time the idle time after the target storage device finishes processing the target file according to the user request.
In step S160, the file management module 106 processes the target file according to the user request.
In step S162, the file management module 106 stores the target file after processing.
In step S164, the index generation module 100 determines whether file information of the target file has been updated. For example, the file information of the target file may include a file name, a storage path, and file properties, for example. When the file information of the target file has been updated, step S166 is executed. When the file information of the target file has not been updated, the procedure ends.
In step S166, the index generation module 100 updates the directory index according to the updated file information, and stores the updated directory index.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure is protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2012103966611 | Oct 2012 | CN | national |