CN106201344B - Information processing method and electronic equipment - Google Patents
Information processing method and electronic equipment Download PDFInfo
- Publication number
- CN106201344B CN106201344B CN201610509614.1A CN201610509614A CN106201344B CN 106201344 B CN106201344 B CN 106201344B CN 201610509614 A CN201610509614 A CN 201610509614A CN 106201344 B CN106201344 B CN 106201344B
- Authority
- CN
- China
- Prior art keywords
- storage space
- hard disk
- disk storage
- type
- 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.)
- Active
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 19
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000012545 processing Methods 0.000 claims abstract description 60
- 238000000034 method Methods 0.000 claims abstract description 32
- 238000013507 mapping Methods 0.000 claims abstract description 26
- 238000001514 detection method Methods 0.000 claims 1
- 239000007787 solid Substances 0.000 description 19
- 238000004590 computer program Methods 0.000 description 18
- 238000012546 transfer Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000013500 data storage Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0667—Virtualisation aspects at data level, e.g. file, record or object virtualisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
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)
- Memory System Of A Hierarchy Structure (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses an information processing method and electronic equipment, wherein the information processing method comprises the following steps: receiving a data processing command, and determining to-be-processed data corresponding to the data processing command; determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address. The method provided by the invention solves the technical problem of low data reading and writing speed in the prior art.
Description
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
With the rapid development of science and technology and the development of information processing technology, more and more intelligent terminals appear in the work and the life of people, the functions of electronic equipment are more and more powerful, and the application range is more and more extensive. In the related art, a storage medium provided in an electronic device includes various types such as: the server is provided with a SATA interface solid state disk, an SAS interface solid state disk, a PCI interface solid state disk, a mechanical hard disk and the like. When the electronic device needs to process data, the hard disk storage space corresponding to the data to be processed is usually allocated by a system, which results in a slow data read-write speed of the electronic device. Therefore, the technical problem of low data reading and writing speed exists in the prior art.
Disclosure of Invention
The embodiment of the invention provides an information processing method and electronic equipment, which are used for solving the technical problem of low data reading and writing speed in the prior art.
An embodiment of the present invention provides an information processing method, including:
receiving a data processing command, and determining to-be-processed data corresponding to the data processing command;
determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
Optionally, the method further includes:
obtaining a storage space in an idle state in the hard disk storage space;
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
Optionally, the obtaining of the storage space in the idle state in the hard disk storage space specifically includes:
and when the data processing command is received, obtaining the storage space in an idle state in the hard disk storage space.
Optionally, the obtaining of the storage space in the idle state in the hard disk storage space specifically includes:
and detecting according to a preset time interval to obtain a storage space in an idle state in the hard disk storage space.
Optionally, the storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type specifically includes:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
Optionally, the storing the first data in a hard disk storage space of another type different from the first type specifically includes:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
Optionally, after the emptying the first type of hard disk storage space in the non-idle state, the method further includes:
and updating the address mapping relation between the virtual storage space and the hard disk storage space.
Another aspect of an embodiment of the present invention provides an electronic device, including:
a storage unit for storing at least one program module;
the at least one processor is used for receiving a data processing command and determining to-be-processed data corresponding to the data processing command by obtaining and running the at least one program module; determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space; determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
Optionally, the at least one processor is further configured to:
obtaining a storage space in an idle state in the hard disk storage space;
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
Optionally, the at least one processor is further configured to:
and when the data processing command is received, obtaining the storage space in an idle state in the hard disk storage space.
Optionally, the at least one processor is further configured to:
and detecting according to a preset time interval to obtain a storage space in an idle state in the hard disk storage space.
Optionally, the at least one processor is further configured to:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
Optionally, the at least one processor is further configured to:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
Optionally, the at least one processor is further configured to:
and after the first type of hard disk storage space in the non-idle state is emptied, updating the address mapping relation between the virtual storage space and the hard disk storage space.
Another aspect of an embodiment of the present invention provides an electronic device, including:
the first receiving unit is used for receiving a data processing command and determining to-be-processed data corresponding to the data processing command;
the first determining unit is used for determining a first virtual storage space in an idle state corresponding to the data to be processed from the virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
the first processing unit is used for determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
1. according to the technical scheme in the embodiment of the application, a data processing command is received, and the data to be processed corresponding to the data processing command is determined; determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space; and determining a second address in the hard disk storage space corresponding to the first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address. Therefore, when the electronic equipment processes data, the data is preferentially stored in the storage space which is read and written randomly for many times at high speed by using a storage virtualization mode, the storage space is efficiently utilized, and the data processing speed of the electronic equipment is effectively improved. Therefore, the technical problem of low data reading and writing speed in the prior art can be effectively solved.
2. In the technical scheme of the embodiment of the application, the storage space in an idle state in the hard disk storage space is obtained; judging whether the storage space in the idle state has the first type of hard disk storage space; if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state. Therefore, the storage space for high-speed multiple random reading and writing in the idle state can be ensured to exist in the electronic equipment, and further, when the electronic equipment processes data, the data can be preferentially stored in the storage space for high-speed multiple random reading and writing in the idle state, so that the higher data processing speed is further ensured.
3. According to the technical scheme in the embodiment of the application, the first data stored in the first type of hard disk storage space in a non-idle state is acquired; judging whether the read-write operation on the first data exists within a preset time range; and if not, storing the first data in other types of hard disk storage spaces different from the first type. Therefore, the electronic equipment can transfer the data which is stored in the storage space of the high-speed multiple random reading and writing and is not subjected to the reading and writing operation within the preset time range, so that the storage space of the high-speed multiple random reading and writing in the idle state exists in the electronic equipment, and further, when the electronic equipment processes the data, the data can be preferentially stored in the storage space of the high-speed multiple random reading and writing in the idle state, so that the higher data processing speed is further ensured.
4. According to the technical scheme in the embodiment of the application, the attribute information of the first data is obtained; determining a second type of hard disk storage space matched with the attribute information; saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type. Therefore, when the electronic equipment transfers the data stored in the high-speed storage space which is read and written randomly for many times, the data needs to be stored in the hard disk storage space which is matched with the data attribute according to the data attribute, and the reasonability and the effectiveness of data storage are realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
Fig. 1 is a flowchart of an information processing method according to an embodiment of the present application;
fig. 2 is a structural diagram of an electronic device according to a second embodiment of the present application;
fig. 3 is a structural diagram of an electronic device in a third embodiment of the present application.
Detailed Description
The embodiment of the invention provides an information processing method and electronic equipment, which are used for solving the technical problem of low data reading and writing speed in the prior art.
To solve the foregoing technical problem, an embodiment of the present invention provides an information processing method, and the general idea is as follows:
receiving a data processing command, and determining to-be-processed data corresponding to the data processing command;
determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
Due to the adoption of the technical means in the technical scheme in the embodiment of the application. Therefore, when the electronic equipment processes data, the data is preferentially stored in the storage space which is read and written randomly for many times at high speed by using a storage virtualization mode, the storage space is efficiently utilized, and the data processing speed of the electronic equipment is effectively improved. Therefore, the technical problem of low data reading and writing speed in the prior art can be effectively solved.
The main implementation principle, the specific implementation mode and the corresponding beneficial effects of the technical scheme of the embodiment of the present application are explained in detail with reference to the accompanying drawings.
Example one
In a specific implementation process, the information processing method may be applied to an electronic device, where a hard disk storage space of the electronic device includes at least two different types of hard disk storage spaces, and the electronic device may be an electronic device such as a server, a notebook computer, a desktop computer, or another electronic device, which is not limited herein.
Referring to fig. 1, an embodiment of the present invention provides an information processing method, including:
s101: receiving a data processing command, and determining to-be-processed data corresponding to the data processing command;
s102: determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
s103: determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
Specifically, in this market implementation, different types of hard disk storage spaces are provided in the electronic device, such as: SATA interface solid state hard drives, SAS interface solid state hard drives, PCIE interface solid state hard drives, mechanical hard drives and the like. The electronic device stores data in a storage virtualization mode, that is: the storage hardware resources are abstractly expressed and can be arbitrarily distributed according to needs. The address mapping relation exists between the hard disk storage space and the virtual storage space in the electronic equipment.
When the electronic device receives a data processing command, in this embodiment, the data processing command may be a read command or a write command, and the electronic device determines to-be-processed data corresponding to the data processing command. And then, determining a first virtual storage space in an idle state from the virtual storage spaces in the electronic equipment, wherein the first virtual storage space is a virtual storage space corresponding to a first type of hard disk storage space, and the first type of hard disk storage space is a hard disk storage space with the highest data reading and writing speed in multiple different types of hard disk storage spaces included in the electronic equipment. Such as: IDE interface solid state hard drives, SAS interface solid state hard drives, SCSI interface solid state hard drives, SATA interface solid state hard drives, wherein, according to reading and writing speed from fast to slow order sequencing do: the SAS interface solid state hard disk, the SCSI interface solid state hard disk, the SATA interface solid state hard disk and the IDE interface solid state hard disk are provided, and the SAS interface solid state hard disk is provided with the highest reading and writing speed. Furthermore, the electronic equipment determines a first virtual storage space in an idle state corresponding to the SAS interface solid state disk, obtains a second address in the SAS interface solid state disk corresponding to the first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space, and preferentially stores the data to be processed into the SAS interface solid state disk storage space corresponding to the second address. Because the data read-write speed of the SAS interface solid state disk is high, the data processing capacity of the electronic equipment can be improved.
Therefore, when the electronic equipment processes data, the data is preferentially stored in the storage space which is read and written randomly for many times at high speed by using a storage virtualization mode, the storage space is efficiently utilized, and the data processing speed of the electronic equipment is effectively improved. Therefore, the technical problem of low data reading and writing speed in the prior art can be effectively solved.
Further, the information processing method in the present embodiment further includes the steps of:
obtaining a storage space in an idle state in the hard disk storage space;
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state;
and updating the address mapping relation between the virtual storage space and the hard disk storage space.
The obtaining of the storage space in the idle state in the hard disk storage space specifically includes:
when the data processing command is received, obtaining a storage space in an idle state in the hard disk storage space; or
And detecting according to a preset time interval to obtain a storage space in an idle state in the hard disk storage space.
Specifically, in this embodiment, in order to ensure that the electronic device has a hard disk storage space in an idle state, which is read and written at high speed for multiple times at random, the electronic device may further monitor the state of the hard disk storage space in real time to obtain the storage space in the idle state. And further judging whether the storage space in the idle state has a first type of hard disk storage space with the highest data reading and writing speed. If the first type of hard disk storage space in the electronic equipment is completely occupied, the electronic equipment transfers the data stored in the first type of hard disk storage space, transfers the stored data to other types of hard disk storage spaces with the reading and writing speeds lower than that of the first type of hard disk storage space, and empties the first type of hard disk storage space, thereby ensuring that the first type of storage space in an idle state exists in the electronic equipment.
Because the first type of hard disk storage space in the idle state reappears in the electronic device, and other types of hard disk storage spaces are occupied, the electronic device updates the address mapping relationship between the virtual storage space and the hard disk storage space, and further processes data by using the updated address mapping relationship between the virtual storage space and the hard disk storage space.
In this embodiment, there are two ways to trigger the electronic device to transfer the data stored in the first type of hard disk storage space:
first, when the electronic device receives a data processing command, the electronic device determines whether a storage space in an idle state has a first type of hard disk storage space, and if not, transfers data stored in the first type of hard disk storage space.
Secondly, the electronic device judges whether the storage space in the idle state has the first type of hard disk storage space according to a preset time interval, and if not, transfers the data stored in the first type of hard disk storage space. The preset time interval may be 30 seconds, 1 minute, 2 minutes, etc., and the preset time interval may be set according to actual needs, and the application is not limited herein.
In the first mode, only when the data processing command is received, whether the first type of hard disk storage space with high data reading and writing speed in the idle state exists in the electronic device is determined, and if the first type of hard disk storage space does not exist, the data stored in the first type of hard disk storage space is transferred. In the second mode, whether the first type of hard disk storage space with the higher data read-write speed in the idle state exists in the electronic device is determined according to the preset time interval, and if the first type of hard disk storage space does not exist, the data stored in the first type of hard disk storage space is transferred. In a specific implementation process, the manner of triggering the electronic device to transfer the data stored in the first type of hard disk storage space is not limited to the above two manners, and may be set according to actual needs, and the application is not limited herein.
Further, in this embodiment, the data in the first type of hard disk storage space in the non-idle state is stored in another type of hard disk storage space different from the first type, and the specific implementation may be implemented by the following steps:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
The storing the first data in a hard disk storage space of another type different from the first type specifically includes:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
Specifically, in this embodiment, the electronic device obtains first data stored in a first type of hard disk storage space in a non-idle state, determines whether there is a read-write operation on the first data within a preset time range, and when the electronic device determines that there is no read-write operation on the first data within the preset time range, it indicates that the first data has not been processed for a long time and is not data that the electronic device needs to use frequently, and may store the first data in another type of hard disk storage space different from the first type. In the specific implementation process, the preset time range may be set to 5 minutes, 10 minutes or 15 minutes, and may of course be set according to actual needs, and the application is not limited herein.
Further, when saving the first data to a hard disk storage space of another type different from the first type, attribute information of the first data needs to be considered, such as: the type of the first data, the size of the first data, the read-write mode of the first data, and the like. After determining the attribute information of the first data, the electronic device may further obtain read-write usage modes of various hard disk storage spaces in the electronic device, such as: the read-write using modes of the hard disk storage space of the electronic equipment comprise sequential read-only, random read-only, sequential write-only, random write-only, sequential read-write mixing, random read-write mixing, unlimited write, limited write times and the like, and the read-write using modes of different types of hard disk storage spaces may be different. And then, the electronic equipment determines a second type of hard disk storage space matched with the attribute information of the first data by combining the attribute information of the first data and the read-write use mode of various types of hard disk storage spaces, and further stores the first data into the second type of hard disk storage space.
Such as: the first type of hard disk storage space in the electronic equipment is a high-speed random multiple read-write type hard disk storage space, and further comprises other types of hard disk storage spaces such as random read-only, random write-only and random read-only, and the data read-write speed of the other types of hard disk storage spaces is lower than that of the first type of hard disk storage space. When the first data which is stored in the first type of hard disk storage space and is not processed within the preset time range is determined to be the image type, the data of the image type is read-only data, and the first data can be transferred and stored to the random read-only type of hard disk storage space in the electronic equipment. When the first data which is stored in the first type of hard disk storage space and is not processed within the preset time range is determined to be the document type, the data of the document type is the readable and writable data, and the first data can be transferred and stored to the hard disk storage space of the random readable mixed type in the electronic equipment. Of course, in a specific implementation process, the second type hard disk storage space matched with the attribute information of the first data may also be determined according to the size of the hard disk storage space or other information, and the application is not limited herein.
By the mode, when the electronic equipment transfers the data stored in the high-speed random read-write storage space for multiple times, the data needs to be stored in the hard disk storage space matched with the data attribute according to the data attribute, so that the rationality and the effectiveness of data storage are realized.
Example two
Referring to fig. 2, based on the same inventive concept as the information processing method in the first embodiment, an embodiment of the present application further provides an electronic device, including:
a storage unit 201 for storing at least one program module;
the system comprises at least one processor 202, a data processing module and a data processing module, wherein the at least one processor is used for receiving a data processing command and determining to-be-processed data corresponding to the data processing command by obtaining and running the at least one program module; determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space; determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
Optionally, the at least one processor is further configured to:
obtaining a storage space in an idle state in the hard disk storage space;
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
Optionally, the at least one processor is further configured to:
and when the data processing command is received, obtaining the storage space in an idle state in the hard disk storage space.
Optionally, the at least one processor is further configured to:
and detecting according to a preset time interval to obtain a storage space in an idle state in the hard disk storage space.
Optionally, the at least one processor is further configured to:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
Optionally, the at least one processor is further configured to:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
Optionally, the at least one processor is further configured to:
and after the first type of hard disk storage space in the non-idle state is emptied, updating the address mapping relation between the virtual storage space and the hard disk storage space.
EXAMPLE III
Referring to fig. 3, based on the same inventive concept as the information processing method in the first embodiment, an embodiment of the present application further provides an electronic device, including:
a first receiving unit 301, configured to receive a data processing command, and determine to-be-processed data corresponding to the data processing command;
a first determining unit 302, configured to determine, from virtual storage spaces of an electronic device, a first virtual storage space in an idle state corresponding to the to-be-processed data; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
the first processing unit 303 is configured to determine, based on an address mapping relationship between a virtual storage space and a hard disk storage space in the electronic device, a second address in the hard disk storage space corresponding to a first address of the first virtual storage space, and store the to-be-processed data in the first hard disk storage space corresponding to the second address.
Optionally, the electronic device further includes:
the first acquisition unit is used for acquiring a storage space in an idle state in the hard disk storage space;
the first judging unit is used for judging whether the storage space in the idle state has the first type of hard disk storage space;
and if not, saving the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic device has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
Optionally, the first obtaining unit specifically includes:
and the first acquisition module is used for acquiring the storage space in the idle state in the hard disk storage space when the data processing command is received.
Optionally, the first obtaining unit specifically includes:
and the second acquisition module is used for detecting and acquiring the storage space in the idle state in the hard disk storage space according to a preset time interval.
Optionally, the first saving unit specifically includes:
the third acquisition module is used for acquiring first data stored in the first type of hard disk storage space in a non-idle state;
the first judgment module is used for judging whether the read-write operation on the first data exists in a preset time range;
and the first storage module is used for storing the first data to other types of hard disk storage spaces different from the first type if the first data is not stored in the first storage space.
Optionally, the first saving module specifically includes:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
Optionally, the electronic device further includes:
and the first updating unit is used for updating the address mapping relation between the virtual storage space and the hard disk storage space.
Through one or more technical solutions in the embodiments of the present application, one or more of the following technical effects can be achieved:
1. according to the technical scheme in the embodiment of the application, a data processing command is received, and the data to be processed corresponding to the data processing command is determined; determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space; and determining a second address in the hard disk storage space corresponding to the first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address. Therefore, when the electronic equipment processes data, the data is preferentially stored in the storage space which is read and written randomly for many times at high speed by using a storage virtualization mode, the storage space is efficiently utilized, and the data processing speed of the electronic equipment is effectively improved. Therefore, the technical problem of low data reading and writing speed in the prior art can be effectively solved.
2. In the technical scheme of the embodiment of the application, the storage space in an idle state in the hard disk storage space is obtained; judging whether the storage space in the idle state has the first type of hard disk storage space; if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state. Therefore, the storage space for high-speed multiple random reading and writing in the idle state can be ensured to exist in the electronic equipment, and further, when the electronic equipment processes data, the data can be preferentially stored in the storage space for high-speed multiple random reading and writing in the idle state, so that the higher data processing speed is further ensured.
3. According to the technical scheme in the embodiment of the application, the first data stored in the first type of hard disk storage space in a non-idle state is acquired; judging whether the read-write operation on the first data exists within a preset time range; and if not, storing the first data in other types of hard disk storage spaces different from the first type. Therefore, the electronic equipment can transfer the data which is stored in the storage space of the high-speed multiple random reading and writing and is not subjected to the reading and writing operation within the preset time range, so that the storage space of the high-speed multiple random reading and writing in the idle state exists in the electronic equipment, and further, when the electronic equipment processes the data, the data can be preferentially stored in the storage space of the high-speed multiple random reading and writing in the idle state, so that the higher data processing speed is further ensured.
4. According to the technical scheme in the embodiment of the application, the attribute information of the first data is obtained; determining a second type of hard disk storage space matched with the attribute information; saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type. Therefore, when the electronic equipment transfers the data stored in the high-speed storage space which is read and written randomly for many times, the data needs to be stored in the hard disk storage space which is matched with the data attribute according to the data attribute, and the reasonability and the effectiveness of data storage are realized.
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 application may be stored on a storage medium such as an optical disc, a hard disc, or a usb disk, and when the computer program instructions corresponding to the information processing method in the storage medium are read or executed by the first electronic device, the method includes the following steps:
receiving a data processing command, and determining to-be-processed data corresponding to the data processing command;
determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address.
Optionally, the storage medium further stores some other computer program instructions, and the execution process of the other computer program instructions includes the following steps:
obtaining a storage space in an idle state in the hard disk storage space;
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
Optionally, the step of storing in the storage medium: when the computer program instruction corresponding to the storage space in the idle state in the hard disk storage space is obtained and executed, the method specifically includes the following steps:
and when the data processing command is received, obtaining the storage space in an idle state in the hard disk storage space.
Optionally, the step of storing in the storage medium: when the computer program instruction corresponding to the storage space in the idle state in the hard disk storage space is obtained and executed, the method specifically includes the following steps:
and detecting according to a preset time interval to obtain a storage space in an idle state in the hard disk storage space.
Optionally, the step of storing in the storage medium: when executed, the computer program instruction for saving the data in the first type of hard disk storage space in the non-idle state to the other type of hard disk storage space different from the first type specifically includes the following steps:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
Optionally, the step of storing in the storage medium: when executed, the computer program instructions for saving the first data to the hard disk storage space of another type different from the first type specifically include the following steps:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
Optionally, the storage medium further stores other computer program instructions, and the other computer program instructions are further stored in the step of: executing the computer program instruction corresponding to the first type of hard disk storage space empty in the non-idle state after being executed, wherein the execution process comprises the following steps:
and updating the address mapping relation between the virtual storage space and the hard disk storage space.
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 (11)
1. An information processing method comprising:
receiving a data processing command, and determining to-be-processed data corresponding to the data processing command;
determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on an address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address; wherein,
the method further comprises the following steps: obtaining a storage space in an idle state in the hard disk storage space; the storage space is at least one of the following storage spaces:
when the data processing command is received, obtaining a storage space in an idle state in the hard disk storage space; or detecting and obtaining the storage space in the idle state in the hard disk storage space according to a preset time interval.
2. The method of claim 1, wherein the method further comprises:
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
3. The method of claim 2, wherein the saving the data in the first type of hard disk storage space in the non-idle state to another type of hard disk storage space different from the first type comprises:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
4. The method of claim 3, wherein saving the first data to another type of hard disk storage space different from the first type comprises:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
5. The method of claim 2, wherein after the emptying of the first type of hard disk storage space in the non-idle state, the method further comprises:
and updating the address mapping relation between the virtual storage space and the hard disk storage space.
6. An electronic device, comprising:
a storage unit for storing at least one program module;
the at least one processor is used for receiving a data processing command and determining to-be-processed data corresponding to the data processing command by obtaining and running the at least one program module; determining a first virtual storage space in an idle state corresponding to the data to be processed from a virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space; determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on an address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address; wherein,
the at least one processor is further configured to: obtaining a storage space in an idle state in the hard disk storage space; the at least one processor is further configured to at least one of:
when the data processing command is received, obtaining a storage space in an idle state in the hard disk storage space; or detecting and obtaining the storage space in the idle state in the hard disk storage space according to a preset time interval.
7. The electronic device of claim 6, wherein the at least one processor is further to:
judging whether the storage space in the idle state has the first type of hard disk storage space;
if not, storing the data in the first type of hard disk storage space in the non-idle state to other types of hard disk storage spaces different from the first type, and emptying the first type of hard disk storage space in the non-idle state, so that the electronic equipment has a virtual storage space corresponding to the first type of hard disk storage space in the idle state.
8. The electronic device of claim 7, wherein the at least one processor is further configured to:
obtaining first data stored in the first type of hard disk storage space in a non-idle state;
judging whether the read-write operation on the first data exists within a preset time range;
if not, the first data is stored in the hard disk storage space of other types different from the first type.
9. The electronic device of claim 8, wherein the at least one processor is further configured to:
obtaining attribute information of the first data;
determining a second type of hard disk storage space matched with the attribute information;
saving the first data to the hard disk storage space of the second type; wherein the second type is different from the first type.
10. The electronic device of claim 7, wherein the at least one processor is further configured to:
and after the first type of hard disk storage space in the non-idle state is emptied, updating the address mapping relation between the virtual storage space and the hard disk storage space.
11. An electronic device, comprising:
the first receiving unit is used for receiving a data processing command and determining to-be-processed data corresponding to the data processing command;
the first determining unit is used for determining a first virtual storage space in an idle state corresponding to the data to be processed from the virtual storage space of the electronic equipment; the hard disk storage space of the electronic equipment comprises at least two hard disk storage spaces of different types, the first virtual storage space is a virtual storage space corresponding to the first type of hard disk storage space, and the data reading and writing speed corresponding to the first type of hard disk storage space is higher than that of other types of hard disk storage spaces in the hard disk storage space;
the first processing unit is used for determining a second address in the hard disk storage space corresponding to a first address of the first virtual storage space based on the address mapping relation between the virtual storage space and the hard disk storage space in the electronic equipment, and storing the data to be processed in the first hard disk storage space corresponding to the second address; wherein,
the electronic device further includes: the first acquisition unit is used for acquiring a storage space in an idle state in the hard disk storage space; the first acquisition unit comprises at least one of the following acquisition modules:
the first acquisition module is used for acquiring a storage space in an idle state in the hard disk storage space when the data processing command is received; or, the second obtaining module is configured to obtain, according to a preset time interval, a storage space in an idle state in the hard disk storage space by detection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610509614.1A CN106201344B (en) | 2016-06-30 | 2016-06-30 | Information processing method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610509614.1A CN106201344B (en) | 2016-06-30 | 2016-06-30 | Information processing method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106201344A CN106201344A (en) | 2016-12-07 |
CN106201344B true CN106201344B (en) | 2019-12-24 |
Family
ID=57464420
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610509614.1A Active CN106201344B (en) | 2016-06-30 | 2016-06-30 | Information processing method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201344B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664523B (en) * | 2017-03-31 | 2021-08-13 | 华为技术有限公司 | Virtual disk file format conversion method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102648457A (en) * | 2009-12-07 | 2012-08-22 | 微软公司 | Extending SSD lifetime using hybrid storage |
CN103049349A (en) * | 2012-11-29 | 2013-04-17 | 记忆科技(深圳)有限公司 | Snapshot method and system based on tiered storage |
CN103677674A (en) * | 2013-12-27 | 2014-03-26 | 华为技术有限公司 | Data processing method and device |
US9026867B1 (en) * | 2013-03-15 | 2015-05-05 | Pmc-Sierra, Inc. | Systems and methods for adapting to changing characteristics of multi-level cells in solid-state memory |
CN104657435A (en) * | 2015-01-30 | 2015-05-27 | 杭州华三通信技术有限公司 | Storage management method for application data and network management system |
-
2016
- 2016-06-30 CN CN201610509614.1A patent/CN106201344B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102648457A (en) * | 2009-12-07 | 2012-08-22 | 微软公司 | Extending SSD lifetime using hybrid storage |
CN103049349A (en) * | 2012-11-29 | 2013-04-17 | 记忆科技(深圳)有限公司 | Snapshot method and system based on tiered storage |
US9026867B1 (en) * | 2013-03-15 | 2015-05-05 | Pmc-Sierra, Inc. | Systems and methods for adapting to changing characteristics of multi-level cells in solid-state memory |
CN103677674A (en) * | 2013-12-27 | 2014-03-26 | 华为技术有限公司 | Data processing method and device |
CN104657435A (en) * | 2015-01-30 | 2015-05-27 | 杭州华三通信技术有限公司 | Storage management method for application data and network management system |
Also Published As
Publication number | Publication date |
---|---|
CN106201344A (en) | 2016-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9413683B2 (en) | Managing resources in a distributed system using dynamic clusters | |
CN102314377B (en) | Accelerator and method thereof for supporting virtual machine migration | |
CA2910175C (en) | Selective backup of program data to non-volatile memory | |
EP1934762B1 (en) | Apparatus and method for handling dma requests in a virtual memory environment | |
CN103324533A (en) | distributed data processing method, device and system | |
US10713162B1 (en) | System and method for computer data garbage collection acceleration using peer to peer data transfers | |
CN108959118B (en) | Data writing method and device | |
CN112783831B (en) | File migration method and device | |
CN113625973B (en) | Data writing method, device, electronic equipment and computer readable storage medium | |
KR20190022933A (en) | Hybrid memory drives, computer systems, and related methods for operating multimode hybrid drives | |
CN109144428B (en) | Garbage recycling method, device and medium applied to solid state disk | |
CN114371814B (en) | Data processing method and device and solid state disk | |
KR101996641B1 (en) | Apparatus and method for memory overlay | |
CN118312102A (en) | IO request processing method and device, storage equipment and storage medium | |
CN109491592B (en) | Storage device, data writing method thereof and storage device | |
CN106201344B (en) | Information processing method and electronic equipment | |
CN105264608B (en) | Method, Memory Controller Hub and the central processing unit of data storage | |
CN108874318A (en) | The data reconstruction method and solid state hard disk of solid state hard disk | |
CN104899158A (en) | Memory access optimization method and memory access optimization device | |
CN107924370A (en) | Processing is associated with the method for the return entity of multiple requests and the device using this method in single Interrupt Service Routine thread | |
CN106202262B (en) | Information processing method and electronic equipment | |
CN105868121A (en) | Information processing method and electronic equipment | |
CN110767258B (en) | Data erasure command test method and related device | |
CN108959517B (en) | File management method and device and electronic equipment | |
EP3296878A1 (en) | Electronic device and page merging method therefor |
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 |