CN113687789A - Processing method and device and electronic equipment - Google Patents

Processing method and device and electronic equipment Download PDF

Info

Publication number
CN113687789A
CN113687789A CN202111013477.XA CN202111013477A CN113687789A CN 113687789 A CN113687789 A CN 113687789A CN 202111013477 A CN202111013477 A CN 202111013477A CN 113687789 A CN113687789 A CN 113687789A
Authority
CN
China
Prior art keywords
storage space
frequency
frequency storage
low
data
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.)
Pending
Application number
CN202111013477.XA
Other languages
Chinese (zh)
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202111013477.XA priority Critical patent/CN113687789A/en
Publication of CN113687789A publication Critical patent/CN113687789A/en
Pending legal-status Critical Current

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/0608Saving storage space on storage systems
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

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 application discloses a processing method, a processing device and an electronic device, aiming at a storage component of the electronic device, such as a flash memory or a solid state disk, which is divided into a high frequency storage space and a low frequency storage space by the present application, by adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component in the execution cycle, so as to adjust the proportional relation of the high-frequency storage space and the low-frequency storage space, and adjusting the stored data in the high-frequency storage space so that the data of the file which needs to be accessed at high frequency in the next using period of the electronic equipment is located in the high-frequency storage space, thereby realizing the dynamic adjustment of the sizes of the high-frequency storage space and the low-frequency storage space in the storage component according to the actual requirement, and dynamically adjusting the content in the high-frequency storage space so that the content in the high-frequency storage space is the data which needs to be accessed at high frequency, and further achieving the balance of aspects of access speed, storage space saving and the like.

Description

Processing method and device and electronic equipment
Technical Field
The present application belongs to the technical field of data storage, and in particular, to a processing method, an apparatus and an electronic device.
Background
SLC (Single-Level Cell), MLC (Multi-Level Cell), TLC (triple-Level Cell), are different types of storage particles, wherein one SLC particle stores 1bit information, and is characterized by high performance (fast read-write speed, high reliability), long service life, but low capacity and high cost, one MLC particle stores 2bit information, and one TLC particle stores 3bit information, and the performance/service life of SLC, MLC, TLC are reduced in sequence, and the capacity is improved in sequence.
At present, a commonly used data storage scheme is that, for a flash memory or a Solid State Disk (SSD), a system manufacturer may fixedly allocate a ratio for different types of storage particles, and balance various characteristics of data storage, such as performance and capacity, by maintaining the different types of storage particles in the flash memory or the Solid State Disk.
Disclosure of Invention
Therefore, the application discloses the following technical scheme:
a method of processing, the method comprising:
in the Nth service cycle, an operating system of the electronic equipment carries out read/write operation on a storage component of the electronic equipment according to a read-write control strategy; the storage space of the storage component is divided into a high-frequency storage space and a low-frequency storage space; the high-frequency storage space and the low-frequency storage space are in a first proportional relation;
in the execution cycle, adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component to enable the high-frequency storage space and the low-frequency storage space to be in a second proportional relation, and adjusting the storage data in the high-frequency storage space to enable the data of the file which needs to be accessed by the electronic equipment in the (N + 1) th use cycle to be located in the high-frequency storage space.
Optionally, the size of the high-frequency storage space is matched with the data size of the storage data in the high-frequency storage space.
Optionally, the read-write control policy includes:
if the file belongs to a high-frequency access file, writing the data of the file into the high-frequency storage space; if the file belongs to a low-frequency access file, writing the data of the file into the low-frequency storage space;
if the file belongs to the high-frequency storage space, reading the data of the file from the high-frequency storage space; and if the file belongs to the low-frequency storage space, reading the data of the file from the low-frequency storage space.
Optionally, the storage component is a flash memory or a solid state disk;
the adjusting the storage data in the high-frequency storage space comprises:
migrating the first storage data in the high-frequency storage space to a memory, and writing the first storage data into the low-frequency storage space from the memory;
and/or migrating second storage data in the low-frequency storage space to a memory, and writing the second storage data into the high-frequency storage space from the memory;
the first storage data is data which is converted into the high-frequency storage space and does not need high-frequency access in the (N + 1) th usage cycle, and the second storage data is data which is converted into the low-frequency storage space and needs high-frequency access in the (N + 1) th usage cycle.
Optionally, the adjusting the sizes of the high frequency storage space and the low frequency storage space of the storage component includes:
determining files needing high-frequency access in the (N + 1) th use cycle;
determining the data volume of the file needing high-frequency access, and determining the size of the high-frequency storage space according to the data volume of the file needing high-frequency access;
and adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component according to the determined size of the high-frequency storage space.
Optionally, the execution cycle is triggered by a predetermined execution cycle trigger condition; the execution cycle trigger condition includes: a device state condition and/or a time condition characterizing the device being idle.
Optionally, the storage component is a memory.
Optionally, before performing the read/write operation on the storage component of the electronic device, the method further includes:
and in the Nth service cycle, loading the storage data meeting the access condition in the high-frequency storage space of the storage component to the memory of the electronic equipment in advance.
A processing apparatus, the apparatus comprising:
the access processing module is used for performing read/write operation on a storage component of the electronic equipment by an operating system of the electronic equipment according to a read-write control strategy in the Nth service cycle; the storage space of the storage component is divided into a high-frequency storage space and a low-frequency storage space; the high-frequency storage space and the low-frequency storage space are in a first proportional relation;
and the adjusting module is used for adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component in an execution cycle so as to enable the high-frequency storage space and the low-frequency storage space to be in a second proportional relation, and adjusting the storage data in the high-frequency storage space so as to enable the data of the file which needs to be accessed at high frequency and is located in the high-frequency storage space when the electronic equipment is in the (N + 1) th use cycle.
An electronic apparatus includes a storage section divided into a high frequency storage space and a low frequency storage space;
the electronic device has embodied thereon a set of computer instructions which, when executed, is operable to perform a processing method as any one of the above.
As can be seen from the above solutions, the processing method, the processing apparatus and the electronic device disclosed in the present application are applicable to a storage component of an electronic device, such as a flash memory or a solid state disk, which is divided into a high frequency storage space and a low frequency storage space, by adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component in the execution cycle, so as to adjust the proportional relation of the high-frequency storage space and the low-frequency storage space, and adjusting the stored data in the high-frequency storage space so that the data of the file which needs to be accessed at high frequency in the next using period of the electronic equipment is located in the high-frequency storage space, thereby realizing the dynamic adjustment of the sizes of the high-frequency storage space and the low-frequency storage space in the storage component according to the actual requirement, and dynamically adjusting the content in the high-frequency storage space so that the content in the high-frequency storage space is the data which needs to be accessed at high frequency, and further achieving the balance of aspects of access speed, storage space saving and the like.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a graph showing the comparative effect of the amount of information that can be stored in SLC particles, MLC particles and TLC particles, respectively;
FIG. 2 is a schematic flow diagram of a processing method provided herein;
FIG. 3 is an exemplary diagram of a high and low frequency memory space division of a memory device provided by the present application;
FIG. 4 is a diagram of a process for adjusting the size of the high and low frequency storage spaces of a storage unit provided herein;
FIG. 5 is a schematic diagram of an operating system dynamically analyzing and resizing SLC/TLC space and storing files;
FIG. 6 is another schematic flow diagram of the treatment method provided herein;
fig. 7 is a configuration diagram of a processing apparatus according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, the following explanation will be made for technical terms or abbreviations referred to in the embodiments of the present application:
SLC: each Cell unit stores 1bit information, namely only two voltage changes of 0 and 1, the structure is simple, the voltage control is rapid, and the reflected characteristics are long service life, strong performance, and the P/E (program/erase) service life of 1 ten thousand to 10 ten thousand times, but the defects are low capacity and high cost.
MLC: each cell stores 2bit information, requiring more complicated voltage control, with four variations of 00, 01, 10, and 11, which also means that the write performance and reliability are further reduced compared to SLC. The P/E lifetime varies between 3000 and 5000 times according to different processes.
TLC: each cell stores 3-bit information, the voltage changes from 000 to 111 in 8 types, the capacity is increased 1/3 again compared with the MLC, the cost is lower, but the structure is more complex, the P/E programming time is long, the writing speed is slow, the P/E service life is reduced to 1000 times and 3000 times, and partial conditions are lower.
The applicant has found that in the existing scheme of fixedly allocating a proportion of storage for different types of storage particles (e.g. SLC, MLC, TLC) by a system manufacturer, when SLC is written to a certain amount, the performance is significantly degraded because the proportion of different types of storage particles is fixed, and after the certain amount is written, the SLC is about to be written to full or already written to full, and the data to be written is written to the SLC without moving a part of data out of the SLC, and when the SLC is not fully stored, the storage space is wasted.
In order to solve the above problems and achieve balance of access speed, storage space saving and the like, embodiments of the present application disclose a processing method, an apparatus and an electronic device.
The processing methods disclosed herein may be applied to electronic devices, which may be numerous general purpose or special purpose computing device environments or configured devices. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
Referring to the flow diagram of the processing method provided in fig. 2, the processing method disclosed in the present application specifically includes:
step 201, in the nth use period, the operating system of the electronic device performs read/write operations on the storage component of the electronic device according to the read/write control strategy.
Wherein N is an integer greater than 0.
The storage unit may be any one of a flash memory, a solid-state disk, or a memory, and is not limited herein.
The storage space of the storage component is divided into a high-frequency storage space and a low-frequency storage space, for example, a flash memory, or a solid-state disk, or a memory is divided into a high-frequency storage space and a low-frequency storage space. In addition, the sizes of the high-frequency storage space and the low-frequency storage space in the storage component are dynamically allocated, that is, the proportional relation between the high-frequency storage space and the low-frequency storage space is dynamic, and may be different in different use periods. In the nth use period, the high-frequency storage space and the low-frequency storage space are in a first proportional relation.
In this embodiment, the high frequency and the low frequency of the high frequency storage space and the low frequency storage space obtained by dividing the storage space of the storage component are opposite, the high frequency storage space supports high-rate data read/write operations, and the low frequency storage space only supports low-rate data read/write operations (relative to the read/write rate of the high frequency storage space). But the data amount of the data stored by one storage particle in the high-frequency storage space is lower than that of the data stored by one storage particle in the low-frequency storage space.
The high frequency storage space and the low frequency storage space of the storage component can be, but are not limited to, the following division cases:
11) high-frequency storage space: SLC space consisting of a certain number of SLC particles;
low-frequency storage space: a TLC space consisting of a number of TLC particles;
12) high-frequency storage space: SLC space consisting of a certain number of SLC particles;
low-frequency storage space: an MLC space consisting of a number of MLC particles;
13) high-frequency storage space: an MLC space consisting of a number of MLC particles;
low-frequency storage space: a TLC space consisting of a number of TLC particles;
14) high-frequency storage space: SLC space consisting of a certain number of SLC particles;
low-frequency storage space: a TLC space consisting of a number of TLC particles, and an MLC space consisting of a number of MLC particles.
The following are exemplified:
the applicant finds that the files read at high frequency on the Android system account for more than 70% of the I/O reading of the system, but the file volume does not exceed 4G, so that the hot files can be stored specially by dividing the 4G space on the storage component, such as a solid state disk, in the Android system into an SLC space, and other spaces are divided into TLC spaces, as shown in fig. 3 in particular, so that the I/O performance of 70% can be improved, and the file is very considerable. It should be noted that the 4G size of the SLC space is not always fixed, and during the subsequent use, the sizes of the SLC space and the TLC space may be dynamically adjusted according to the change of the high-frequency and low-frequency files (i.e. the change of different file access frequency), for example, a 12G TLC space in fig. 2 is adjusted to a 4G SLC space, and a total of 8G SLC spaces are obtained accordingly, etc.
In the embodiment of the present application, the use period and the execution period are two opposite concepts. The use period refers to a period in which an operating system of the electronic device performs read/write operations on stored data in the storage component based on user operations or service/function requirements of the system to achieve a required data access purpose; the execution cycle refers to a cycle in which the operating system of the electronic device dynamically adjusts the size of the high-frequency and low-frequency storage spaces of the storage unit and the storage data in the high-frequency storage space.
The usage period and the execution period may be completely non-overlapping or have a small amount of overlap in time.
The electronic device automatically enters a use period once the operating system detects a data read/write operation of a user on the interface of the electronic device or the system triggers a data read/write event based on business/function requirements.
Aiming at data read/write operation on a storage component in a use period, in order to achieve balance of access speed, storage space saving and the like, the application provides the following read-write control strategies:
21) if the file belongs to the high-frequency access file, writing the data of the file into a high-frequency storage space of the storage component; if the file belongs to the low-frequency access file, writing the data of the file into a low-frequency storage space of the storage component;
22) if the file belongs to the high-frequency storage space, reading data of the file from the high-frequency storage space; and if the file belongs to the low-frequency storage space, reading the data of the file from the low-frequency storage space.
In the use period, the operating system of the electronic equipment performs read/write operation on the storage component of the electronic equipment according to the read/write control strategy. Taking the above-mentioned storage space division case of 11) as an example, for hot files that are frequently read and written, the read/write operations of these hot files are performed in the SLC space to ensure high access performance to the hot files that are frequently accessed, while for files that are frequently accessed, the read/write operations of these files are performed in the TLC space to achieve the purpose of saving the storage space.
In the execution cycle, adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component so as to enable the high-frequency storage space and the low-frequency storage space to be in a second proportional relationship, and adjusting the storage data in the high-frequency storage space so as to enable the data of the file which needs to be accessed by the electronic device in the (N + 1) th use cycle to be located in the high-frequency storage space.
The execution cycle is triggered by a predetermined execution cycle trigger condition. The execution period trigger condition may be, but is not limited to being, set to include a device state condition and/or a time condition characterizing the device as idle.
Wherein, the device status condition may be, but not limited to, further set as: the method includes the steps of detecting that the device is in a screen locking state (such as screen locking charging and screen locking non-charging), or detecting that the progress number of the device is smaller than a preset threshold value, or detecting that any user application is not opened on the device, and the like.
The time condition may be, but is not limited to, further set to: it is detected that the current time is at night/morning for a predetermined period of time (e.g., 1:00-4:00 in the morning, etc.).
When the execution cycle triggering condition is satisfied, the triggering device enters an execution cycle.
In the execution cycle, the operating system dynamically adjusts the sizes of the high-frequency storage space and the low-frequency storage space of the storage component so that the high-frequency storage space and the low-frequency storage space are in a second proportional relationship, and referring to fig. 4, the process of adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component may be implemented as follows:
step 401, determining the file which needs high frequency access in the (N + 1) th usage period.
In the execution cycle, the operating system analyzes the access frequency change of the data files stored in the storage part in the historical use cycle (such as the last use cycle or several adjacent historical use cycles), determines whether the files with the access frequency changed at high and low frequencies exist, determines whether a new high-frequency file and/or a new low-frequency file is generated due to the change of the access frequency of the stored files, determines whether a new high-frequency file is generated based on a user operation or a system writing event, and the like, records the information at the same time, and determines the files needing high-frequency access in the next use cycle, namely the (N + 1) th use cycle according to the recorded information.
Further, optionally, the operating system may directly analyze and determine the file requiring high frequency access in the (N + 1) th usage cycle based on the detected, recorded or counted access information of different files (the file stored in the storage component in history or the file newly written in the storage component in the last usage cycle), and based on a preset threshold for distinguishing high frequency access from low frequency access. Wherein, the access information includes but is not limited to: the read/write type, the read/write time, the read/write times in a certain period of time, etc. of a certain file.
When the access frequency of a high-frequency access file in a history use period (such as the last use period or a plurality of adjacent history use periods) is changed to be lower than a set frequency threshold value, the high-frequency access file is judged to be changed from the low-frequency access, and otherwise, the high-frequency access is maintained. On the other hand, if the access frequency of a certain low-frequency access file in a history use period (such as the last use period or several adjacent history use periods) is changed to be higher than a set frequency threshold value, the low-frequency access file is judged to be changed from the low-frequency access to the high-frequency access, and otherwise, the low-frequency access is maintained.
Optionally, in another embodiment, the operating system may input the detected, recorded or counted access information of different files and the file information of the files into a pre-constructed artificial intelligence model, and the artificial intelligence model intelligently identifies the files based on the input information and feeds the files back to the operating system. The access information in this embodiment may also include, but is not limited to, information such as a read/write type of a file, a read/write time, a number of reads and writes within a certain period of time, and the file information includes, but is not limited to, whether the file belongs to a system file or an application file, an application file specifically belonging to which application, a property of the application (e.g., office, shopping, game, etc.), and the like. The artificial intelligence model identifies whether the files have high-frequency access type change or not, predicts whether the files belong to high-frequency access files of the next use period (the (N + 1) th use period) or not according to the input access information and file information, and the like.
The artificial intelligence model can be a model pre-trained based on a neural network.
In practical applications, for the two embodiments, on the basis of file access information detection, time information (e.g., weekday/weekend, working time/rest time, etc.) and/or use environment information (e.g., office, study, outdoor, etc.) of the previous use period and the next use period may be combined, so as to more intelligently determine the file that needs high-frequency access in the (N + 1) th use period. For the implementation mode based on the artificial intelligence model, sample feature learning about a time dimension and/or an environment dimension and association relation learning between the features and a prediction result (such as yes and no files needing high frequency access in the next period) need to be added in model training.
Step 402, determining the data size of the file needing high-frequency access, and determining the size of the high-frequency storage space according to the data size of the file needing high-frequency access.
On the basis of determining the file which needs high-frequency access in the (N + 1) th usage cycle, the operating system continuously determines the data volume of the file which needs high-frequency access, determines the size of a high-frequency storage space according to the data volume of the file which needs high-frequency access, and matches the determined size of the high-frequency storage space with the determined data volume of the file which needs high-frequency access, so that the size of the high-frequency storage space is finally matched with the data volume of storage data (high-frequency access file) in the high-frequency storage space.
Preferably, the size of the high-frequency storage space matches the data amount of the storage data in the high-frequency storage space, and may mean that the size of the high-frequency storage space has a certain excess amount (a numerical value of the excess amount may be set according to a requirement) compared with the data amount of the storage data in the high-frequency storage space, so that the high-frequency storage space has a certain redundancy, and can flexibly cope with fluctuations of files that need high-frequency access in a next usage period, such as newly written high-frequency access files and the like.
And step 403, adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component according to the determined size of the high-frequency storage space.
And then, further adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component according to the determined size of the high-frequency storage space.
For example, on the basis of the original SLC space, by switching a part of the memory granules in the TLC space to perform voltage control according to the voltage control strategy of SLC, the memory space type of the part of the memory granules is switched from TLC to SLC, thereby implementing expansion of SLC space, or by switching a part of the memory granules in the SLC space to perform voltage control according to the voltage control strategy of TLC, the memory space type of the part of the memory granules is switched from SLC to TLC, thereby implementing reduction of SLC space, and the like.
The adjustment of the size of the low-frequency storage space is synchronous with the adjustment of the size of the high-frequency storage space, and the size of the low-frequency storage space is changed in a way opposite to that of the high-frequency storage space and matched with the high-frequency storage space after the size of the high-frequency storage space is adjusted based on the fixed number of storage particles contained in the storage component. For example, for a certain flash memory or solid state disk, every 4G of SLC space is added, 12G of TLC space is reduced.
It should be noted that, in practical applications, if it is determined that the data amount of the file to be accessed with high frequency in the next usage period (N +1 th usage period) is unchanged from the previous usage period (nth usage period) in the execution period, e.g., no new high frequency access file has been written and no high and low frequency access type change has occurred to the stored file in the storage means, or the data volume of the newly added high-frequency access file and the low-frequency access file after the access type is changed is equivalent, and the like, the adjustment of the high-frequency and low-frequency storage space of the storage component is not required, that is, the adjusting operation is a null operation, that is, after the high frequency storage space and the low frequency storage space are in the second proportional relationship by the adjusting operation of the size of the high frequency storage space and the low frequency storage space, the second proportional relationship may be the same or different from the first proportional relationship, and still fall within the scope of the present application.
In addition, during the execution cycle, the operating system also adjusts the stored data in the high-frequency storage space so that the data of the file which needs to be accessed by high frequency in the (N + 1) th usage cycle of the electronic device is located in the high-frequency storage space, and the operating system can specifically migrate the file which is changed into the high-frequency access type from the low-frequency storage space to the high-frequency storage space (for example, from the TLC space to the SLC space) and/or migrate the file which is changed into the low-frequency access type from the high-frequency storage space to the low-frequency storage space (for example, from the SLC space to the TLC space) so as to support the file which needs to be accessed by high frequency in the next cycle to be accessed with high performance, and for the file which needs to be accessed by low frequency, the purpose of saving the storage space is achieved by storing the file in the low-frequency access space.
Similarly, if a new high frequency access file is not newly written in the last usage period and the high and low frequency access type of the stored file in the storage unit is not changed, it is not necessary to perform an adjustment operation on the stored data of the high and low frequency storage space, that is, the operation of adjusting the stored data is a null operation, and the method and the device are also within the protection scope of the present application.
In practical application, referring to fig. 5 in combination, when the electronic device is initially used, for a file to be written into the storage component, whether to write the file into the high-frequency storage area or the low-frequency storage area may be determined based on a high-frequency file list preset in the system. The high-frequency file list preset in the system can be obtained through file analysis in a development stage, and if some system files or application files are files which need or are predicted to be accessed at high frequency through analysis, file information of the files is brought into the high-frequency file list.
Subsequently, the operating system may adjust the high-frequency file list in combination with newly added high-and low-frequency files during the use of the device, dynamic changes of high-and low-frequency access conditions of stored files, and dynamically adjust the sizes of the high-and low-frequency storage spaces of the storage component and the storage information in the high-and low-frequency storage spaces in the execution period, as shown in fig. 5, after a predetermined time enters the execution period every night, the operating system analyzes the high-and low-frequency access conditions of the files to generate a new high-frequency file list, and transfers high-frequency files not in SLCs to SLCs, low-frequency files in SLCs to TLC, and so on, to ensure that SLC space is reasonably utilized, not only ensure that files which need frequent access in the next use period are in SLC space to support high-performance access of the files, but also ensure that files which do not need frequent access in the next use period are in TLC space to reduce the size of SLC space, the overall utilization rate of the storage component is improved, and the storage space of the storage component is saved.
As can be seen from the above, the storage processing method disclosed in the present application is applicable to a storage component of an electronic device, such as a flash memory or a solid state disk, which is divided into a high frequency storage space and a low frequency storage space, by adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component in the execution cycle, so as to adjust the proportional relation of the high-frequency storage space and the low-frequency storage space, and adjusting the stored data in the high-frequency storage space so that the data of the file which needs to be accessed at high frequency in the next using period of the electronic equipment is located in the high-frequency storage space, thereby realizing the dynamic adjustment of the sizes of the high-frequency storage space and the low-frequency storage space in the storage component according to the actual requirement, and dynamically adjusting the content in the high-frequency storage space so that the content in the high-frequency storage space is the data which needs to be accessed at high frequency, and further achieving the balance of aspects of access speed, storage space saving and the like.
In an embodiment, optionally, the storage component is a flash memory or a solid state disk, and in this case, adjusting the storage data in the high-frequency storage space may specifically be implemented as:
migrating the first storage data in the high-frequency storage space to a memory, and writing the first storage data into the low-frequency storage space from the memory;
and/or migrating the second storage data in the low-frequency storage space to the memory, and writing the second storage data into the high-frequency storage space from the memory.
The first storage data is a file with a changed access type in the high-frequency storage space, that is, a file without a high-frequency file in the (N + 1) th usage cycle, and the second storage data is a file with a changed access type in the low-frequency storage space, that is, a file with a high-frequency file in the (N + 1) th usage cycle.
In the case that the storage component is a flash memory or a solid state disk, in an execution cycle, for example, a predetermined time period in the morning every day, or a predetermined time period in the morning every day every week in units of weeks, according to the latest determined file information needing high-frequency access, for example, a latest high-frequency file list, a memory is used as a relay to write a file needing high-frequency access, which is originally stored in a low-frequency storage space, for example, a TLC space, into a high-frequency storage space, for example, an SLC space.
A specific migration example is provided below.
Taking dividing a flash memory or a solid state disk into SLC and TCL spaces as an example, in a case where a high frequency storage space, i.e., an SLC space, needs to be expanded and a storage component has enough storage space for expanding SLC, for example, a 4G SLC space needs to be dynamically expanded in an execution cycle, and a size of a free TLC space in the storage component is greater than 12G, before, after, or at the same time of migrating a file in the TLC space, which needs high frequency access, to a memory, voltage control is performed on the TLC space of a corresponding size (e.g., 12G) according to a voltage control policy of SLC, so that the TLC space is converted into the SLC space of 4G, and adjustment of the sizes of the SLC space and the TLC space is achieved.
And under the condition that the storage part does not have enough storage space for expanding the SLC, if the 4G SLC space needs to be dynamically expanded in the execution period and the size of the free TLC space in the storage part is 11G, the file needing high-frequency access in the TLC space can be migrated to the memory, so that after a sufficient amount of TLC space is released, the sizes of the SLC space and the TLC space are adjusted, and after the adjustment is completed, the file needing high-frequency access migrated to the memory is written into the SLC space.
The original file which is stored in the high-frequency storage space such as the SLC space and does not need high-frequency access is written into the low-frequency storage space such as the TLC space by using the internal memory as a transfer, and the process is similar to the process of transferring the file in the TLC space to the SLC space, so that the reference can be understood, and the detailed description is omitted.
Optionally, the storage component may also be a memory, and in this case, adjusting the storage data in the high-frequency storage space may specifically be implemented as:
migrating the first storage data in the high-frequency storage space to a pre-established shared memory area, and writing the first storage data into the low-frequency storage space from the shared memory area;
and/or migrating the second storage data in the low-frequency storage space to the shared memory area, and writing the second storage data in the high-frequency storage space from the shared memory area.
In the case that the storage component is a memory, the memory may be divided into a high-frequency storage space, a low-frequency storage space, and a shared memory area for transferring files when the high-frequency storage space and the low-frequency storage space are circulated. Similarly to the case of the flash memory or the solid state disk, the voltage control is performed on the corresponding memory storage particles according to different voltage control strategies of SLC, MLC or TLC, so that the corresponding SLC space, MLC space or TLC space is formed in the memory. The implementation process of file migration and size adjustment of the high/low frequency storage space in the high/low frequency storage space of the memory using the shared memory area as a relay is similar to the principle of the implementation process of file migration and size adjustment of the high/low frequency storage space in the high/low frequency storage space of the flash memory or the solid state disk using the memory as a relay.
It should be noted that the flash memory/solid state disk and the memory have different characteristics, the flash memory/solid state disk is nonvolatile storage, the internal storage data of the flash memory/solid state disk is not lost after the power failure of the device, while the memory is volatile storage, and the internal storage data of the flash memory/solid state disk disappears after the power failure of the device, that is, compared with the flash memory/solid state disk, the use cycle/execution cycle of the memory is suitable for a shorter time span, so that, for the characteristics, in practical application, different settings of the execution cycle/use cycle can be performed for different situations where the storage component is the flash memory/solid state disk or the memory.
For example, different execution cycle triggering conditions are set, for a computer device, if the storage component is a flash memory/solid state disk, the execution cycle can be entered at noon (user rest time) of a certain fixed day every week, and if the storage component is a memory, the execution cycle can be entered at noon every day for performing relevant adjustment processing.
According to the embodiment, the size and the storage data of the high-frequency storage space and the low-frequency storage space of the storage component are dynamically adjusted by the operating system according to the actual access condition of the device file, so that the balance of the access speed, the storage space saving and the like is achieved. In addition, the data writing and migration control of the hardware component and the size adjustment of the high-frequency and low-frequency storage space of the hardware component are completed by the operating system, so that the requirement on hardware is low, and the accuracy of the file needing high-frequency access can be continuously improved by dynamically analyzing the actual access condition of the file.
In an embodiment, referring to the flow diagram of the processing method provided in fig. 6, the processing method disclosed in the present application may further include, before step 101:
step 201', in the nth use cycle, the storage data meeting the access condition in the high-frequency storage space of the storage component is loaded to the memory of the electronic device in advance.
The present embodiment is mainly directed to a case where the storage component is a flash memory or a solid state disk.
The access condition may be, but is not limited to: the access frequency of certain files needing high-frequency access in the high-frequency storage space reaches the set access frequency representing the ultrahigh-frequency/ultrahigh-frequency access; or the current time is about to reach the habitual access time of certain files needing high-frequency access in the high-frequency storage space (for example, corresponding data files of certain office software are fixedly opened at a certain moment every day); or the current scene is in a habitual access scene of certain files needing high-frequency access in the high-frequency storage space (for example, the corresponding data files of a certain news client are accessed every day when a car is ridden).
Based on this, the stored data meeting the access condition in the high-frequency storage space of the storage component can be pre-loaded to the memory of the electronic device at a proper time through condition detection, for example, after the device is started, files needing ultra-high frequency/ultra-high frequency access in the high-frequency storage area are pre-loaded to the device memory, and when the habitual access time of arriving at some files needing high frequency access is detected or the habitual access scene of some files needing high frequency access is detected, the files are pre-loaded to the memory from the high-frequency storage space. The access rate of the system to certain files needing high-frequency access is further improved by loading the files to the memory in advance.
Corresponding to the processing method, an embodiment of the present application further discloses a processing apparatus, a composition structure of which is shown in fig. 7, and the processing apparatus specifically includes:
an access processing module 701, configured to, in an nth usage period, perform, by an operating system of an electronic device, a read/write operation on a storage component of the electronic device according to a read/write control policy; the storage space of the storage component is divided into a high-frequency storage space and a low-frequency storage space; the high-frequency storage space and the low-frequency storage space are in a first proportional relation;
an adjusting module 702, configured to, in an execution cycle, adjust sizes of a high-frequency storage space and a low-frequency storage space of the storage component so that the high-frequency storage space and the low-frequency storage space are in a second proportional relationship, and adjust storage data in the high-frequency storage space so that data of a file that needs to be accessed by the electronic device in an (N + 1) th usage cycle is located in the high-frequency storage space.
In an embodiment, the size of the high frequency storage space matches the amount of data stored in the high frequency storage space.
In an embodiment, the read/write control policy includes:
if the file belongs to a high-frequency access file, writing the data of the file into the high-frequency storage space; if the file belongs to a low-frequency access file, writing the data of the file into the low-frequency storage space;
if the file belongs to the high-frequency storage space, reading the data of the file from the high-frequency storage space; and if the file belongs to the low-frequency storage space, reading the data of the file from the low-frequency storage space.
In one embodiment, the storage component is a flash memory or a solid state disk;
the adjusting module 702 is specifically configured to, when adjusting the storage data in the high-frequency storage space:
migrating the first storage data in the high-frequency storage space to a memory, and writing the first storage data into the low-frequency storage space from the memory;
and/or migrating second storage data in the low-frequency storage space to the memory, and writing the second storage data into the high-frequency storage space from the memory;
the first storage data is data which is converted in the high-frequency storage space and does not need high-frequency access in the (N + 1) th service cycle, and the second storage data is data which is converted in the low-frequency storage space and needs high-frequency access in the (N + 1) th service cycle.
In an embodiment, the adjusting module 702, when adjusting the sizes of the high frequency storage space and the low frequency storage space of the storage component, is specifically configured to:
determining files needing high-frequency access in the (N + 1) th use cycle;
determining the data volume of the file needing high-frequency access, and determining the size of a high-frequency storage space according to the data volume of the file needing high-frequency access;
and adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component according to the determined size of the high-frequency storage space.
In one embodiment, the execution cycle is triggered by a predetermined execution cycle trigger condition; the execution cycle trigger conditions include: a device state condition and/or a time condition characterizing the device being idle.
In one embodiment, the storage component is a memory.
In an embodiment, the access processing module 701, before performing a read/write operation on the storage component of the electronic device, is further configured to: and in the Nth service cycle, loading the storage data meeting the access condition in the high-frequency storage space of the storage component to the memory of the electronic equipment in advance.
The processing apparatus disclosed in the embodiments of the present application is relatively simple in description because it corresponds to the processing method disclosed in the above embodiments of the method, and for the relevant similarities, please refer to the description of the above corresponding method embodiments, and the detailed description is omitted here.
In addition, the embodiment of the application also discloses electronic equipment which comprises a storage component, wherein the storage component is divided into a high-frequency storage space and a low-frequency storage space.
And the electronic device has embodied thereon a set of computer instructions which, when executed, is adapted to perform the processing method disclosed in any of the method embodiments above.
The set of computer instructions may be, but is not limited to being, implemented in the form of an operating system program file.
In addition, the electronic device may include a processor, a communication interface, a communication bus, and the like. The memory unit, the processor and the communication interface communicate with each other via a communication bus.
The processor can be used for executing the computer instruction set, and by executing the computer instruction set, the sizes of the high-frequency storage space and the low-frequency storage space of the storage component and the storage data are dynamically adjusted according to the actual access condition of the equipment file, so that the balance of aspects of access speed, storage space saving and the like is achieved.
The processor may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device.
The communication interface is used for communication between the electronic device and other devices. The communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like, and may be divided into an address bus, a data bus, a control bus, and the like.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
For convenience of description, the above system or apparatus is described as being divided into various modules or units by function, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
Finally, it is further noted that, herein, relational terms such as first, second, third, fourth, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method of processing, the method comprising:
in the Nth service cycle, an operating system of the electronic equipment carries out read/write operation on a storage component of the electronic equipment according to a read-write control strategy; the storage space of the storage component is divided into a high-frequency storage space and a low-frequency storage space; the high-frequency storage space and the low-frequency storage space are in a first proportional relation;
in the execution cycle, adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component to enable the high-frequency storage space and the low-frequency storage space to be in a second proportional relation, and adjusting the storage data in the high-frequency storage space to enable the data of the file which needs to be accessed by the electronic equipment in the (N + 1) th use cycle to be located in the high-frequency storage space.
2. The method of claim 1, the size of the high frequency storage space matching a data volume of stored data within the high frequency storage space.
3. The method of claim 1, the read-write control policy comprising:
if the file belongs to a high-frequency access file, writing the data of the file into the high-frequency storage space; if the file belongs to a low-frequency access file, writing the data of the file into the low-frequency storage space;
if the file belongs to the high-frequency storage space, reading the data of the file from the high-frequency storage space; and if the file belongs to the low-frequency storage space, reading the data of the file from the low-frequency storage space.
4. The method of claim 1, the storage component being a flash memory or a solid state disk;
the adjusting the storage data in the high-frequency storage space comprises:
migrating the first storage data in the high-frequency storage space to a memory, and writing the first storage data into the low-frequency storage space from the memory;
and/or migrating second storage data in the low-frequency storage space to a memory, and writing the second storage data into the high-frequency storage space from the memory;
the first storage data is data which is converted into the high-frequency storage space and does not need high-frequency access in the (N + 1) th usage cycle, and the second storage data is data which is converted into the low-frequency storage space and needs high-frequency access in the (N + 1) th usage cycle.
5. The method of claim 1, the resizing the high frequency storage space and the low frequency storage space of the storage component, comprising:
determining files needing high-frequency access in the (N + 1) th use cycle;
determining the data volume of the file needing high-frequency access, and determining the size of the high-frequency storage space according to the data volume of the file needing high-frequency access;
and adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component according to the determined size of the high-frequency storage space.
6. The method of claim 1, the execution cycle being triggered by a predetermined execution cycle trigger condition; the execution cycle trigger condition includes: a device state condition and/or a time condition characterizing the device being idle.
7. The method of claim 1, the storage component being a memory.
8. The method of claim 1, further comprising, prior to said read/write operation to a memory component of the electronic device:
and in the Nth service cycle, loading the storage data meeting the access condition in the high-frequency storage space of the storage component to the memory of the electronic equipment in advance.
9. A processing apparatus, the apparatus comprising:
the access processing module is used for performing read/write operation on a storage component of the electronic equipment by an operating system of the electronic equipment according to a read-write control strategy in the Nth service cycle; the storage space of the storage component is divided into a high-frequency storage space and a low-frequency storage space; the high-frequency storage space and the low-frequency storage space are in a first proportional relation;
and the adjusting module is used for adjusting the sizes of the high-frequency storage space and the low-frequency storage space of the storage component in an execution cycle so as to enable the high-frequency storage space and the low-frequency storage space to be in a second proportional relation, and adjusting the storage data in the high-frequency storage space so as to enable the data of the file which needs to be accessed at high frequency and is located in the high-frequency storage space when the electronic equipment is in the (N + 1) th use cycle.
10. An electronic apparatus includes a storage section divided into a high frequency storage space and a low frequency storage space;
the electronic device has embodied thereon a set of computer instructions operable to perform the processing method of any one of claims 1-8.
CN202111013477.XA 2021-08-31 2021-08-31 Processing method and device and electronic equipment Pending CN113687789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111013477.XA CN113687789A (en) 2021-08-31 2021-08-31 Processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111013477.XA CN113687789A (en) 2021-08-31 2021-08-31 Processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113687789A true CN113687789A (en) 2021-11-23

Family

ID=78584463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111013477.XA Pending CN113687789A (en) 2021-08-31 2021-08-31 Processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113687789A (en)

Similar Documents

Publication Publication Date Title
CN107408018B (en) Mechanism for adapting garbage collection resource allocation in solid state drives
US9886352B2 (en) De-duplicated virtual machine image transfer
KR20120010992A (en) Methods and systems for dynamically controlling operations in a non-volatile memory to limit power consumption
CN105574141B (en) Method and device for carrying out data migration on database
CN108897492B (en) Data writing method and device
US20140258672A1 (en) Demand determination for data blocks
US11041763B2 (en) Adaptive throttling
CN115421651A (en) Data processing method of solid state disk, electronic device and medium
US11138104B2 (en) Selection of mass storage device streams for garbage collection based on logical saturation
CN109739627B (en) Task scheduling method, electronic device and medium
CN115421924A (en) Memory allocation method, device and equipment
US20120331235A1 (en) Memory management apparatus, memory management method, control program, and recording medium
CN113574497A (en) Data storage method and storage chip
US10719243B2 (en) Techniques for preserving an expected lifespan of a non-volatile memory
JP2008516320A (en) Method and apparatus for determining the size of a memory frame
CN113687789A (en) Processing method and device and electronic equipment
CN110618872B (en) Hybrid memory dynamic scheduling method and system
US20140122403A1 (en) Loading prediction method and electronic device using the same
Wu et al. Reducing SSD access latency via NAND flash program and erase suspension
CN114489484A (en) Data storage method of SSD, terminal device and storage medium
CN113874942A (en) Data reading method, storage controller and electronic equipment
US11093341B1 (en) Systems and methods of data auto-tiering using relativized discrepancy
CN106202262B (en) Information processing method and electronic equipment
CN109086223B (en) Method and device for controlling garbage recovery
CN115686347A (en) Data storage method, device, equipment and computer readable storage medium

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