CN109358811B - Storage device management method and device and readable storage medium - Google Patents

Storage device management method and device and readable storage medium Download PDF

Info

Publication number
CN109358811B
CN109358811B CN201811155730.3A CN201811155730A CN109358811B CN 109358811 B CN109358811 B CN 109358811B CN 201811155730 A CN201811155730 A CN 201811155730A CN 109358811 B CN109358811 B CN 109358811B
Authority
CN
China
Prior art keywords
read
write algorithm
storage device
data
storage
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.)
Active
Application number
CN201811155730.3A
Other languages
Chinese (zh)
Other versions
CN109358811A (en
Inventor
段晖鹤
吴大畏
李晓强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Deyi Microelectronics Co ltd
Original Assignee
Yeestor Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yeestor Microelectronics Co ltd filed Critical Yeestor Microelectronics Co ltd
Priority to CN201811155730.3A priority Critical patent/CN109358811B/en
Publication of CN109358811A publication Critical patent/CN109358811A/en
Application granted granted Critical
Publication of CN109358811B publication Critical patent/CN109358811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0634Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a storage device management method, a storage device management device and a computer readable storage medium. The storage device management method comprises the following steps: when the storage equipment meets a preset acquisition condition, acquiring data type information of data in the storage equipment; determining a reading and writing algorithm corresponding to the user habit according to the data type information; judging whether the current read-write algorithm of the storage equipment is matched with the read-write algorithm corresponding to the habit of the user or not; and if the current read-write algorithm of the storage equipment is not matched with the read-write algorithm corresponding to the user habit, switching the current read-write algorithm into the read-write algorithm matched with the user habit. The invention has the advantage of improving the read-write speed of the storage device.

Description

Storage device management method and device and readable storage medium
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method and an apparatus for managing a storage device, and a readable storage medium.
Background
In the prior art, the performance of the storage device is mainly reflected in the read-write speed, and the read-write speed of data is reduced because the existing memory adopts the same read-write algorithm for all data to be stored in the read-write process.
Disclosure of Invention
The invention mainly aims to provide a storage device management method, a storage device management device and a readable storage medium, and aims to solve the problem that the read-write speed of a storage device is reduced in the prior art.
In order to achieve the above object, the present invention provides a storage device management method, including the following steps:
when the storage equipment meets a preset acquisition condition, acquiring data type information of data in the storage equipment;
determining a reading and writing algorithm corresponding to the user habit according to the data type information;
judging whether the current read-write algorithm of the storage equipment is matched with the read-write algorithm corresponding to the habit of the user or not;
and if the current read-write algorithm of the storage equipment is not matched with the read-write algorithm corresponding to the user habit, switching the current read-write algorithm into the read-write algorithm matched with the user habit.
Preferably, when the storage device meets the preset obtaining condition, the step of obtaining the data type information of the data in the storage device includes:
judging whether the storage times of the storage equipment reach preset times or not;
if yes, executing the step of obtaining the data type information of the data in the storage device.
Preferably, when the storage device meets a preset obtaining condition, the step of obtaining the data type information of the data stored in the storage device includes:
judging whether the storage capacity of the storage equipment reaches a preset storage capacity or not;
if yes, executing the step of obtaining the data type information of the data in the storage device.
Preferably, the types of the data include large data and small data, and the step of obtaining the data type information of the data in the storage device includes:
acquiring the storage ratio of the large data and the small data in the storage equipment;
the step of determining the reading and writing algorithm corresponding to the user habit according to the data type information comprises the following steps:
if the storage proportion of the large data exceeds a preset proportion, determining a read-write algorithm corresponding to user habits as a first read-write algorithm;
if the storage ratio of the small data exceeds the preset ratio, determining that the read-write algorithm corresponding to the habit of the user is a second read-write algorithm;
and if the storage occupation ratio of the small data and the large data does not exceed the preset occupation ratio, determining that the read-write algorithm corresponding to the habit of the user is the third read-write algorithm.
Preferably, the types of the data include large data and small data, and the step of obtaining the data type information of the data in the storage device includes:
acquiring the storage ratio of the large data and the small data in the storage equipment;
the step of determining the reading and writing algorithm corresponding to the user habit according to the data type information comprises the following steps:
if the storage proportion of the large data is larger than that of the small data, determining that a read-write algorithm corresponding to user habits is a first read-write algorithm;
if the storage proportion of the large data is smaller than that of the small data, determining that the read-write algorithm corresponding to the user habit is a second read-write algorithm;
and if the storage proportion of the large data is equal to that of the small data, determining that the read-write algorithm corresponding to the habit of the user is a third read-write algorithm.
Preferably, before the step of switching the current read-write algorithm to the read-write algorithm matched with the habit of the user, the method further comprises the step of switching the current read-write algorithm to the read-write algorithm matched with the habit of the user
Judging whether the storage equipment is in an idle state or not;
if yes, executing the read-write algorithm which is matched with the user habit and is switched to the current read-write algorithm.
Preferably, the step of switching the current read-write algorithm to the read-write algorithm matched with the habit of the user includes:
detecting whether the storage equipment carries out read-write operation in real time in the process of switching the read-write algorithm;
if yes, stopping the switching process of the read-write algorithm, and judging whether the storage equipment is in an idle state again.
Preferably, the step of switching the current read-write algorithm to the read-write algorithm matched with the habit of the user includes: and in the process of switching the read-write algorithm, outputting the progress information of the switching process of the read-write algorithm to a user.
In order to achieve the above object, the present invention provides a storage device management apparatus, including: a memory, a processor and a storage device management program stored on the memory and executable on the processor, the storage device management program when executed by the processor implementing the steps of the storage device management method as described above.
In addition, in order to achieve the above object, the present invention further provides a computer-readable storage medium, wherein a storage device management program is stored on the computer-readable storage medium, and when executed by a processor, the storage device management program implements the steps of the storage device management method as described above.
According to the storage device management method, the storage device management device and the computer readable storage medium, whether the storage device meets the preset acquisition condition is judged, when the storage device meets the preset acquisition condition, data type information of data in the storage device is acquired, so that the use habits of users on the storage device are determined according to the data types, different use habits of the users correspond to different read-write algorithms, whether the current read-write algorithm is matched with the read-write algorithm corresponding to the user habits is judged, if the current read-write algorithm is not matched with the read-write algorithm corresponding to the user habits, the read-write operation on the storage device can reach the optimal read-write speed only under the condition that the read-write algorithm is matched with the data types, and therefore the read-write efficiency of the storage device is improved.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a storage device management method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a storage device management method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a storage device management method according to a third embodiment of the present invention;
FIG. 5 is a flowchart illustrating a storage device management method according to a fourth embodiment of the present invention;
FIG. 6 is a flowchart illustrating a fifth embodiment of a storage device management method according to the present invention;
FIG. 7 is a flowchart illustrating a storage device management method according to a sixth embodiment of the present invention;
FIG. 8 is a flowchart illustrating a storage device management method according to a seventh embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows:
when the storage equipment meets a preset acquisition condition, acquiring data type information of data in the storage equipment;
determining a reading and writing algorithm corresponding to the user habit according to the data type information;
judging whether the current read-write algorithm of the storage equipment is matched with the read-write algorithm corresponding to the habit of the user or not;
and if the current read-write algorithm of the storage equipment is not matched with the read-write algorithm corresponding to the user habit, switching the current read-write algorithm into the read-write algorithm matched with the user habit.
In the prior art, the performance of the storage device is mainly reflected in the read-write speed, and the read-write speed of data is reduced because the existing memory adopts the same read-write algorithm for all data to be stored in the read-write process.
According to the storage device management method, the storage device management device and the computer readable storage medium, whether the storage device meets the preset acquisition condition is judged, when the storage device meets the preset acquisition condition, data type information of data in the storage device is acquired, so that the use habits of users on the storage device are determined according to the data types, different use habits of the users correspond to different read-write algorithms, whether the current read-write algorithm is matched with the read-write algorithm corresponding to the user habits is judged, if the current read-write algorithm is not matched with the read-write algorithm corresponding to the user habits, the read-write operation on the storage device can reach the optimal read-write speed only under the condition that the read-write algorithm is matched with the data types, and therefore the read-write efficiency of the storage device is improved.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a storage device management program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a storage device management program stored in the memory 1005 and perform the following operations:
when the storage equipment meets a preset acquisition condition, acquiring data type information of data in the storage equipment;
determining a reading and writing algorithm corresponding to the user habit according to the data type information;
judging whether the current read-write algorithm of the storage equipment is matched with the read-write algorithm corresponding to the habit of the user or not;
and if the current read-write algorithm of the storage equipment is not matched with the read-write algorithm corresponding to the user habit, switching the current read-write algorithm into the read-write algorithm matched with the user habit.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
judging whether the storage times of the storage equipment reach preset times or not;
if yes, executing the step of obtaining the data type information of the data in the storage device.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
judging whether the storage capacity of the storage equipment reaches a preset storage capacity or not;
if yes, executing the step of obtaining the data type information of the data in the storage device.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
acquiring the storage ratio of the large data and the small data in the storage equipment;
if the storage proportion of the large data exceeds a preset proportion, determining a read-write algorithm corresponding to user habits as a first read-write algorithm;
if the storage ratio of the small data exceeds the preset ratio, determining that the read-write algorithm corresponding to the habit of the user is a second read-write algorithm;
and if the storage occupation ratio of the small data and the large data does not exceed the preset occupation ratio, determining that the read-write algorithm corresponding to the habit of the user is the third read-write algorithm.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
acquiring the storage ratio of the large data and the small data in the storage equipment;
if the storage proportion of the large data is larger than that of the small data, determining that a read-write algorithm corresponding to user habits is a first read-write algorithm;
if the storage proportion of the large data is smaller than that of the small data, determining that the read-write algorithm corresponding to the user habit is a second read-write algorithm;
and if the storage proportion of the large data is equal to that of the small data, determining that the read-write algorithm corresponding to the habit of the user is a third read-write algorithm.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
judging whether the storage equipment is in an idle state or not;
if yes, executing the read-write algorithm which is matched with the user habit and is switched to the current read-write algorithm.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
detecting whether the storage equipment carries out read-write operation in real time in the process of switching the read-write algorithm;
if yes, stopping the switching process of the read-write algorithm, and judging whether the storage equipment is in an idle state again.
Further, the processor 1001 may call a storage device management program stored in the memory 1005, and also perform the following operations:
and in the process of switching the read-write algorithm, outputting the progress information of the switching process of the read-write algorithm to a user.
Referring to fig. 2, a storage device management method according to a first embodiment of the present invention includes:
and step S10, acquiring the data type information of the data in the storage device when the storage device meets the preset acquisition condition.
In this embodiment, the storage device meeting the preset obtaining condition includes, but is not limited to, that the storage device reaches a preset number of times of use, that the storage device reaches a preset use time, and/or that data stored in the storage device reaches a preset storage capacity; the types of the data include, but are not limited to, large data (large files) and small data (small files), and when the data type information of the data in the storage device is obtained, the large data (large files) and the small data are in proportion to all the data in the storage device.
Specifically, the large data and the small data are divided according to actual use conditions, for example, when the division standard is 8Kb, data larger than or equal to 8Kb is taken as the large data, and data smaller than or equal to 8Kb is taken as the large data; the partitioning criteria may also be 16Kb, 1Mb, etc.
Step S20, determining a reading and writing algorithm corresponding to the user habit according to the data type information;
in this embodiment, by obtaining the occupation ratios of different data types in the storage device, according to a data type with a larger storage occupation ratio, it may be determined that a user frequently accesses the data type with the larger storage occupation ratio, so as to determine that the usage habit of the user is the frequent access of the data type with the larger storage occupation ratio, and each data type corresponds to a different read-write algorithm, so as to determine the read-write algorithm corresponding to the user habit according to the data type information.
Specifically, the multiple read-write algorithms corresponding to different data types may be written in advance when the storage device is produced, or may be written in the storage device as needed in a later-stage user use process; the storage device can achieve maximum speed when using a read-write algorithm corresponding to the data type.
Step S30, judging whether the current read-write algorithm of the storage device is matched with the read-write algorithm corresponding to the habit of the user;
in this embodiment, when a current algorithm is used to perform a read operation on data, the same type of data has different read-write speeds for different read-write algorithms, when the current algorithm is used to perform the read operation on the data, the read-write algorithm corresponding to the habit of the user is determined to be mismatched when the current algorithm cannot reach the preset read-write speed, and when the current algorithm is used to perform the read operation on the data, the read-write algorithm corresponding to the habit of the user is determined to be matched when the current algorithm reaches or even exceeds the preset read-write speed.
Or, the data and the read-write algorithm corresponding to the data type of the data are marked in consistency, and when the marking mode of the data is in conflict with the marking mode of the current read-write algorithm, the current read-write algorithm is judged to be not matched with the read-write algorithm corresponding to the habit of the user.
And step S40, if the current read-write algorithm of the storage device is not matched with the read-write algorithm corresponding to the user habit, switching the current read-write algorithm to the read-write algorithm matched with the user habit.
In summary, according to the method, the apparatus, and the computer-readable storage medium for managing a storage device provided in the embodiments of the present invention, whether the storage device meets a preset acquisition condition is determined, and when the storage device meets the preset acquisition condition, data type information of data in the storage device is acquired, so that usage habits of a user on the storage device are determined according to the data type, and different usage habits of the user correspond to different read-write algorithms, and whether the current read-write algorithm matches the read-write algorithm corresponding to the user habit is determined, if not, the current read-write algorithm is switched to the read-write algorithm matching the user habit, and only when the read-write algorithm matches the data type, the read-write operation on the storage device can reach an optimal read-write speed, so that the read-write efficiency of the storage device is improved.
Referring to fig. 3, a second embodiment of the storage device management method according to the present invention, based on the above embodiment shown in fig. 2, preferably, the step S10 includes:
step S11, judging whether the storage frequency of the storage device reaches a preset frequency;
in step S12, if yes, the step of obtaining the data type information of the data in the storage device is executed.
In this embodiment, the preset times are obtained according to historical experience, and the larger the preset times, the more accurate the data type information is obtained, and the more accurate the habit of the user is analyzed.
Referring to fig. 4, a third embodiment of the storage device management method according to the present invention, based on the above embodiment shown in fig. 2, preferably, the step S10 includes:
step S13, judging whether the storage capacity of the storage device reaches a preset storage capacity;
in step S14, if yes, the step of obtaining the data type information of the data in the storage device is executed.
In this embodiment, the preset storage capacity may be obtained according to historical experience, and may be set to 20% -50% of the storage device capacity. It should be noted that step S13 may be only the operation performed on the storage device during the initial use, and after the usage habit of the user is determined, step S13 does not need to be performed each time the storage device is used, so as to avoid the influence on the normal use of the storage device caused by performing step S13 each time.
Referring to fig. 5, a fourth embodiment of the storage device management method according to the present invention, based on the above embodiments shown in fig. 2 to 4, preferably, the step S10 further includes:
step S15A, acquiring the storage ratio of the large data and the small data in the storage equipment;
the step S20 includes:
step S16A, if the storage proportion of the large data exceeds a preset proportion, determining that the read-write algorithm corresponding to the habit of the user is a first read-write algorithm;
step S17A, if the storage ratio of the small data exceeds the preset ratio, determining that the read-write algorithm corresponding to the habit of the user is a second read-write algorithm;
and step S18A, if the storage occupation ratio of the small data and the large data does not exceed the preset occupation ratio, determining that the read-write algorithm corresponding to the habit of the user is the third read-write algorithm.
In this embodiment, if the storage proportion of the large data exceeds a preset proportion, for example, 50%, it may be determined that the user is used to access the large data frequently, and then a first read-write algorithm is started when performing read-write operation on the storage device;
if the storage proportion of the small data exceeds a preset proportion, such as 50%, it can be judged that the user is used to frequently access the small data, and then a second read-write algorithm is started when the storage device is subjected to read-write operation;
if the storage percentage of the small data and the large data does not exceed the preset percentage, such as 50%, it can be determined that the frequency of the large data and the frequency of the small data are approximately the same, the types of the accessed data are relatively balanced, and then a third read-write algorithm is started when the storage device is subjected to read-write operation.
Referring to fig. 6, a fifth embodiment of the storage device management method according to the present invention, based on the above embodiments shown in fig. 2 to 4, preferably, the step S10 further includes:
step S15B, acquiring the storage ratio of the large data and the small data in the storage equipment;
the step S20 includes:
step S16B, if the storage proportion of the large data is larger than that of the small data, determining that the read-write algorithm corresponding to the habit of the user is a first read-write algorithm;
step S17B, if the storage proportion of the large data is smaller than that of the small data, determining that the read-write algorithm corresponding to the habit of the user is a second read-write algorithm;
and step S18B, if the storage proportion of the large data is equal to that of the small data, determining that the read-write algorithm corresponding to the habit of the user is a third read-write algorithm.
In this embodiment, if the storage proportion of the large data is greater than that of the small data, and the storage capacity of the large data is greater than that of the small data, it may be determined that the user is used to access the large data more often, and then a first read-write algorithm is started when performing read-write operation on the storage device;
if the storage proportion of the small data exceeds that of the large data, the storage capacity of the small data is larger than that of the large data, the habit of a user can be judged to be that the small data is accessed more often, and then a second read-write algorithm is started when the storage equipment is read and written;
if the storage proportion of the large data is equal to that of the small data, the habit of the user can be judged to be that the large data and the small data are frequently accessed, the frequency of accessing the large data and the frequency of accessing the small data are relatively balanced, and then a third read-write algorithm is started when the storage device is subjected to read-write operation.
Specifically, the minimum erase unit of the memory device is a block, the block further includes several pages, and a page is used as the minimum read-write unit of the memory device, then:
the read-write principle of the first read-write algorithm is as follows: the logical data addresses transmitted by the universal serial bus are continuous, and exceed the division standard, such as 8K, the logical data addresses are large data, 8K data are taken out, one page is directly written to be full (the storage page of the storage device corresponds to 8K), all data are circularly taken out and written into a corresponding physical page according to L2P (the logical corresponding physical page), and the direct reading and writing speed is fastest.
The read-write principle of the second read-write algorithm is as follows: when the continuous data of the logical address transmitted by the universal serial bus is smaller than the division standard, for example, 8K is small data, all data are directly taken out and written into one page of a block of a fast buffer storage area (Cache) (the storage page of the storage device is correspondingly 8K), when 1024 pages of the block of the fast buffer storage area (Cache) are fully written (each block of the storage device comprises 1024 pages), and then the data of the 1024 pages of the block of the fast buffer storage area (Cache) are read and written into the logical pages sequentially according to 8K. After the writing is finished, the blocks of the Cache are erased, and the blocks enter a preparation state of the Cache for continuing the using process, so that the number of the blocks of the Cache is increased, and the reading and writing speed is increased.
The read-write principle of the third read-write algorithm is as follows: because of the use of blocks in Cache, there is a correspondence of a Cache block, consuming space in RAM (random access memory). Increasing the number of blocks in the Cache can reduce the number of times of recovery (i.e., moving data to a logical block), and increase the read-write speed. But is limited by the space of the RAM, the number of blocks of the fast buffer storage (Cache) is limited. The method is compatible with the read-write algorithm of the large data and the small data, and the RAM allocated to the large data and the RAM of the small data algorithm are smaller than the RAM specially used for the large data and the RAM specially used for the small data, so the speed is lower than the first special read-write algorithm and the second special read-write algorithm.
Referring to fig. 7, a sixth embodiment of the storage device management method according to the present invention, based on the above-mentioned embodiments shown in fig. 2 to 6, preferably, before the step S40, further includes
Step S50, determining whether the storage device is in an idle state;
if yes, go to step S40.
In this embodiment, before performing the read-write algorithm switching, it is determined whether the storage device is in an idle state, so that the read-write algorithm switching is avoided being forced when the storage device is in a read-write state, and the normal use of the storage device is avoided being affected.
Referring to fig. 8, a seventh embodiment of the storage device management method according to the present invention, based on the above embodiments shown in fig. 2 to 7, preferably, the step S40 includes:
step S41, detecting whether the storage device carries out read-write operation in real time in the process of switching the read-write algorithm;
and step S42, if yes, stopping the switching process of the read-write algorithm, and judging whether the storage equipment is in an idle state again.
In this embodiment, in the process of switching the read-write algorithm, if it is detected that the storage device is to perform the read-write operation, the process of switching the read-write algorithm is stopped, and whether the storage device is in an idle state is determined again, so as to avoid affecting the normal use of the storage device.
More preferably, since the switching process of the read-write algorithm often requires several hours, the current time is acquired before the step S40 is performed, and the step S40 is performed again when the current time is in the non-use period of the storage device, such as the early morning period, to prevent the switching process of the read-write algorithm from being interrupted.
In an eighth embodiment of the storage device management method according to the present invention, based on the above embodiments shown in fig. 2 to 8, preferably, the step S40 includes:
and step S43, outputting the progress information of the read-write algorithm switching process to the user in the read-write algorithm switching process.
In this embodiment, in the process of switching the read-write algorithm, the progress information of the switching process of the read-write algorithm is output to the user, so that the user is prevented from performing read-write operation on the storage device in the process of switching the read-write algorithm, and the read-write algorithm is prevented from being switched unsuccessfully and repeatedly.
In addition, an embodiment of the present invention further provides a storage device management apparatus, where the storage device management apparatus includes: the storage device management method comprises a memory, a processor and a storage device management program stored on the memory and capable of running on the processor, wherein the storage device management program realizes the steps of the storage device management method according to the above embodiments when being executed by the processor.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a storage device management program is stored on the computer-readable storage medium, and when the storage device management program is executed by a processor, the steps of the storage device management method according to the above embodiments are implemented.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A storage device management method, characterized by comprising the steps of:
when the storage equipment meets a preset acquisition condition, acquiring data type information of data in the storage equipment;
determining a reading and writing algorithm corresponding to the user habit according to the data type information;
judging whether the current read-write algorithm of the storage equipment is matched with the read-write algorithm corresponding to the habit of the user or not;
if the current read-write algorithm of the storage equipment is not matched with the read-write algorithm corresponding to the user habit, switching the current read-write algorithm into the read-write algorithm matched with the user habit;
the data type comprises large data and small data, and the step of acquiring the data type information of the data in the storage device comprises the following steps:
acquiring the storage ratio of the large data and the small data in the storage equipment;
the step of determining the reading and writing algorithm corresponding to the user habit according to the data type information comprises the following steps:
if the storage proportion of the large data exceeds a preset proportion, determining a read-write algorithm corresponding to user habits as a first read-write algorithm;
if the storage ratio of the small data exceeds the preset ratio, determining that the read-write algorithm corresponding to the habit of the user is a second read-write algorithm;
if the storage occupation ratio of the small data and the large data does not exceed the preset occupation ratio, determining that the read-write algorithm corresponding to the user habit is a third read-write algorithm;
or, the step of determining the reading and writing algorithm corresponding to the user habit according to the data type information includes:
if the storage proportion of the large data is larger than that of the small data, determining that a read-write algorithm corresponding to user habits is a first read-write algorithm;
if the storage proportion of the large data is smaller than that of the small data, determining that the read-write algorithm corresponding to the user habit is a second read-write algorithm;
and if the storage proportion of the large data is equal to that of the small data, determining that the read-write algorithm corresponding to the habit of the user is a third read-write algorithm, wherein the read-write principles corresponding to the first read-write algorithm, the second read-write algorithm and the third read-write algorithm are different.
2. The storage device management method according to claim 1, wherein the step of acquiring the data type information of the data in the storage device when the storage device satisfies the preset acquisition condition comprises:
judging whether the storage times of the storage equipment reach preset times or not;
if yes, executing the step of obtaining the data type information of the data in the storage device.
3. The storage device management method according to claim 1, wherein the step of acquiring the data type information of the data stored in the storage device when the storage device satisfies a preset acquisition condition comprises:
judging whether the storage capacity of the storage equipment reaches a preset storage capacity or not;
if yes, executing the step of obtaining the data type information of the data in the storage device.
4. The storage device management method according to claim 1, further comprising, before the step of switching the current read-write algorithm to a read-write algorithm matching the user habit, a step of switching the current read-write algorithm to a read-write algorithm matching the user habit
Judging whether the storage equipment is in an idle state or not;
if yes, executing the read-write algorithm which is matched with the user habit and is switched to the current read-write algorithm.
5. The storage device management method according to claim 4, wherein the step of switching the current read-write algorithm to a read-write algorithm matching the user habit comprises:
detecting whether the storage equipment carries out read-write operation in real time in the process of switching the read-write algorithm;
if yes, stopping the switching process of the read-write algorithm, and judging whether the storage equipment is in an idle state again.
6. The storage device management method according to claim 4, wherein the step of switching the current read-write algorithm to a read-write algorithm matching the user habit comprises:
and in the process of switching the read-write algorithm, outputting the progress information of the switching process of the read-write algorithm to a user.
7. A storage device management apparatus, characterized in that the storage device management apparatus comprises: memory, a processor and a storage device management program stored on the memory and executable on the processor, the storage device management program when executed by the processor implementing the steps of the storage device management method according to any of claims 1 to 6.
8. A readable storage medium, having stored thereon a storage device management program, which when executed by a processor implements the steps of the storage device management method according to any one of claims 1 to 6.
CN201811155730.3A 2018-09-30 2018-09-30 Storage device management method and device and readable storage medium Active CN109358811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811155730.3A CN109358811B (en) 2018-09-30 2018-09-30 Storage device management method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811155730.3A CN109358811B (en) 2018-09-30 2018-09-30 Storage device management method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN109358811A CN109358811A (en) 2019-02-19
CN109358811B true CN109358811B (en) 2021-10-01

Family

ID=65348486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811155730.3A Active CN109358811B (en) 2018-09-30 2018-09-30 Storage device management method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN109358811B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112068776A (en) * 2020-09-02 2020-12-11 深圳市硅格半导体有限公司 Adaptive adjustment method, system, device and medium for memory management algorithm

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7783839B2 (en) * 2007-01-08 2010-08-24 International Business Machines Corporation Using different algorithms to destage different types of data from cache
CN100530138C (en) * 2007-06-28 2009-08-19 忆正存储技术(深圳)有限公司 Self-adaptive control method based on multi-passage flash memory apparatus logic strip
CN101923514A (en) * 2010-08-27 2010-12-22 深圳市江波龙电子有限公司 Management method and system of flash memory equipment
US9563371B2 (en) * 2013-07-26 2017-02-07 Globalfoundreis Inc. Self-adjusting phase change memory storage module
US9542104B2 (en) * 2013-08-05 2017-01-10 Western Digital Technologies, Inc. System and method for controlling a storage device
CN104834478B (en) * 2015-03-25 2018-05-22 中国科学院计算技术研究所 A kind of data write-in and read method based on isomery mixing storage device
CN105824667A (en) * 2016-03-15 2016-08-03 深圳市硅格半导体股份有限公司 Management method, device and system for storage equipment

Also Published As

Publication number Publication date
CN109358811A (en) 2019-02-19

Similar Documents

Publication Publication Date Title
CN110489382B (en) Processing method, system and storage medium for cloud mobile phone game progress data
US10191856B2 (en) Method of managing web browser cache size using logical relationships and clustering
CN108881396B (en) Network data loading method, device, equipment and computer storage medium
EP3404538B1 (en) Data processing method, and data processing apparatus
CN108287708B (en) Data processing method and device, server and computer readable storage medium
CN109656779A (en) Internal memory monitoring method, device, terminal and storage medium
US20190004829A1 (en) Method, device and user terminal for loading application
CN110321075B (en) Data migration method, device, equipment and storage medium based on nbd equipment
CN107391038B (en) Data writing method of data storage type flash memory, flash memory and storage medium
CN111104178A (en) Dynamic library loading method, terminal device and storage medium
CN112235433A (en) Domain name access method and device
CN109358811B (en) Storage device management method and device and readable storage medium
CN116028455A (en) Data processing method and device, storage medium and electronic equipment
CN110222046B (en) List data processing method, device, server and storage medium
CN109656592B (en) Card management method, device, terminal and computer readable storage medium
CN114553762A (en) Method and device for processing flow table items in flow table
CN111444117B (en) Method and device for realizing fragmentation of storage space, storage medium and electronic equipment
CN111008079B (en) Process management method, device, storage medium and electronic equipment
CN110933070A (en) User identification method, system, equipment and computer readable storage medium
US20030162559A1 (en) Mobile communications terminal, information transmitting system and information receiving method
JP2018525724A (en) Automatic memory management using a memory management device
CN109634484A (en) A kind of application icon display methods and terminal, storage medium
CN111708715B (en) Memory allocation method, memory allocation device and terminal equipment
CN107066270B (en) Information acquisition method and terminal
CN112115693B (en) Method and device for exporting Word document with dynamic rendering chart and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518000 area a, 7th floor, building A1, Shenzhen digital technology park, 17 Gaoxin South 7th Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Deyi Microelectronics Co.,Ltd.

Address before: 518000 09-2, 10-11 unit, 6 building, Changhong science and technology building, 18 South Road, science and Technology Park, Nanshan District, Shenzhen, Guangdong, China 18

Patentee before: YEESTOR MICROELECTRONICS Co.,Ltd.