CN105389124B - A kind of information processing method and electronic equipment - Google Patents
A kind of information processing method and electronic equipment Download PDFInfo
- Publication number
- CN105389124B CN105389124B CN201510674067.8A CN201510674067A CN105389124B CN 105389124 B CN105389124 B CN 105389124B CN 201510674067 A CN201510674067 A CN 201510674067A CN 105389124 B CN105389124 B CN 105389124B
- Authority
- CN
- China
- Prior art keywords
- data
- spatial cache
- sector
- stored
- page
- 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
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
- G06F3/0611—Improving I/O performance in relation to response time
-
- 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/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
Abstract
The invention discloses a kind of information processing method and electronic equipment, the method includes:When detecting the data processing operation carried out to the first data, the initial sector address of first data is obtained;Determine the corresponding initial sector in the initial sector address whether be the page in a storage unit first sector, wherein at least two sectors of the page including first sector;When the initial sector is first sector, the data processing operation is executed;When the initial sector is not first sector, pair first data corresponding with the initial sector wherein first part's data execute the data processing operation.
Description
Technical field
The present invention relates to electronic technology field, more particularly to a kind of information processing method and electronic equipment.
Background technology
With the continuous development of science and technology, electronic technology has also obtained development at full speed, many electronic equipments, such as hand
Mechanical, electrical brain etc. becomes the necessity of people's daily life.In order to allow users to handle file whenever and wherever possible, it will usually make
Copy process is carried out to file with USB flash disk.
In the prior art, the minimum memory unit of USB flash disk is sector, when USB flash disk is carrying out data exchange by USB and computer
When, e.g., when computer transmits the data of a page-size by USB to USB flash disk, USB flash disk is firstly the need of available in reading disk
The corresponding logical block addresses of memory space, the i.e. corresponding address in sector, then store data into corresponding sector, due to
Then the memory space that the size of data to be transmitted is more than sector will remain at this point, USB flash disk also needs to read the address of next sector
In remaining data storage to another sector, until data all store until USB flash disk.
As it can be seen that there are the single technical problems of read-write mode for electronic equipment in the prior art.
Further, it since USB flash disk is when carrying out reading and writing data, is usually carried out for unit with a page (integral multiple of sector)
Data transmission, then will there are following situations:USB flash disk is firstly the need of the corresponding logic of remaining space for reading a certain disc page
Then block address a part of data is written in the remaining space of current disc page, then, then read another new magnetic
Remainder data in data to be transmitted are written in new disc page, in this way, often by the logical block addresses of the disk page
When USB flash disk transmits the data of a page-size, it is required for carrying out read-write operation twice, and when data to be transmitted are far above one
When a page-size, USB flash disk needs to carry out multiple read-write operation, as shown in Figure 1, thereby reducing the read or write speed of USB flash disk.
As it can be seen that there is the slow-footed technical problem of read-write data in electronic equipment in the prior art.
Invention content
A kind of information processing method of the embodiment of the present application offer and electronic equipment, set for solving electronics in the prior art
Standby there are the single technical problems of read-write mode, realize the technique effect for increasing electronic equipment read-write mode.
On the one hand the embodiment of the present application provides a kind of information processing method, include the following steps:
When detecting the data processing operation carried out to the first data, with obtaining the initial sector of first data
Location;
Determine whether the corresponding initial sector in the initial sector address is first of the page in a storage unit
Sector, wherein at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;
When the initial sector is not first sector, pair first data corresponding with the initial sector
Wherein first part's data execute the data processing operation.
Optionally, pair corresponding with the initial sector described when the initial sector is not first sector
First data wherein first part's data execute the data processing operation after, the method further includes:
The second part data in addition to first part's data in first data are stored in the storage unit
The first spatial cache, wherein the size of first spatial cache is M times of size of the page, and M is more than or equal to 1
Integer.
Optionally, when the data processing operation is that first data are written, the initial sector address is specially
First starting sevtor address of the first memory space in the storage unit for storing first data.
Optionally, described when the initial sector is not first sector, it is pair corresponding with the initial sector
First data wherein first part's data execute the data processing operation, specially:
The first data wherein first part's data corresponding with the first residual memory space in the page are write
Enter the page.
Optionally, the second part data in addition to first part's data by first data are stored in institute
The first spatial cache for stating storage unit, specifically includes:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and whole less than or equal to N
Number;Or
The second part data in addition to first part's data by first data are stored in the storage
First spatial cache of unit, specifically includes:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
Optionally, N be more than or equal to 2 when, it is described take successively i be 1 to N, it is described will be in the second part data
I-th part of data is stored in first spatial cache, specifically includes:
It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, it is single to obtain the storage
I-th of initial sector address of i-th page different from the first page in member;
Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and remove institute
State i-th part of data in the first spatial cache;
I+1 part data are stored in first spatial cache;
When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
Optionally, when the data processing operation is to read first data, the initial sector address is specially
Second initial sector address of the second memory space in the storage unit for storing first data.
Optionally, described when the initial sector is not first sector, it is pair corresponding with the initial sector
First data wherein first part's data execute the data processing operation, specifically include:
Read first data corresponding with the page wherein first part's data.
Optionally, the second part data in addition to first part's data by first data are stored in institute
The first spatial cache for stating storage unit, specifically includes:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and less than or equal to N's
Integer;Or
The second part data in addition to first part's data by first data are stored in the storage
First spatial cache of unit, specifically includes:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
Optionally, N be more than or equal to 2 when, it is described take successively i be 1 to N, by i-th part in the second part data
Data are stored in first spatial cache, are specifically included:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th number
According to, and remove i-th part of data in first spatial cache;
Obtain the i+1s different from the first page for storing i+1 part data in the storage unit
The i+1 initial sector address of a page;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
On the other hand the embodiment of the present application additionally provides a kind of electronic equipment, including:
Shell;
Storage unit is arranged in the shell, for storing the first data;
Processor is arranged in the shell, for detecting the data processing operation carried out to first data
When, obtain the initial sector address of first data;Determine whether the corresponding initial sector in the initial sector address is institute
State first sector of the page in storage unit, wherein the page including first sector at least two
A sector;When the initial sector is first sector, the data processing operation is executed;The initial sector not
For first sector when, pair first data corresponding with the initial sector wherein first part's data execute described in
Data processing operation.
Optionally, pair corresponding with the initial sector described when the initial sector is not first sector
First data wherein first part's data execute the data processing operation after, the processor is additionally operable to:
The second part data in addition to first part's data in first data are stored in the storage unit
The first spatial cache, wherein the size of first spatial cache is M times of size of the page, and M is more than or equal to 1
Integer.
Optionally, when the data processing operation is that first data are written, the initial sector address is specially
First starting sevtor address of the first memory space in the storage unit for storing first data.
Optionally, the processor is specifically used for:
The first data wherein first part's data corresponding with the first residual memory space in the page are write
Enter the page.
Optionally, the processor is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and whole less than or equal to N
Number;Or
The processor is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
Optionally, when N is more than or equal to 2, the processor is specifically used for:
It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, it is single to obtain the storage
I-th of initial sector address of i-th page different from the first page in member;
Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and remove institute
State i-th part of data in the first spatial cache;
I+1 part data are stored in first spatial cache;
When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
Optionally, when the data processing operation is to read first data, the initial sector address is specially
Second initial sector address of the second memory space in the storage unit for storing first data.
Optionally, the processor is specifically used for:
Read first data corresponding with the page wherein first part's data.
Optionally, the processor is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and less than or equal to N's
Integer;Or
The processor is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
Optionally, when N is more than or equal to 2, the processor is specifically used for:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th number
According to, and remove i-th part of data in first spatial cache;
Obtain the i+1s different from the first page for storing i+1 part data in the storage unit
The i+1 initial sector address of a page;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
Said one in the embodiment of the present application or multiple technical solutions at least have following one or more technology effects
Fruit:
One, due to the technical solution in the embodiment of the present application, using detecting the data processing carried out to the first data
When operation, the initial sector address of first data is obtained;Whether determine the corresponding initial sector in the initial sector address
For first sector of the page in a storage unit, wherein the page including first sector at least
Two sectors;When the initial sector is first sector, the data processing operation is executed;In the initial sector
When not being first sector, pair first data corresponding with the initial sector wherein first part's data execute institute
The technological means of data processing operation is stated, in this way, when electronic equipment is when carrying out data processing, can judge the starting of data first
The correspondence of sevtor address and the page is carried out using different processing modes at data then according to the difference of correspondence
Reason, to efficiently solve electronic equipment in the prior art, there are the single technical problems of read-write mode, realize and increase electronics
The technique effect of equipment read-write mode.
Two, it due to the technical solution in the embodiment of the present application, uses in the data processing operation as write-in described first
It, will be corresponding with the first residual memory space in the page when data, the initial sector are not first sector
First data wherein first part's data are written the page and will remove the first part in first data
Second part data outside data are stored in the first spatial cache of the storage unit, wherein first spatial cache it is big
M times of the small size for the page, M is the technological means of the integer more than or equal to 1, in this way, when initial sector is not described
When first sector, show that the sevtor address is misaligned with the page, at this point, first first write the corresponding page in initial sector completely,
Then a new sevtor address is recorded, the new sevtor address is aligned with sector, the starting fan of as one page
Then remaining data is written in a spatial cache by area, after spatial cache writes full data, then store data into new
In the corresponding space of sevtor address, since the size and page-size of spatial cache are at integral multiple relation, in this way, spatial cache is only
Needing just can be by the data write-once electronic equipment in spatial cache, without other according to the new sevtor address
Acquisition sevtor address process, reduce when carrying out data storage the number of reading sevtor address, to efficiently solve
There is the slow-footed technical problem of read-write data in electronic equipment in the prior art, realize the skill for improving data processing speed
Art effect.
Three, it due to the technical solution in the embodiment of the present application, uses in the data processing operation as write-in described first
It, will be corresponding with the first residual memory space in the page when data, the initial sector are not first sector
First data wherein first part's data are written the page and will remove the first part in first data
Second part data outside data are stored in the first spatial cache of the storage unit, wherein first spatial cache it is big
M times of the small size for the page, M are the technological means of the integer more than or equal to 1, are deposited in progress data in this way, reducing
The number that sevtor address is read when storage, improves processing speed of the electronic equipment when reading and writing data, is used to realize to improve
The technique effect of family experience.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, will be described below to embodiment
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some
Embodiment.
Fig. 1 is the process schematic that sevtor address is read when progress data storage in the prior art;
Fig. 2 is a kind of flow chart of the information processing method provided in the embodiment of the present application one;
Fig. 3 is the first specific implementation flow chart of step S105 in the embodiment of the present application one;
Fig. 4 is the specific implementation flow chart of step S302 in the embodiment of the present application one;
Fig. 5 is the first specific implementation schematic diagram of step S105 in the embodiment of the present application one;
Fig. 6 is the first specific implementation flow chart of step S105 in the embodiment of the present application two;
Fig. 7 is the specific implementation flow chart of step S602 in the embodiment of the present application two;
Fig. 8 is the structural schematic diagram of a kind of electronic equipment provided in the embodiment of the present application three.
Specific implementation mode
A kind of information processing method of the embodiment of the present application offer and electronic equipment, set for solving electronics in the prior art
Standby there are the single technical problems of read-write mode, realize the technique effect for increasing electronic equipment read-write mode.
In order to solve the above technical problems, general thought is as follows for technical solution in the embodiment of the present application:
When detecting the data processing operation carried out to the first data, with obtaining the initial sector of first data
Location;
Determine whether the corresponding initial sector in the initial sector address is first of the page in a storage unit
Sector, wherein at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;
When the initial sector is not first sector, pair first data corresponding with the initial sector
Wherein first part's data execute the data processing operation.
In the above-mentioned technical solutions, using when detecting the data processing operation carried out to the first data, described in acquisition
The initial sector address of first data;Determine whether the corresponding initial sector in the initial sector address is in a storage unit
First sector of one page, wherein at least two sectors of the page including first sector;At described
When beginning sector is first sector, the data processing operation is executed;It is not described first fan in the initial sector
Qu Shi, pair first data wherein first part's data corresponding with the initial sector execute the data processing operation
Technological means can judge initial sector address and the page of data in this way, when electronic equipment is when carrying out data processing first
Correspondence carries out data processing, to efficiently solve then according to the difference of correspondence using different processing modes
There are the single technical problems of read-write mode for electronic equipment in the prior art, realize the technology for increasing electronic equipment read-write mode
Effect.
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to technical solution of the present invention
It is described in detail, it should be understood that the specific features in the embodiment of the present application and embodiment are to the detailed of technical solution of the present invention
Thin explanation, rather than to the restriction of technical solution of the present invention, in the absence of conflict, the embodiment of the present application and embodiment
In technical characteristic can be combined with each other.
Embodiment one
Referring to FIG. 2, for a kind of flow chart of the information processing method provided in the embodiment of the present application one, including:
S101:When detecting the data processing operation carried out to the first data, the starting fan of first data is obtained
Regional address;
S102:Determine whether the corresponding initial sector in the initial sector address is of the page in a storage unit
One sector, wherein at least two sectors of the page including first sector;
S103:When the initial sector is first sector, the data processing operation is executed;
S104:When the initial sector is not first sector, pair corresponding with the initial sector described the
One data wherein first part's data execute the data processing operation.
In specific implementation process, described information processing method can be applied in smart mobile phone, laptop, tablet electricity
Can also be that other the electronic equipment that data are handled one can be schematically illustrated here, just differing in brain, USB flash disk.In this Shen
Please be in embodiment, will be by taking described information processing method be applied in USB flash disk as an example, the realization to the method in the embodiment of the present application
Journey is described in detail.
When carrying out information processing using the technical solution in the application, step S101 is first carried out, i.e.,:It is detecting to
When the data processing operation that one data carry out, the initial sector address of first data is obtained.
In the embodiment of the present application one, the data processing operation is that first data, correspondingly, the starting are written
Sevtor address is specially the first initial sector of the first memory space for storing first data in the storage unit
Address.
In specific implementation process, by taking described information processing method is applied in USB flash disk as an example, when user needs to deposit into USB flash disk
When entering data, e.g., a certain video in laptop D disks is stored in USB flash disk, at this point, when laptop is transmitted to USB flash disk
When video, USB flash disk is driven through read/write function, obtains the storage unit corresponding first for storing video in USB flash disk data field
A logical block address.The minimum memory unit of USB flash disk is sector, and the size of each sector is 512 bytes, in this way, the U of 1G sizes
Disk just has 1G*1024*1024*1024/512=2097152 sector, each sector to have corresponding sector number, USB flash disk to use
It is sector 10 in the corresponding sector number of first blank cell of storage video, then the driving acquisition sector 10 of USB flash disk is
The initial sector address.
After executing completion step S102, the method in the embodiment of the present application just executes step S102, i.e.,:Described in determination
The corresponding initial sector in initial sector address whether be the page in a storage unit first sector, wherein the page
At least two sectors of the face including first sector.
In the embodiment of the present application, different from the relativeness of the page according to the initial sector address of acquisition, step S102
There is the following two kinds situation:
The first situation:
In specific implementation process, above-mentioned example is continued to use, USB flash disk in transmission data, is come as unit of a page
It is transmitted, generally, a page of USB flash disk corresponds at least two sector in USB flash disk, and such as a page corresponds to 8 sectors, one
A page corresponds to 5 sectors or a page corresponds to 4 sectors etc., by taking a page of USB flash disk corresponds to 5 sectors as an example, works as U
The driving of disk obtain the initial sector address for storing video be sector 10 when, just initial sector address is judged,
With determine obtain initial sector address whether the page alignment with USB flash disk.Specifically, a page of USB flash disk corresponds to 5 fans
Area, then the initial sector address of each page is sector 0, sector 5, sector 10 etc., i.e., the corresponding fan of multiple that sector number is 5
Area is the initial sector of each page in USB flash disk, since the initial sector address for storing video of acquisition is that sector 10,10 is
2 times of 5, therefore, sector 10 are first sector of the third page in USB flash disk.
Accordingly, after executing completion step S102, the method in the embodiment of the present application just executes step S103, i.e.,:
When the initial sector is first sector, the data processing operation is executed.
In specific implementation process, above-mentioned example is continued to use, when the driving of USB flash disk determines that sector 10 is the third page in USB flash disk
First sector when, then show that the logical block address obtained and the disc page of USB flash disk are in aligned condition, then by video with 5
A sector-size is unit of transfer, video is deposited into USB flash disk successively empty by the storage of starting memory location of the third page
Between in, complete write-in data operation.
The second situation:
By taking a page of USB flash disk corresponds to 4 sectors as an example, fanned when the driving of USB flash disk obtains the starting for storing video
Regional address be sector 10 when, just initial sector address is judged, with determine obtain initial sector address whether with USB flash disk
Page alignment.Specifically, a page of USB flash disk corresponds to 4 sectors, then the initial sector address of each page is sector 0, fan
Area 4, sector 8 etc., i.e., the corresponding sector of multiple that sector number is 4 is the initial sector of each page in USB flash disk, due to acquisition
Initial sector address for storing video is the multiple that sector 10,10 is not 4, and therefore, sector 10 is not any one in USB flash disk
First sector of the page.
Accordingly, after executing completion step S102, the method in the embodiment of the present application just executes step S104, i.e.,:
When the initial sector is not first sector, pair first data corresponding with the initial sector wherein first
Partial data executes the data processing operation.
In the embodiment of the present application one, the specific implementation of step S104 is:
The first data wherein first part's data corresponding with the first residual memory space in the page are write
Enter the page.
In specific implementation process, above-mentioned example is continued to use, it is any one page in USB flash disk that USB flash disk driving, which determines sector 10 not,
First sector after, determine that sector 10 is the sector in the third page, and currently can be used for depositing in the third page
The sector for storing up data is sector 10 and sector 11, then the residual memory space size in the current third page is 512*2=
1024 bytes, i.e. 1KB, at this point, the 1KB in video is deposited into the third page.
After executing completion step S104, the method in the embodiment of the present application further includes:
S105:The second part data in addition to first part's data in first data are stored in the storage
First spatial cache of unit, wherein the size of first spatial cache is M times of size of the page, M for more than etc.
In 1 integer.
In the embodiment of the present application one, according to the of different sizes of the second part data, step S105 specifically include as
Lower two kinds of realization methods:
First way please refers to Fig.3:
S301:Determine that the size of the second part data is N times of the size of first spatial cache;
S302:The second part data are divided into N parts, it is 1 to N to take i successively, will be in the second part data
I-th part of data is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and to be less than or equal to N
Integer.
In the embodiment of the present application one, referring to FIG. 4, the specific implementation of step S302 is:
S401:It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, is deposited described in acquisition
I-th of initial sector address of i-th page different from the first page in storage unit;
S402:Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and
Remove i-th part of data in first spatial cache;
S403:I+1 part data are stored in first spatial cache;
S404:When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
In specific implementation process, continue to use above-mentioned example, in USB flash disk can one spatial cache of pre- first to file, space
Size can be identical as the page-size of USB flash disk, can also be the integral multiple of USB flash disk page-size, does not make in the embodiment of the present application
Limitation, in the embodiment of the present application by taking spatial cache is 2 times of USB flash disk page-size as an example, i.e., the size of spatial cache is 512*
4*2=4096 bytes, i.e. 4KB.If the remainder size of data of video is 256KB, USB flash disk driving determines current residual data
Size is 256/4=64 times of spatial cache, at this point, the remainder data of video are divided into 64 parts, each part of data
Size is 4KB, and then, first part of data is written in spatial cache, at this point, due to video first part's data
The third page is write completely, at this point, the initial sector that can be used for storing the memory space of video is sector 12, i.e. the 4th page
Initial sector, then USB flash disk driving obtain the 4th page initial sector address:Sector 12, and by the data in spatial cache
It is written in USB flash disk, since the size of spatial cache is 2 times of USB flash disk page-size, at this point, first part of data will occupy the of USB flash disk
Four pages and the 5th page;After the data in spatial cache are written to USB flash disk, first part of data is removed, then by second
Part data are written in spatial cache, and since first part of data writes the 4th and the 5th page of USB flash disk completely, then USB flash disk driving obtains
It is sector 20 to take in storing the initial sector address of second part of data, and it is 20 that second part of data, which is then written to initial sector,
Memory space in, as shown in Figure 5.And so on, it is all deposited into USB flash disk until by 64 parts of data, just completes to regarding at this time
The storage of frequency.
If the remainder size of data of video is 250KB, 63 parts are divided data at this time, wherein from 1 to 62 part
In data, the size of every part of data is 4KB, and the size of the 63rd part of data is 2KB, will then by the way of same as described above
In 63 parts of data deposit USB flash disks.
The second way:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
In specific implementation process, continue to use above-mentioned example, in USB flash disk can one spatial cache of pre- first to file, space
Size can be identical as the page-size of USB flash disk, can also be the integral multiple of USB flash disk page-size, does not make in the embodiment of the present application
Limitation, in the embodiment of the present application by taking spatial cache is 2 times of USB flash disk page-size as an example, i.e., the size of spatial cache is 512*
4*2=4096 bytes, i.e. 4KB.If the remainder size of data of video is 3KB, USB flash disk driving determines current residual size of data
Less than the size of spatial cache, then directly remaining data is all deposited into spatial cache, via spatial cache, data are write
Enter USB flash disk, completes the storage to video.
Embodiment two
Referring to FIG. 2, for a kind of flow chart of the information processing method provided in the embodiment of the present application two, including:
S101:When detecting the data processing operation carried out to the first data, the starting fan of first data is obtained
Regional address;
S102:Determine whether the corresponding initial sector in the initial sector address is of the page in a storage unit
One sector, wherein at least two sectors of the page including first sector;
S103:When the initial sector is first sector, the data processing operation is executed;
S104:When the initial sector is not first sector, pair corresponding with the initial sector described the
One data wherein first part's data execute the data processing operation.
In specific implementation process, described information processing method can be applied in smart mobile phone, laptop, tablet electricity
Can also be that other the electronic equipment that data are handled one can be schematically illustrated here, just differing in brain, USB flash disk.In this Shen
Please be in embodiment, will be by taking described information processing method be applied in USB flash disk as an example, the realization to the method in the embodiment of the present application
Journey is described in detail.
When carrying out information processing using the technical solution in the application, step S101 is first carried out, i.e.,:It is detecting to
When the data processing operation that one data carry out, the initial sector address of first data is obtained.
In the embodiment of the present application two, the data processing operation is to read first data, correspondingly, the starting
Sevtor address is specially the second initial sector of the second memory space for storing first data in the storage unit
Address.
In specific implementation process, by taking described information processing method is applied in USB flash disk as an example, when user needs to read in USB flash disk
Data when, e.g., a certain video in USB flash disk is deposited into laptop D disks, at this point, when USB flash disk is passed to laptop
When defeated video, USB flash disk is driven through read/write function, obtains first logical block address of the video in USB flash disk data field.USB flash disk
Minimum memory unit be sector, the size of each sector is 512 bytes, in this way, the USB flash disk of 1G sizes, just there is 1G*1024*
There are corresponding sector number in 1024*1024/512=2097152 sector, each sector, and storing this in the data field of USB flash disk regards
The corresponding sector number of first storage unit of frequency is sector 10, then it is the initial sector that the driving of USB flash disk, which obtains sector 10,
Address.
After executing completion step S102, the method in the embodiment of the present application just executes step S102, i.e.,:Described in determination
The corresponding initial sector in initial sector address whether be the page in a storage unit first sector, wherein the page
At least two sectors of the face including first sector.
In the embodiment of the present application, different from the relativeness of the page according to the initial sector address of acquisition, step S102
There is the following two kinds situation:
The first situation:
In specific implementation process, above-mentioned example is continued to use, USB flash disk in transmission data, is come as unit of a page
It is transmitted, generally, a page of USB flash disk corresponds at least two sector in USB flash disk, and such as a page corresponds to 8 sectors, one
A page corresponds to 5 sectors or a page corresponds to 4 sectors etc., by taking a page of USB flash disk corresponds to 5 sectors as an example, works as U
Dish driving obtain first storage unit corresponding sector number of the video in the data field of USB flash disk be sector 10 when, just
Initial sector address is judged, with determine obtain initial sector address whether the page alignment with USB flash disk.Specifically, U
One page of disk corresponds to 5 sectors, then the initial sector address of each page is sector 0, sector 5, sector 10 etc., i.e. sector
The corresponding sector of multiple that number is 5 is the initial sector of each page in USB flash disk, since the video of acquisition is in the data field of USB flash disk
In the corresponding sector number of first storage unit be that sector 10,10 is 52 times, therefore, sector 10 is third in USB flash disk
First sector of the page.
Accordingly, after executing completion step S102, the method in the embodiment of the present application just executes step S103, i.e.,:
When the initial sector is first sector, the data processing operation is executed.
In specific implementation process, above-mentioned example is continued to use, when the driving of USB flash disk determines that sector 10 is the third page in USB flash disk
First sector when, then show that the logical block address obtained and the disc page of USB flash disk are in aligned condition, then by video with 5
A sector-size is unit of transfer, successively reads video from USB flash disk, completes the operation for reading data.
The second situation:
By taking a page of USB flash disk corresponds to 4 sectors as an example, when USB flash disk driving obtains the video in the data field of USB flash disk
When the corresponding sector number of first storage unit is sector 10, just initial sector address is judged, to determine acquisition
Initial sector address whether the page alignment with USB flash disk.Specifically, a page of USB flash disk corresponds to 4 sectors, then each page
Initial sector address be sector 0, sector 4, sector 8 etc., i.e., the corresponding sector of multiple that sector number is 4 is each in USB flash disk
The initial sector of the page, since first storage unit corresponding sector number of the video in the data field of USB flash disk of acquisition is
Sector 10,10 is not 4 multiple, and therefore, sector 10 is not first sector of any one page in USB flash disk.
Accordingly, after executing completion step S102, the method in the embodiment of the present application just executes step S104, i.e.,:
When the initial sector is not first sector, pair first data corresponding with the initial sector wherein first
Partial data executes the data processing operation.
In the embodiment of the present application two, the specific implementation of step S104 is:
Read first data corresponding with the page wherein first part's data.
In specific implementation process, above-mentioned example is continued to use, it is any one page in USB flash disk that USB flash disk driving, which determines sector 10 not,
First sector after, determine that sector 10 is the sector in the third page, and currently store this in the third page and regard
The sector of frequency is sector 10 and sector 11, at this point, just reading the data in the sector 10 and sector 11 in the third page, sector 10
It is first part's data of the video with the data stored in sector 11.
After executing completion step S104, the method in the embodiment of the present application further includes:
S105:The second part data in addition to first part's data in first data are stored in the storage
First spatial cache of unit, wherein the size of first spatial cache is M times of size of the page, M for more than etc.
In 1 integer.
In the embodiment of the present application two, according to the of different sizes of the second part data, step S105 specifically include as
Lower two kinds of realization methods:
First way please refers to Fig. 6:
S601:Determine that the size of the second part data is N times of the size of first spatial cache;
S602:The second part data are divided into N parts, it is 1 to N to take i successively, will be in the second part data
I-th part of data are stored in first spatial cache, wherein N is the integer more than or equal to 1, i be more than or equal to 1 and less than etc.
In the integer of N.
In the embodiment of the present application two, referring to FIG. 7, the specific implementation of step S602 is:
S701:It is 1 to N-1 to take i successively, after i-th part of data are stored in first spatial cache, reads described the
I parts of data, and remove i-th part of data in first spatial cache;
S702:It obtains in the storage unit for storing the different from the first page of i+1 part data
The i+1 initial sector address of the i+1 page;
S703:Based on i+1 initial sector address, i+1 part data are obtained;
S704:I+1 part data are stored in first spatial cache;
S705:When i is N-1, N parts of data in the second part data are stored in first spatial cache.
In specific implementation process, continue to use above-mentioned example, in USB flash disk can one spatial cache of pre- first to file, space
Size can be identical as the page-size of USB flash disk, can also be the integral multiple of USB flash disk page-size, does not make in the embodiment of the present application
Limitation, in the embodiment of the present application by taking spatial cache is 2 times of USB flash disk page-size as an example, i.e., the size of spatial cache is 512*
4*2=4096 bytes, i.e. 4KB.If the remainder size of data of the video stored in USB flash disk is 256KB, USB flash disk driving determines
The size of current residual data is 256/4=64 times of spatial cache, at this point, the remainder data of video are divided into 64
Part, the size of each part of data is 4KB, i.e. every part of data occupy 2 pages of USB flash disk data field, such as first part of data pair
The video data stored in the 4th page and the 5th page in USB flash disk data field is answered, then, the 4th page and the 5th page are corresponded to
First part of data be deposited into spatial cache, when USB flash disk driving detects the storage unit of laptop via the caching
After space obtains first part of data, then by first part of data dump in spatial cache, then obtains and store the in USB flash disk
The corresponding sevtor address in initial sector of two parts of data, the i.e. initial sector of the 6th page:Then sector 20 obtains sector 20
To sector 27 data and be deposited into spatial cache, when USB flash disk driving detects the storage unit of laptop via described
After spatial cache obtains second part of data, then by second part of data dump in spatial cache, continue to obtain next part of data.
And so on, it is all read until by 64 parts of data of the remaining video stored in USB flash disk, just completes the reading to video at this time.
If the remainder size of data of video is 250KB, 63 parts are divided data at this time, wherein from 1 to 62 part
In data, the size of every part of data is 4KB, and the size of the 63rd part of data is 2KB, then by the way of same as described above, from U
Above-mentioned 63 parts of data are read in disk.
The second way:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
In specific implementation process, continue to use above-mentioned example, in USB flash disk can one spatial cache of pre- first to file, space
Size can be identical as the page-size of USB flash disk, can also be the integral multiple of USB flash disk page-size, does not make in the embodiment of the present application
Limitation, in the embodiment of the present application by taking spatial cache is 2 times of USB flash disk page-size as an example, i.e., the size of spatial cache is 512*
4*2=4096 bytes, i.e. 4KB.If the remainder size of data of the video stored in USB flash disk is 3KB, i.e., remaining video occupies
1.5 pages of USB flash disk data field, USB flash disk driving determine that current residual size of data is less than the size of spatial cache, then direct general
Remaining data is all deposited into spatial cache, and via spatial cache, corresponding data are read from USB flash disk, are completed to video
It reads.
Embodiment three
Based on inventive concept identical with the embodiment of the present application one, the embodiment of the present application three provides a kind of electronic equipment, asks
With reference to figure 8, including:
Shell 10;
Storage unit 20 is arranged in shell 10, for storing the first data;
Processor 30 is arranged in shell 10, for detecting the data processing operation carried out to first data
When, obtain the initial sector address of first data;Determine whether the corresponding initial sector in the initial sector address is institute
State first sector of the page in storage unit, wherein the page including first sector at least two
A sector;When the initial sector is first sector, the data processing operation is executed;The initial sector not
For first sector when, pair first data corresponding with the initial sector wherein first part's data execute described in
Data processing operation.
In the embodiment of the present application three, processor 30 is additionally operable to:
The second part data in addition to first part's data in first data are stored in the storage unit
The first spatial cache, wherein the size of first spatial cache is M times of size of the page, and M is more than or equal to 1
Integer.
In the embodiment of the present application three, due to there are many data processing operations, the first data, reading as described in write-in
Described first data etc., the data processing operation difference make the alignment processing method of processor 30 also different.
The first situation:
When the data processing operation is that first data are written, the initial sector address is specially the storage
First starting sevtor address of the first memory space in unit for storing first data.Correspondingly, processor 30 has
Body is used for:
The first data wherein first part's data corresponding with the first residual memory space in the page are write
Enter the page.
In the first scenario, processor 30 is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and whole less than or equal to N
Number;Or
Processor 30 is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
When N is more than or equal to 2, processor 30 is specifically used for:
It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, it is single to obtain the storage
I-th of initial sector address of i-th page different from the first page in member;
Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and remove institute
State i-th part of data in the first spatial cache;
I+1 part data are stored in first spatial cache;
When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
The second situation:
When the data processing operation is to read first data, the initial sector address is specially the storage
Second initial sector address of the second memory space in unit for storing first data.Correspondingly, processor 30 has
Body is used for:
Read first data corresponding with the page wherein first part's data.
In the latter case, processor 30 is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and less than or equal to N's
Integer;Or
Processor 30 is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
When N is more than or equal to 2, processor 30 is specifically used for:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th number
According to, and remove i-th part of data in first spatial cache;
Obtain the i+1s different from the first page for storing i+1 part data in the storage unit
The i+1 initial sector address of a page;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
By one or more of the embodiment of the present application technical solution, following one or more technology effects may be implemented
Fruit:
One, due to the technical solution in the embodiment of the present application, using detecting the data processing carried out to the first data
When operation, the initial sector address of first data is obtained;Whether determine the corresponding initial sector in the initial sector address
For first sector of the page in a storage unit, wherein the page including first sector at least
Two sectors;When the initial sector is first sector, the data processing operation is executed;In the initial sector
When not being first sector, pair first data corresponding with the initial sector wherein first part's data execute institute
The technological means of data processing operation is stated, in this way, when electronic equipment is when carrying out data processing, can judge the starting of data first
The correspondence of sevtor address and the page is carried out using different processing modes at data then according to the difference of correspondence
Reason, to efficiently solve electronic equipment in the prior art, there are the single technical problems of read-write mode, realize and increase electronics
The technique effect of equipment read-write mode.
Two, it due to the technical solution in the embodiment of the present application, uses in the data processing operation as write-in described first
It, will be corresponding with the first residual memory space in the page when data, the initial sector are not first sector
First data wherein first part's data are written the page and will remove the first part in first data
Second part data outside data are stored in the first spatial cache of the storage unit, wherein first spatial cache it is big
M times of the small size for the page, M is the technological means of the integer more than or equal to 1, in this way, when initial sector is not described
When first sector, show that the sevtor address is misaligned with the page, at this point, first first write the corresponding page in initial sector completely,
Then a new sevtor address is recorded, the new sevtor address is aligned with sector, the starting fan of as one page
Then remaining data is written in a spatial cache by area, after spatial cache writes full data, then store data into new
In the corresponding space of sevtor address, since the size and page-size of spatial cache are at integral multiple relation, in this way, spatial cache is only
Needing just can be by the data write-once electronic equipment in spatial cache, without other according to the new sevtor address
Acquisition sevtor address process, reduce when carrying out data storage the number of reading sevtor address, to efficiently solve
There is the slow-footed technical problem of read-write data in electronic equipment in the prior art, realize the skill for improving data processing speed
Art effect.
Three, it due to the technical solution in the embodiment of the present application, uses in the data processing operation as write-in described first
It, will be corresponding with the first residual memory space in the page when data, the initial sector are not first sector
First data wherein first part's data are written the page and will remove the first part in first data
Second part data outside data are stored in the first spatial cache of the storage unit, wherein first spatial cache it is big
M times of the small size for the page, M are the technological means of the integer more than or equal to 1, are deposited in progress data in this way, reducing
The number that sevtor address is read when storage, improves processing speed of the electronic equipment when reading and writing data, is used to realize to improve
The technique effect of family experience.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer
The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Specifically, the corresponding computer program instructions of information processing method in the embodiment of the present application can be stored in
CD, hard disk, on the storage mediums such as USB flash disk, when computer program instructions quilt corresponding with information processing method in storage medium
One electronic equipment reads or is performed, and includes the following steps:
When detecting the data processing operation carried out to the first data, with obtaining the initial sector of first data
Location;
Determine whether the corresponding initial sector in the initial sector address is first of the page in a storage unit
Sector, wherein at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;
When the initial sector is not first sector, pair first data corresponding with the initial sector
Wherein first part's data execute the data processing operation.
Optionally, other computer program instructions are also stored in the storage medium, the other computer
Program instruction with step:When the initial sector is not first sector, pair institute corresponding with the initial sector
It states after the first data wherein first part's data execute the data processing operation and is performed, implementation procedure includes following step
Suddenly:
The second part data in addition to first part's data in first data are stored in the storage unit
The first spatial cache, wherein the size of first spatial cache is M times of size of the page, and M is more than or equal to 1
Integer.
Optionally, stored in the storage medium and step:When the initial sector is not first sector,
Pair first data corresponding with the initial sector wherein first part's data execute the data processing operation, corresponding
Computer program instructions when executed, specifically comprise the following steps:
The first data wherein first part's data corresponding with the first residual memory space in the page are write
Enter the page.
Optionally, stored in the storage medium and step:First part's number will be removed in first data
The first spatial cache of the storage unit is stored according to outer second part data, corresponding computer program instructions are being performed
When, specifically comprise the following steps:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and whole less than or equal to N
Number;Or
Stored in the storage medium and step:By in addition to first part's data in first data
Two partial datas are stored in the first spatial cache of the storage unit, corresponding computer program instructions when executed, specifically
Include the following steps:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
Optionally, when N is more than or equal to 2, stored in the storage medium and step:It is 1 to N to take i successively, described
I-th part of data in the second part data are stored in first spatial cache, corresponding computer program instructions are in quilt
When execution, specifically comprise the following steps:
It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, it is single to obtain the storage
I-th of initial sector address of i-th page different from the first page in member;
Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and remove institute
State i-th part of data in the first spatial cache;
I+1 part data are stored in first spatial cache;
When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
Optionally, stored in the storage medium and step:When the initial sector is not first sector,
Pair first data corresponding with the initial sector wherein first part's data execute the data processing operation, corresponding
Computer program instructions when executed, specifically comprise the following steps:
Read first data corresponding with the page wherein first part's data.
Optionally, stored in the storage medium and step:First part's number will be removed in first data
The first spatial cache of the storage unit is stored according to outer second part data, corresponding computer program instructions are being performed
When, specifically comprise the following steps:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part in the second part data
Data are stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is more than or equal to 1 and less than or equal to N's
Integer;Or
Stored in the storage medium and step:By in addition to first part's data in first data
Two partial datas are stored in the first spatial cache of the storage unit, corresponding computer program instructions when executed, specifically
Include the following steps:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
Optionally, when N is more than or equal to 2, stored in the storage medium and step:It is 1 to N to take i successively, by institute
The i-th part of data stated in second part data are stored in first spatial cache, and corresponding computer program instructions are being held
When row, specifically comprise the following steps:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th number
According to, and remove i-th part of data in first spatial cache;
Obtain the i+1s different from the first page for storing i+1 part data in the storage unit
The i+1 initial sector address of a page;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (16)
1. a kind of information processing method, including:
When detecting the data processing operation carried out to the first data, the initial sector address of first data is obtained;
Determine the corresponding initial sector in the initial sector address whether be the page in a storage unit first sector,
Wherein, at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;
When the initial sector is not first sector, pair first data corresponding with the initial sector are wherein
First part data execute the data processing operation, and by first data in addition to first part's data the
Two partial datas are stored in the first spatial cache of the storage unit, wherein the size of first spatial cache is the page
M times of the size in face, M are the integer more than or equal to 1;
Wherein, when the data processing operation is that first data are written, the initial sector address is specially described deposits
First starting sevtor address of the first memory space in storage unit for storing first data;
It is described the initial sector be first sector when, pair first data corresponding with the initial sector
Wherein first part's data execute the data processing operation, specially:
Institute is written into first data corresponding with the first residual memory space in the page wherein first part's data
State the page;
The second part data in addition to first part's data by first data are stored in the storage unit
The first spatial cache, specifically include:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part of data in the second part data
It is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is the integer more than or equal to 1 and less than or equal to N;Or
The second part data in addition to first part's data by first data are stored in the storage unit
The first spatial cache, specifically include:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
2. the method as described in claim 1, which is characterized in that N be more than or equal to 2 when, it is described take successively i be 1 to N, institute
It states and i-th part of data in the second part data is stored in first spatial cache, specifically include:
It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, obtains in the storage unit
I-th of initial sector address of i-th page different from the page;
Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and remove described the
I-th part of data in one spatial cache;
I+1 part data are stored in first spatial cache;
When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
3. the method as described in claim 1, which is characterized in that in the data processing operation be to read first data
When, the initial sector address is specially the of the second memory space for storing first data in the storage unit
Two initial sectors address.
4. method as claimed in claim 3, which is characterized in that it is described the initial sector be first sector
When, pair first data corresponding with the initial sector wherein first part's data execute the data processing operation, tool
Body includes:
Read first data corresponding with the page wherein first part's data.
5. method as claimed in claim 4, which is characterized in that described to remove first part's number in first data
It is stored in the first spatial cache of the storage unit according to outer second part data, specifically includes:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part of data in the second part data
It is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is the integer more than or equal to 1 and less than or equal to N;
Or
The second part data in addition to first part's data by first data are stored in the storage unit
The first spatial cache, specifically include:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
6. method as claimed in claim 5, which is characterized in that N be more than or equal to 2 when, it is described take successively i be 1 to N, will
I-th part of data in the second part data are stored in first spatial cache, are specifically included:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th part of data,
And remove i-th part of data in first spatial cache;
Obtain the i+1 pages different from the page for being used to store i+1 part data in the storage unit
I+1 initial sector address;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
7. a kind of information processing method, including:
When detecting the data processing operation carried out to the first data, the initial sector address of first data is obtained;
Determine the corresponding initial sector in the initial sector address whether be the page in a storage unit first sector,
Wherein, at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;
When the initial sector is not first sector, pair first data corresponding with the initial sector are wherein
First part data execute the data processing operation, and by first data in addition to first part's data the
Two partial datas are stored in the first spatial cache of the storage unit, wherein the size of first spatial cache is the page
M times of the size in face, M are the integer more than or equal to 1;
Wherein, when the data processing operation is to read first data, the initial sector address is specially described deposits
Second initial sector address of the second memory space in storage unit for storing first data;
It is described the initial sector be first sector when, pair first data corresponding with the initial sector
Wherein first part's data execute the data processing operation, specifically include:
Read first data corresponding with the page wherein first part's data;
The second part data in addition to first part's data by first data are stored in the storage unit
The first spatial cache, specifically include:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part of data in the second part data
It is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is the integer more than or equal to 1 and less than or equal to N;
Or
The second part data in addition to first part's data by first data are stored in the storage unit
The first spatial cache, specifically include:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
8. the method for claim 7, which is characterized in that N be more than or equal to 2 when, it is described take successively i be 1 to N, will
I-th part of data in the second part data are stored in first spatial cache, are specifically included:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th part of data,
And remove i-th part of data in first spatial cache;
Obtain the i+1 pages different from the page for being used to store i+1 part data in the storage unit
I+1 initial sector address;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
9. a kind of electronic equipment, including:
Shell;
Storage unit is arranged in the shell, for storing the first data;
Processor is arranged in the shell, for when detecting the data processing operation carried out to first data, obtaining
Take the initial sector address of first data;Determine whether the corresponding initial sector in the initial sector address is the storage
First sector of the page in unit, wherein at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;It is not described in the initial sector
When first sector, pair first data corresponding with the initial sector wherein first part's data execute at the data
Reason operation, and the second part data in addition to first part's data in first data are stored in the storage unit
The first spatial cache, wherein the size of first spatial cache is M times of size of the page, and M is more than or equal to 1
Integer;
Wherein, when the data processing operation is that first data are written, the initial sector address is specially described deposits
First starting sevtor address of the first memory space in storage unit for storing first data;
The processor is specifically used for:
Institute is written into first data corresponding with the first residual memory space in the page wherein first part's data
State the page;
The processor is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part of data in the second part data
It is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is the integer more than or equal to 1 and less than or equal to N;Or
The processor is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
10. electronic equipment as claimed in claim 9, which is characterized in that when N is more than or equal to 2, the processing implement body is used
In:
It takes i from 1 to N-1 successively, after i-th part of data is stored in first spatial cache, obtains in the storage unit
I-th of initial sector address of i-th page different from the page;
Based on i-th of initial sector address, i-th part of data are stored in i-th of page, and remove described the
I-th part of data in one spatial cache;
I+1 part data are stored in first spatial cache;
When i takes N-1, N parts of data in the second part data are stored in first spatial cache.
11. electronic equipment as claimed in claim 9, which is characterized in that the data processing operation be read described first
When data, the initial sector address is specially the second memory space for storing first data in the storage unit
The second initial sector address.
12. electronic equipment as claimed in claim 11, which is characterized in that the processor is specifically used for:
Read first data corresponding with the page wherein first part's data.
13. electronic equipment as claimed in claim 12, which is characterized in that the processor is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part of data in the second part data
It is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is the integer more than or equal to 1 and less than or equal to N;
Or
The processor is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
14. electronic equipment as claimed in claim 13, which is characterized in that when N is more than or equal to 2, the processing implement body
For:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th part of data,
And remove i-th part of data in first spatial cache;
Obtain the i+1 pages different from the page for being used to store i+1 part data in the storage unit
I+1 initial sector address;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
15. a kind of electronic equipment, including:
Shell;
Storage unit is arranged in the shell, for storing the first data;
Processor is arranged in the shell, for when detecting the data processing operation carried out to first data, obtaining
Take the initial sector address of first data;Determine whether the corresponding initial sector in the initial sector address is the storage
First sector of the page in unit, wherein at least two sectors of the page including first sector;
When the initial sector is first sector, the data processing operation is executed;It is not described in the initial sector
When first sector, pair first data corresponding with the initial sector wherein first part's data execute at the data
Reason operation, and the second part data in addition to first part's data in first data are stored in the storage unit
The first spatial cache, wherein the size of first spatial cache is M times of size of the page, and M is more than or equal to 1
Integer;
Wherein, when the data processing operation is to read first data, the initial sector address is specially described deposits
Second initial sector address of the second memory space in storage unit for storing first data;
The processor is specifically used for:
Read first data corresponding with the page wherein first part's data;
The processor is specifically used for:
Determine that the size of the second part data is N times of the size of first spatial cache;
The second part data are divided into N parts, it is 1 to N to take i successively, by i-th part of data in the second part data
It is stored in first spatial cache, wherein N is the integer more than or equal to 1, and i is the integer more than or equal to 1 and less than or equal to N;
Or
The processor is specifically used for:
Determine that the size of the second part data is less than the size of first spatial cache;
The second part data are stored in first spatial cache.
16. electronic equipment as claimed in claim 15, which is characterized in that when N is more than or equal to 2, the processing implement body
For:
It is 1 to N-1 to take i successively, after i-th part of data is stored in first spatial cache, reads i-th part of data,
And remove i-th part of data in first spatial cache;
Obtain the i+1 pages different from the page for being used to store i+1 part data in the storage unit
I+1 initial sector address;
Based on i+1 initial sector address, i+1 part data are obtained;
I+1 part data are stored in first spatial cache;
When i is N-1, N parts of data in the second part data are stored in first spatial cache.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510674067.8A CN105389124B (en) | 2015-10-16 | 2015-10-16 | A kind of information processing method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510674067.8A CN105389124B (en) | 2015-10-16 | 2015-10-16 | A kind of information processing method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105389124A CN105389124A (en) | 2016-03-09 |
CN105389124B true CN105389124B (en) | 2018-11-09 |
Family
ID=55421443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510674067.8A Active CN105389124B (en) | 2015-10-16 | 2015-10-16 | A kind of information processing method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105389124B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107329694B (en) * | 2017-06-22 | 2021-05-18 | 苏州奈特力智能科技有限公司 | Data storage control method, control device and storage equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102243611A (en) * | 2010-05-11 | 2011-11-16 | 深圳市朗科科技股份有限公司 | Data storage method and system |
CN102722456A (en) * | 2012-05-30 | 2012-10-10 | 深圳市江波龙电子有限公司 | Flash memory device and data writing method thereof |
CN103425602A (en) * | 2013-08-15 | 2013-12-04 | 深圳市江波龙电子有限公司 | Data reading and writing method and device for flash memory equipment and host system |
CN104536699A (en) * | 2014-12-11 | 2015-04-22 | 中国科学院声学研究所 | Streamed data write-in method based on embedded file system |
CN104866428A (en) * | 2014-02-21 | 2015-08-26 | 联想(北京)有限公司 | Data access method and data access device |
-
2015
- 2015-10-16 CN CN201510674067.8A patent/CN105389124B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102243611A (en) * | 2010-05-11 | 2011-11-16 | 深圳市朗科科技股份有限公司 | Data storage method and system |
CN102722456A (en) * | 2012-05-30 | 2012-10-10 | 深圳市江波龙电子有限公司 | Flash memory device and data writing method thereof |
CN103425602A (en) * | 2013-08-15 | 2013-12-04 | 深圳市江波龙电子有限公司 | Data reading and writing method and device for flash memory equipment and host system |
CN104866428A (en) * | 2014-02-21 | 2015-08-26 | 联想(北京)有限公司 | Data access method and data access device |
CN104536699A (en) * | 2014-12-11 | 2015-04-22 | 中国科学院声学研究所 | Streamed data write-in method based on embedded file system |
Also Published As
Publication number | Publication date |
---|---|
CN105389124A (en) | 2016-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102640226B (en) | There is the storer of internal processor and the method for control store access | |
US9053019B2 (en) | Non-volatile memory device, a data processing device using the same, and a swapping method used by the data processing and non-volatile memory devices | |
CN108701081A (en) | Device and method for the multiple subregions for accessing nonvolatile memory simultaneously | |
US20160092361A1 (en) | Caching technologies employing data compression | |
JP2012108999A (en) | Concurrent read and write memory operations in serial interface memory | |
US10747462B2 (en) | Data processing system and operating method thereof | |
CN108509355A (en) | A kind of method and apparatus of SLC Cache for SSD | |
CN103413569B (en) | One reads and one writes static RAM | |
CN103049224A (en) | Method, device and system for importing data into physical tape | |
CN102859504A (en) | Storage efficient sectored cache | |
CN114942831A (en) | Processor, chip, electronic device and data processing method | |
CN105094691A (en) | Data manipulation methods and system, and devices | |
CN101751993A (en) | Apparatus and method for cache control | |
CN102096562A (en) | Data writing method and device | |
CN103246482B (en) | Device and method for memory covering | |
CN105446848B (en) | The test method and device of the data processing performance of electronic equipment | |
CN105389124B (en) | A kind of information processing method and electronic equipment | |
CN103827837A (en) | Method, device and system for accessing solid state disk space | |
CN105426131A (en) | KV (Key Value) storage implementation method and device | |
CN104808953A (en) | Device and method for controlling data storage and mobile terminal | |
CN104750547B (en) | The input and output I/O request processing method and processing device of virtual machine | |
CN108108131A (en) | A kind of data processing method and device of SSD hard disks | |
CN104268005B (en) | Virtual machine awakening method and device | |
CN104360959B (en) | The method and controller of data storage | |
US9658976B2 (en) | Data writing system and method for DMA |
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 |