CN105892937B - Information processing method and electronic equipment - Google Patents

Information processing method and electronic equipment Download PDF

Info

Publication number
CN105892937B
CN105892937B CN201610099010.4A CN201610099010A CN105892937B CN 105892937 B CN105892937 B CN 105892937B CN 201610099010 A CN201610099010 A CN 201610099010A CN 105892937 B CN105892937 B CN 105892937B
Authority
CN
China
Prior art keywords
attribute
memory
file
storing
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
CN201610099010.4A
Other languages
Chinese (zh)
Other versions
CN105892937A (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.)
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 CN201610099010.4A priority Critical patent/CN105892937B/en
Publication of CN105892937A publication Critical patent/CN105892937A/en
Application granted granted Critical
Publication of CN105892937B publication Critical patent/CN105892937B/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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Landscapes

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

Abstract

The invention discloses an information processing method and electronic equipment, wherein the method comprises the following steps: when a first file is newly added to a file system, acquiring a first attribute of the first file; determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute; storing the first file to the first memory. The invention provides the method for solving the technical problem that the file management needs to be carried out through a plurality of file systems in the prior art.

Description

Information processing method and electronic equipment
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to an information processing method and an electronic device.
Background
The development of science and technology drives social progress, electronic equipment such as desktop computers, notebook computers, tablet computers, mobile phones and the like can enter thousands of households, and the work, entertainment and life of people are greatly changed.
When a user uses an electronic device, various types of data, such as documents, pictures, videos, applications, etc., are continuously added to a file system of the electronic device. In electronic devices there are different types and capabilities of memory for storing data in a file system, wherein the file system needs to be managed in order to optimize the storage of data in the file system.
In the process of implementing the technical scheme in the embodiment of the invention, the inventor of the invention finds that the following technical problems exist in the prior art: in the prior art, in order to store different types of files on memories with different performances, the files need to be managed by a plurality of file systems, wherein each file system corresponds to one type of memory. For example, the first file system corresponds to a mass storage, and when a file with a high requirement on the capacity is newly added, the file is stored on the mass storage through the first file system. For another example, the second file system corresponds to a memory with a high running speed, and when a file with a high requirement on the performance of the memory is newly added, the file is stored on the memory with the high running speed through the second file system. That is, the prior art has a technical problem that file management needs to be performed through a plurality of file systems.
Disclosure of Invention
The invention provides an information processing method and electronic equipment, which are used for solving the technical problem that file management needs to be carried out through a plurality of file systems in the prior art.
To solve the foregoing technical problem, in one aspect, an embodiment of the present invention provides an information processing method, including:
when a first file is newly added to a file system, acquiring a first attribute of the first file;
determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute;
storing the first file to the first memory.
Optionally, before the obtaining the first attribute of the first file, the method further includes:
determining whether the first attribute exists in the first file;
determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
storing the first file to the second memory.
Optionally, the determining a first memory in the at least one memory according to the first attribute includes:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
Optionally, after the storing the first file to the first storage, the method further includes:
detecting whether the first attribute changes;
when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
Optionally, after the obtaining the first attribute of the first file, the method further includes:
storing the corresponding relation between the first file and the first attribute;
correspondingly, the detecting whether the first attribute changes includes:
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
On the other hand, an embodiment of the present invention further provides an electronic device, including:
a processor: the processor is used for acquiring a first attribute of a first file when the first file is newly added to a file system; determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute; storing the first file to the first memory.
Optionally, the processor is further configured to:
determining whether the first attribute exists in the first file before the first attribute of the first file is obtained;
determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
storing the first file to the second memory.
Optionally, the processor is configured to:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
Optionally, the processor is further configured to:
after the storing of the first file to the first memory, detecting whether the first attribute changes;
when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
Optionally, the processor is further configured to:
after the first attribute of the first file is obtained, storing the corresponding relation between the first file and the first attribute;
correspondingly, the detecting whether the first attribute changes includes:
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
On the other hand, an embodiment of the present invention further provides another electronic device, including:
the file system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first attribute of a first file when the first file is newly added to the file system;
a first determining module, configured to determine a first memory in at least one memory according to the first attribute, where a memory attribute of the first memory matches the first attribute;
the first storage module is used for storing the first file to the first storage.
Through one or more of the above embodiments in the present invention, at least the following technical effects can be achieved:
1. in the embodiment of the invention, when a first file is newly added to a file system, a first attribute of the first file is firstly acquired. A first memory is then determined in the at least one memory based on the first attribute, wherein the memory attribute of the first memory matches the first attribute. And finally, storing the first file into the first memory. In the technical scheme, when the first file is newly added, the first storage with the matched attribute can be automatically determined according to the first attribute of the first file, so that the same file system can manage a plurality of storages with different attributes, and the file management does not need to be carried out through a plurality of file systems. Furthermore, because the file is automatically stored in the corresponding storage according to the attribute by the system in the embodiment of the invention, the user is required to manually identify the file attribute and manually allocate the file attribute to the storage under the corresponding file system when a plurality of file systems are adopted to manage storages with different attributes as in the prior art,
2. in the embodiment of the invention, after the first file is stored on the first memory, whether the first attribute of the first file is changed or not is detected, and if the first attribute is found to be changed, the first file is automatically rearranged according to the changed second attribute. According to the technical scheme, in the process of using the electronic equipment, the storage position of the first file can be flexibly changed according to the use state of the first file and the use state of the first memory, so that the first file can be stored on the most appropriate memory all the time, the optimization of file layout is realized, the management of a user on a file system is simplified, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an information processing method according to an embodiment of the present invention;
fig. 2 is a structural diagram of an electronic device according to a second embodiment of the present invention;
fig. 3 is a structural diagram of another electronic device according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides an information processing method and electronic equipment, which are used for solving the technical problem that file management needs to be carried out through a plurality of file systems in the prior art.
In order to solve the technical problems, the technical scheme in the embodiment of the invention has the following general idea:
in the embodiment of the invention, when a first file is newly added to a file system, a first attribute of the first file is firstly acquired. A first memory is then determined in the at least one memory based on the first attribute, wherein the memory attribute of the first memory matches the first attribute. And finally, storing the first file into the first memory. In the technical scheme, when the first file is newly added, the first storage with the matched attribute can be automatically determined according to the first attribute of the first file, so that the same file system can manage a plurality of storages with different attributes, and the file management does not need to be carried out through a plurality of file systems. Furthermore, in the embodiment of the invention, the file is automatically stored in the corresponding memory according to the attribute by the system, so that the file attribute needs to be identified manually by a user and manually allocated to the memory under the corresponding file system when a plurality of file systems are not used for managing memories with different attributes in the prior art, thereby simplifying the complexity of operation.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document generally indicates that the preceding and following related objects are in an "or" relationship unless otherwise specified.
In order to better understand the technical solutions of the present invention, the following detailed descriptions of the technical solutions of the present invention are provided with the accompanying drawings and the specific embodiments, and it should be understood that the specific features in the embodiments and the examples of the present invention are the detailed descriptions of the technical solutions of the present invention, and are not limitations of the technical solutions of the present invention, and the technical features in the embodiments and the examples of the present invention may be combined with each other without conflict.
Example one
The invention provides an information processing method which can be applied to an electronic device, wherein the electronic device can be a desktop computer, a notebook computer, a tablet personal computer and a smart phone, and the invention is not limited to what kind of electronic device is.
As shown in fig. 1, the main flow of the information processing method is described as follows:
step 101: when a first file is newly added to a file system, acquiring a first attribute of the first file;
step 102: determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute;
step 103: storing the first file to the first memory.
Among them, specifically, in the electronic device, there is a file system for managing files, and various files created during the use of the electronic device can be stored on the memory by the file system. When the types of the memories are different, and correspondingly, the performances of the memories are different, in order to achieve the optimization of the file layout of the whole file system, the files need to be managed through the file system. In the embodiment of the invention, attributes representing various characteristics are set for the file and the memory of the electronic equipment respectively, and various types of memories and files are intelligently managed through the attributes in one file system. The attribute of the memory may be high performance, large capacity, long life, etc., and when the attribute of the memory is set, the electronic device automatically determines the attribute according to the type of the memory. The attributes of a file may be high performance, high operating frequency, low operating frequency, large capacity, small capacity, high concurrency, single user access, multi-user access, high importance, write-many or read-many, and so on. In the embodiment of the invention, when a first file is newly added to the file system, a first attribute of the first file needs to be acquired.
When the first attribute of the first file is set, there are at least two possible implementation manners:
a first possible implementation: the user specifies a first property of the first file, and the electronic device supports setting the property by the user in a manner of extending the property. When a first file is newly added, the user manually sets the first attribute. When the first file is created, a property selection window pops up, and displays various property types for a user to select and determine. Or the user actively sets, for example, the user calls an attribute selection window according to a specific operation, or the electronic device intelligently classifies the attribute types after manually inputting the attribute types, for example, a folder containing a large amount of learning materials is newly added on the electronic device, and when the user sets the attribute, the user inputs 'important and many', the electronic device determines that the attribute is high in importance and large in capacity.
A second possible implementation: the system automatically determines a first attribute from the first file. When a first file is newly added, the system analyzes and acquires information such as the source, the type, the size and the like of the first file, and then automatically determines a first attribute according to the acquired information. For example, if the electronic device adds a piece of software for managing system security, the file source is an internet download, the type is system security software, and the size is 30 mbytes, the software can be presumed to be a high-performance and high-operating-frequency file.
In the embodiment of the present invention, the above two possible implementation manners are only used as examples, and in practical applications, the two possible implementation manners are not limited to the above two manners, and a person skilled in the art may select a determination manner of the file attribute according to practical situations.
If the electronic device has multiple ways of determining the attributes, after determining the attributes of the file, different determining ways may also be recorded, so that the electronic device can determine which way each attribute is specifically set, which can be used to prioritize the different attributes of the file, for example, if the high performance in the first attribute is set by the user, the highest priority of the high performance in all the attributes is obtained.
After step 101 is executed, step 102 is executed to determine a first memory in the at least one memory according to the first attribute, wherein the memory attribute of the first memory matches the first attribute. Specifically, after the first attribute of the first file is obtained, the first storage for storing the first file needs to be determined according to the first attribute, so that the file system can automatically determine the storage position according to the attribute of the file, and the optimization of the file layout is realized. In a specific implementation, the memory may have multiple attributes, wherein the attribute with the highest priority level may be set. One attribute of the memory may correspond to multiple attributes of the file. For example, a memory with a highest priority attribute of high performance may be used to store files with attributes of high performance, high operating frequency, high concurrency, high importance, write-many, or read-many. The memory having the highest priority level and having a large capacity as its attribute can be used for storing files having a large capacity and a low operation frequency as their attributes. The memory with the highest priority attribute of long life can be used for storing files with high operation frequency and high importance.
In the embodiment of the present invention, step 101 specifically includes: determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in at least one memory, wherein the M pieces of attribute information are determined according to the priority of the attribute information. Specifically, since there are a plurality of attributes of the file, when the first file is laid out, a memory in which each attribute information in the first attribute matches with the memory attribute needs to be selected. If the memory with all the attributes matched can not be selected, the matched memory is determined according to the M attribute information of the first attribute. The M attributes may be attributes with higher priority in the first attributes, or may be attributes that are matched with the memory with the largest number of matching attributes. And when more than one memory is determined according to the M attributes, determining according to the preset priority of the memory. Of course, the determined memories may be displayed on the electronic device for the user to select the memory type. The current remaining capacity of each memory can be combined to determine, and the memory with more remaining capacity is selected. In the embodiment of the present invention, in order to optimize the layout, when the files are laid out, files having serial access relations should be stored in a memory as much as possible, for example, videos or pictures of the same series. If multiple files belong to a concurrently accessed relationship, they are laid out as far as possible on different storages. Specifically, before storing the newly created first file, the existing files in the first storage may be analyzed to determine information such as the number of files that may be concurrently accessed with the first file and the probability of concurrent access, and then determine whether to store the first file in the first storage. For example, if a large number of video files are stored in the first storage, when a new file is laid out, the video player is prevented from being stored in the first storage as much as possible, so that the running speed of the electronic device is prevented from being slowed down due to high concurrency when the video player plays the video files. In the embodiment of the invention, if the matched first storage cannot be determined according to the first attribute, the first storage is selected according to a default strategy, for example, the electronic device sets the default storage as a mass storage, and when the storage cannot be determined, the first file is stored in the mass storage.
For example, the first file is image processing software, and the first attribute includes two attributes, i.e., high performance and high operating frequency. Among the plurality of memories, a memory whose attribute is high performance may be used to store files whose attribute is high performance, high operating frequency, high concurrency, high importance, write-many, or read-many. The first memory is determined to be a high performance memory. For another example, assume that the first attribute of the image processing software includes three attributes, which are high performance, high operating frequency, and large capacity, respectively. If the memory with the matched three attributes cannot be found from the plurality of memories, the memory with the larger number of matched attributes is determined, for example, if the high-performance memory is matched with the high-performance and high-operation frequency, the high-performance memory is selected as the first memory. Of course, if the large capacity is the attribute with the highest priority among the first attributes, the first file may be stored on the large capacity memory.
After step 102 is executed, step 103 is executed to store the first file in the first memory.
In the embodiment of the invention, the files and the memories of the electronic equipment are set with attributes, and when the first file is laid out, the first memory for storing the first file is determined according to the attribute relation between the first file and the memories. By the technical scheme, different types of files and memories can be managed in one file system, so that the newly created first file can be stored in the matched first memory, and the file layout is optimized.
Optionally, before step 101, the method further includes: determining whether the first attribute exists in the first file; determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present; the first file is stored to a second memory. Specifically, when a first file is newly added, there may be a case where the first attribute is not set for the first file, so before determining a matching memory, it is necessary to judge whether the first attribute exists. And when the first file does not have the first attribute, determining a second memory for storing the first file according to the use priority of the memories. In the embodiment of the invention, the use priority is set for all the memories, and generally, the memory with the highest use priority level can be set as the memory with the largest capacity, so that the situation that the use of the electronic equipment is influenced due to insufficient residual capacity of the memory is prevented. Of course, the use priority may be dynamically set according to the use condition of the memory, for example, when capacity is used as the criterion for determining the priority, the highest-level memory of the other memories may be changed as the remaining capacity of the original highest-level memory is reduced in the actual use process. In the actual use process, the use priority of the memory can be set by a person skilled in the art according to the actual situation.
In this embodiment of the present invention, after step 103, the method further includes: detecting whether the first attribute changes; when it is detected that the first attribute changes to the second attribute, the first file is stored on a third memory of the at least one memory according to the second attribute. In particular, it is possible that the properties of the first file may change during the use of the first file. When the storage location of the first file is determined for the first time, which is when the first file is newly added to the electronic device, neither the electronic device nor the user can accurately determine the usage of the first file, and therefore, the determined first storage may not be the most appropriate storage. As more and more files are added to the electronic device, the user may add new memory to the electronic device, and furthermore, the performance and remaining capacity of the first memory may change as the files are added. In the embodiment of the present invention, in order to make the file layout an optimal way, in the using process of the first file, it needs to periodically determine whether the first file is still matched with the first memory, and flexibly adjust the storage location of the first file according to the using conditions of the first file and the memory. Specifically, it is necessary to re-determine the current attribute of the first file, detect whether the first attribute has changed, and when it is detected that the first attribute has changed to the second attribute, re-determine the third storage that matches the second attribute, and restore the first file to the third storage.
There are also various ways to determine the second attribute, and there are at least two possible implementations:
a first possible implementation: in an embodiment of the invention, the electronic device supports setting of the properties by the user in a manner of extending the properties. In the process of using the first file, the user can modify the attribute of the first file through a manual setting mode. For example, when a user newly creates a first file for learning image processing, in order to increase the speed of running the first file, the first file is set with a high-performance attribute, the electronic device stores the first file in a high-performance memory, but after a period of use, the user decides to change to another file for image processing software, and deletes the high-performance attribute of the first file by manual modification.
A second possible implementation: the electronic device automatically determines the current attribute of the electronic device through periodic judgment, and specifically, the file attribute can be determined according to the rule of file access. In the using process of the electronic device, the information related to the file use is acquired, and the information may specifically include the use frequency, the use time of each time, whether the first file runs stably, and the like. The attributes of the file are determined by periodically acquiring information and analyzing the information. For example, the electronic device periodically obtains a first usage frequency of a first file, and in a first time period, if it is determined that the usage frequency of the first file exceeds a maximum threshold, an attribute with a high operation frequency is added to the first attribute, and the first attribute is changed to a second attribute. And in a second time period, acquiring a second use frequency of the first file, determining that the second use frequency is lower than a lowest threshold value, modifying the high operation frequency into the low operation frequency, and automatically modifying the second attribute into a third attribute.
In the embodiment of the present invention, the above two possible implementation manners are only examples, and in practical applications, the implementation manner is not limited to the above two implementation manners, and a person skilled in the art may set the implementation manner according to practical situations.
In addition to changing the storage location according to the change in the attribute of the first file, the storage location of the first file may be adjusted according to the current usage of the first memory. Specifically, the storage state of the first memory may be obtained, including: used capacity, remaining capacity, capacity ratio of high performance files, capacity ratio of high operating frequency files, etc. As the number of files increases, the storage state of the current memory may change greatly compared to when the first file is stored, and a situation may occur in which the first memory is no longer suitable for storing the first file, and even the attribute of the first memory may change. When the first file is not suitable for storage on the first storage, the first file should be migrated to the other storage. For example, the first memory is a high performance memory, and as the number of files increases, when the remaining capacity is lower than a preset value, some new files with higher requirements on the running speed can not be stored on the first memory. In order to enable the first storage to continue storing new files, existing files on the first storage need to be screened, files with larger capacity or relatively lower operation frequency are selected, migration is carried out according to file attributes, and the files are transferred to other storage with lower priority matched with the files or stored in default storage.
In the embodiment of the invention, in order to more conveniently and more accurately determine whether the attribute of the first file changes, after the first attribute of the first file is acquired, the corresponding relation between the first file and the first attribute is saved. Correspondingly, when detecting whether the first attribute changes, acquiring the file attribute of the first file stored in the first memory; and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed. Specifically, after determining the attribute of the first file each time, the corresponding relationship between the file and the attribute is saved, when it is necessary to determine whether the attribute of the first file changes, the current file attribute of the first file after being stored in the first memory is acquired, the first attribute is acquired in the corresponding relationship, and whether the attribute of the first file changes is determined by comparing the acquired file attribute with the first attribute. When the file attribute is the same as the first attribute, the attribute representing the first file is still the first attribute, and when the file attribute is different from the first attribute, the attribute representing the first file is changed, and the current file attribute is determined to be the second attribute of the first file.
In the embodiment of the invention, the file and the memory on the electronic equipment are set with attributes, and when the first file is laid out, the first memory for storing the first file is determined according to the attribute relation between the first file and the memory. After the first file is stored, the first attribute needs to be periodically checked, and if the first attribute is found to be changed, the layout is automatically rearranged according to the changed second attribute. According to the technical scheme, in the process of using the electronic equipment, the storage position of the first file can be flexibly changed according to the use state of the first file and the use state of the first memory, so that the first file can be stored on the most appropriate memory all the time, the optimization of file layout is realized, the management of a user on a file system is simplified, and the user experience is improved.
Example two
Based on the same inventive concept as the information processing method in the first embodiment of the present invention, an embodiment of the present invention provides an electronic device, please refer to fig. 2, where the electronic device includes:
a memory 201;
the processor 202: the processor 202 is configured to, when a first file is newly added to a file system, obtain a first attribute of the first file; determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute; storing the first file to the first memory.
Specifically, the electronic device includes a plurality of memories 201. Types of the memory 201 include a hard disk Drive (hard disk Drive, HDD) and a Solid State Drive (SDD). When the types of the memories 201 are different, the corresponding performances are also different. The hard disk drive is the most basic memory, for example, a computer hard disk in a computer is divided into a C disk and a D disk, and the disk partitions belong to the hard disk drive. Different hard disk drives have different capacities, volumes, rotational speeds and interfaces, and therefore their performance is also different. The capacity can be divided into 80G, 128G, 160G, 256G, 320G, 500G, 750G, 1TB, 2TB and the like according to the capacity; 3.5 cun, 2.5 cun, 1.8 cun, etc. according to the volume; the number of revolutions can be divided into 5400 revolutions per minute (rpm)/7200rpm/10000rpm and the like; the interfaces can be divided into Parallel hard disk interfaces (PATA), Serial hard disk interfaces (SATA) or Small Computer System Interfaces (SCSI), where PATA and SATA are generally desktop applications and have a large capacity, and SCSI is generally high-end applications such as servers and workstations, and has a relatively Small capacity, but a relatively good performance and a relatively high stability. The solid state disk is divided into two types according to different storage media, one type is a Flash Memory (Flash Memory) used as a storage medium, and the Flash Memory is a long-life nonvolatile Memory (capable of still keeping stored data information under the condition of power failure), and is safe and reliable. Another is a Dynamic Random Access Memory (DRAM), which is the most common system Memory. The Memory 202 may include Read Only Memory (ROM), Random Access Memory (RAM), and disk Memory.
The processor may be a general-purpose Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits for controlling program execution.
Optionally, the processor 202 is further configured to:
determining whether the first attribute exists in the first file before the first attribute of the first file is obtained;
determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
storing the first file to the second memory.
Further, the processor 202 is configured to:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
Optionally, the processor 202 is further configured to:
after the storing of the first file to the first memory, detecting whether the first attribute changes;
when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
Optionally, the processor 202 is further configured to:
after the first attribute of the first file is obtained, storing the corresponding relation between the first file and the first attribute;
correspondingly, the detecting whether the first attribute changes includes:
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
Various changes and specific examples in the information processing method in the foregoing embodiment in fig. 1 are also applicable to the electronic device in this embodiment, and those skilled in the art can clearly know the implementation method of the electronic device in this embodiment through the foregoing detailed description of the information processing method, so that details are not described here for the sake of brevity of the description.
EXAMPLE III
Based on the same inventive concept as the information processing method in the first embodiment of the present invention, an embodiment of the present invention provides an electronic device, please refer to fig. 3, where the electronic device includes:
a first obtaining module 301, configured to obtain a first attribute of a first file when the first file is newly added to a file system;
a first determining module 302, configured to determine a first memory in at least one memory according to the first attribute, where a memory attribute of the first memory matches the first attribute;
a first storing module 303, configured to store the first file in the first storage.
Optionally, the electronic device further includes a second determining module, a third determining module, and a second storing module, where the second determining module is configured to:
determining whether the first attribute exists in the first file;
the third determining module is to: determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
the second storage module is configured to: storing the first file to the second memory.
Further, the first determining module 302 is configured to:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
Optionally, the electronic device further includes a first detection module and a third storage module, where the first detection module is configured to:
detecting whether the first attribute changes;
the third storage module is configured to: when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
Optionally, the electronic device further includes a first saving module, where the first saving module is configured to:
storing the corresponding relation between the first file and the first attribute;
correspondingly, the first detection module is configured to:
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
Various changes and specific examples in the information processing method in the foregoing embodiment in fig. 1 are also applicable to the electronic device in this embodiment, and those skilled in the art can clearly know the implementation method of the electronic device in this embodiment through the foregoing detailed description of the information processing method, so that details are not described here for the sake of brevity of the description.
Through one or more technical schemes in the embodiment of the invention, one or more technical effects as follows can be realized:
1. in the embodiment of the invention, when a first file is newly added to a file system, a first attribute of the first file is firstly acquired. A first memory is then determined in the at least one memory based on the first attribute, wherein the memory attribute of the first memory matches the first attribute. And finally, storing the first file into the first memory. In the technical scheme, when the first file is newly added, the first storage with the matched attribute can be automatically determined according to the first attribute of the first file, so that the same file system can manage a plurality of storages with different attributes, and the file management does not need to be carried out through a plurality of file systems. Furthermore, because the file is automatically stored in the corresponding storage according to the attribute by the system in the embodiment of the invention, the user is required to manually identify the file attribute and manually allocate the file attribute to the storage under the corresponding file system when a plurality of file systems are adopted to manage storages with different attributes as in the prior art,
2. in the embodiment of the invention, after the first file is stored on the first memory, whether the first attribute of the first file is changed or not is detected, and if the first attribute is found to be changed, the first file is automatically rearranged according to the changed second attribute. According to the technical scheme, in the process of using the electronic equipment, the storage position of the first file can be flexibly changed according to the use state of the first file and the use state of the first memory, so that the first file can be stored on the most appropriate memory all the time, the optimization of file layout is realized, the management of a user on a file system is simplified, and the user experience is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Specifically, the computer program instructions corresponding to the information processing method in the embodiment of the present invention may be stored on a storage medium such as an optical disc, a hard disc, a usb disk, or the like, and when the computer program instructions corresponding to the information processing method in the storage medium are read or executed by an electronic device, the method includes the following steps:
when a first file is newly added to a file system, acquiring a first attribute of the first file;
determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute;
storing the first file to the first memory.
Optionally, the storage medium further stores some other computer program instructions, and the some other computer program instructions are related to the steps of: the obtaining of the first attribute of the first file is executed before, and the executing process includes the following steps:
determining whether the first attribute exists in the first file;
determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
storing the first file to the second memory.
Further, the storage medium stores and stores the steps of: determining, in the at least one memory according to the first attribute, that the computer program instruction corresponding to the first memory, when executed, specifically includes the steps of:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
Optionally, the storage medium further stores some other computer program instructions, and the some other computer program instructions are related to the steps of: the first file is stored in the first memory and then executed, and the execution process comprises the following steps:
detecting whether the first attribute changes;
when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
Optionally, the storage medium further stores some other computer program instructions, and the some other computer program instructions are related to the steps of: the obtaining of the first attribute of the first file is executed, and the executing process includes the following steps:
storing the corresponding relation between the first file and the first attribute;
correspondingly, the detecting whether the first attribute changes includes:
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. An information processing method comprising:
when a first file is newly added to a file system, acquiring a first attribute of the first file;
determining a first memory in at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute;
before storing the first file, analyzing existing files on the first storage, determining the number of files which are possibly accessed in parallel with the first file and the probability of the concurrent access, and further determining whether to store the first file on the first storage;
storing the first file to the first memory when it is determined that the first file is to be stored to the first memory;
after the storing the first file to the first memory, the method further comprises:
detecting whether the matching degree of the memory attribute of the first memory and the first attribute changes or not, comprising the following steps: acquiring the storage state of the first memory;
storing a first file on a third memory of the at least one memory when the degree of matching changes, wherein the degree of matching is determined to change when a current storage state of the first memory changes such that the first memory is no longer suitable for storing the first file as compared to when the first file is stored,
wherein the determining a first memory among at least one memory according to the first attribute comprises:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
2. The method of claim 1, wherein prior to said obtaining the first attribute of the first file, the method further comprises:
determining whether the first attribute exists in the first file;
determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
storing the first file to the second memory.
3. The method of claim 1, wherein after said storing the first file to the first memory, the method further comprises:
detecting whether the first attribute changes;
when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
4. The method of claim 3, wherein after the obtaining the first attribute of the first file, the method further comprises:
storing the corresponding relation between the first file and the first attribute;
correspondingly, the detecting whether the first attribute changes includes:
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
5. An electronic device, comprising:
at least one memory;
the processor is used for acquiring a first attribute of a first file when the first file is newly added to a file system; determining a first memory in the at least one memory according to the first attribute, wherein the memory attribute of the first memory is matched with the first attribute; before storing the first file, analyzing existing files on the first storage, determining the number of files which are possibly accessed in parallel with the first file and the probability of the concurrent access, and further determining whether to store the first file on the first storage; storing the first file to the first memory when it is determined that the first file is to be stored to the first memory;
the processor is further configured to:
after the storing the first file to the first memory, detecting whether the matching degree of the memory attribute of the first memory and the first attribute changes or not includes: acquiring the storage state of the first memory;
storing a first file on a third memory of the at least one memory when the degree of matching changes, wherein the degree of matching is determined to change when a current storage state of the first memory changes such that the first memory is no longer suitable for storing the first file as compared to when the first file is stored,
wherein the processor is configured to:
determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or
And determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the attribute information priority.
6. The electronic device of claim 5, wherein the processor is further to:
determining whether the first attribute exists in the first file before the first attribute of the first file is obtained;
determining a second memory according to a memory usage priority of the at least one memory when the first attribute is not present;
storing the first file to the second memory.
7. The electronic device of claim 5, wherein the processor is further to:
after the storing of the first file to the first memory, detecting whether the first attribute changes;
when it is detected that the first attribute changes to a second attribute, storing the first file on a third memory of the at least one memory according to the second attribute.
8. The electronic device of claim 7, wherein the processor is further to:
after the first attribute of the first file is obtained, storing the corresponding relation between the first file and the first attribute;
acquiring file attributes of the first file stored in the first storage;
and judging whether the file attribute of the first file stored in the first memory is the same as the first attribute in the corresponding relation or not according to the corresponding relation, if so, representing that the first attribute is changed, otherwise, representing that the first attribute is not changed.
9. An electronic device, comprising:
the file system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first attribute of a first file when the first file is newly added to the file system;
a first determining module, configured to determine a first memory in at least one memory according to the first attribute, where a memory attribute of the first memory matches the first attribute; before storing the first file, analyzing existing files on the first storage, determining the number of files which are possibly accessed in parallel with the first file and the probability of the concurrent access, and further determining whether to store the first file on the first storage;
a first storage module, configured to store the first file to the first storage when it is determined that the first file is to be stored to the first storage;
the first detection module is used for detecting whether the matching degree of the memory attribute of the first memory and the first attribute changes, and comprises: acquiring the storage state of the first memory;
a third storage module, configured to store a first file in a third storage of the at least one storage when the matching degree changes, where it is determined that the matching degree changes when a current storage state of the first storage changes compared to when the first file is stored such that the first storage is no longer suitable for storing the first file,
wherein the first determination module is to: determining a memory in the at least one memory whose memory attribute matches each attribute information of the first attribute; or determining a memory with the memory attribute matched with the M pieces of attribute information of the first attribute in the at least one memory, wherein the M pieces of attribute information are determined according to the priority of the attribute information.
CN201610099010.4A 2016-02-23 2016-02-23 Information processing method and electronic equipment Active CN105892937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610099010.4A CN105892937B (en) 2016-02-23 2016-02-23 Information processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610099010.4A CN105892937B (en) 2016-02-23 2016-02-23 Information processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN105892937A CN105892937A (en) 2016-08-24
CN105892937B true CN105892937B (en) 2020-09-25

Family

ID=57014194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610099010.4A Active CN105892937B (en) 2016-02-23 2016-02-23 Information processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN105892937B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324763B (en) * 2018-10-18 2022-01-07 爱云保(上海)科技有限公司 Method and system for identifying low-importance files in mobile terminal in mobile internet
CN113268201A (en) 2021-05-13 2021-08-17 三星(中国)半导体有限公司 Cache management method and device based on file attributes

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570842A (en) * 2003-03-27 2005-01-26 株式会社日立制作所 Storage device
CN101261567A (en) * 2007-02-09 2008-09-10 三星电子株式会社 Systems and methods for managing data storage
CN103095805A (en) * 2012-12-20 2013-05-08 江苏辰云信息科技有限公司 Cloud storage system of data intelligent and decentralized management

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013061847A (en) * 2011-09-14 2013-04-04 Sony Corp Information processor and information processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570842A (en) * 2003-03-27 2005-01-26 株式会社日立制作所 Storage device
CN101261567A (en) * 2007-02-09 2008-09-10 三星电子株式会社 Systems and methods for managing data storage
CN103095805A (en) * 2012-12-20 2013-05-08 江苏辰云信息科技有限公司 Cloud storage system of data intelligent and decentralized management

Also Published As

Publication number Publication date
CN105892937A (en) 2016-08-24

Similar Documents

Publication Publication Date Title
US10877677B2 (en) Storage tiering based on virtual machine operations and virtual volume type
US10216440B2 (en) Disk management in distributed storage system including grouping disks into cold and hot data disk rings and reducing a spinning rate of disks storing cold data
KR101700667B1 (en) Storage network data allocation
EP3869316B1 (en) Hybrid storage
US10353596B2 (en) Data storage system performance management
JP5955870B2 (en) Method, computer readable storage medium and system for optimal compression of a virtual disk
WO2017185579A1 (en) Method and apparatus for data storage
US20100138677A1 (en) Optimization of data distribution and power consumption in a data center
CN105637470B (en) Method and computing device for dirty data management
KR20200067962A (en) Method and apparatus for writing data into solid state disk
US9335927B1 (en) Storage space allocation for logical disk creation
CN101650660A (en) Booting a computer system from central storage
CN111414228B (en) Method and related device for managing storage space based on Kubernetes
CN106598724B (en) Method for managing memory in a computing system
CN105989015B (en) Database capacity expansion method and device and method and device for accessing database
JP5336473B2 (en) Apparatus and method for selecting new data without affecting download speed
CN105988875B (en) Method and device for running process
CN105892937B (en) Information processing method and electronic equipment
WO2016183918A1 (en) Method and device for processing storage space
US20160140140A1 (en) File classification in a distributed file system
CN114816748A (en) Thread scheduling method and device, electronic equipment and storage medium
US20150363118A1 (en) Techniques for harmonic-resistant file striping
US9547585B2 (en) Information processing device, memory management method, and recording medium that ensure versatile memory management
CN111008079B (en) Process management method, device, storage medium and electronic equipment
US11275691B2 (en) Intelligent control of cache

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant