CN103049388A - Compression managing method and compression managing device of paging memory device - Google Patents

Compression managing method and compression managing device of paging memory device Download PDF

Info

Publication number
CN103049388A
CN103049388A CN2012105194080A CN201210519408A CN103049388A CN 103049388 A CN103049388 A CN 103049388A CN 2012105194080 A CN2012105194080 A CN 2012105194080A CN 201210519408 A CN201210519408 A CN 201210519408A CN 103049388 A CN103049388 A CN 103049388A
Authority
CN
China
Prior art keywords
page data
written
dictionary
write order
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.)
Granted
Application number
CN2012105194080A
Other languages
Chinese (zh)
Other versions
CN103049388B (en
Inventor
郭丹
梁小庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZHONGSHAN JIANGBOLONG ELECTRONICS CO., LTD.
Original Assignee
Shenzhen Netcom Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Netcom Electronics Co Ltd filed Critical Shenzhen Netcom Electronics Co Ltd
Priority to CN201210519408.0A priority Critical patent/CN103049388B/en
Publication of CN103049388A publication Critical patent/CN103049388A/en
Application granted granted Critical
Publication of CN103049388B publication Critical patent/CN103049388B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention is suitable for the technical field of memory devices and provides a compression managing method and a compression managing device of a paging memory device. The compression managing method comprises the steps of using a page as a unit to build a dictionary, wherein page data, feature codes corresponding to the page data and physical page addresses written by the page data are recorded in the dictionary; obtaining a write command including to-be-written page data and logic page addresses written by the to-be-written page data; obtaining feature codes of the to-be-written page data and judging whether feature codes same as the obtained feature codes exist in the dictionary or not; carrying out the write command and writing the write command into the to-be-written page data according to the logic page addresses written by the to-be-written page data if the feature codes same as the obtained feature codes do not exist in the physical blocks; and carrying out no write command and pointing the logic page addresses written by the to-be-written page data to physical page addresses written by the page data with same feature codes of the to-be-written page data if the feature codes same as the obtained feature codes exist in the physical blocks. By means of the compression managing method and the compression managing device of the paging memory device, the management problem of the memory device using a page as a smallest memory device is solved.

Description

A kind of Compression manager method and device of Fragmentation device
Technical field
The invention belongs to the memory technology field, relate in particular to a kind of Compression manager method and device of Fragmentation device.
Background technology
Current general data compression method comprises lossless data compression and diminishes data compression, as being the lossless data compression technology based on the compress technique of statistical model with based on the compress technique of dictionary model; Multimedia data compression comprises that audio compression, compression of images, video compress etc. then mostly are greatly and diminishes data compression technique; For memory device, must use harmless data compression mode.
Existing lossless data compression mode comprises:
One, dictionary type data compression method, as shown in table 1:
Index String
1 Prince
2 Love
3 Princess
4 Forever
Table 1
For example need to compress Yes! The dictionary that Prince love Princess forever then provides according to table 1 obtains compression result and is:
﹠amp; 1 ﹠amp; 2 ﹠amp; 3 ﹠amp; 4(Qi Zhong ﹠amp; Special symbol, if need output; Then packed data is ﹠amp; ﹠amp; )
Shortcoming: the size of dictionary and quality directly affect compression result.Then can't compress fully.
Two, run-length encoding type data compression method
The ultimate principle of run-length encoding is: the continuous symbol (continuous symbol has consisted of a section continuous " stroke ") by a value of symbol or the long replacement of string have identical value makes symbol lengths be less than the length of raw data.When the code of each row or each column data changes, once record the number that this code and same code repeat, thereby realize data compression.
For example: 5555557777733322221111111
Run-length encoding is: (5,6) (7,5) (3,3) (2,4) (1,7).As seen, the figure place of run-length encoding is far less than the figure place of original character string.
Yet all far less than the figure place of original character string, for example: 555555 is 6 characters to not all run-length encoding, and (5,6) are 5 characters, and also there is the problem of decrement in this.In addition, run-length encoding may be also larger than there be not compression for the compression coding out of random data.
Three, Huffman type data compression method
Existing Huffman type data compression method need to make up Huffman tree when carrying out data compression, space expense is excessive.And, length after the compression is a changing value, be not easy to take the memory device of page or leaf as the minimum memory unit, when for example the data of 8k being compressed, having compressed may be 7.5k, for take the memory device of page or leaf as the minimum memory unit, if the size of its page is 8k, then remaining 0.5k can't use substantially after the compression.
In sum, there is following problem in existing data compression method: (1) is excessive or too high to the storage space requirement to the computing expense; (2) effect of compression can't guarantee; (3) compression result is not easy to the memory device management take page or leaf as the minimum memory unit.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of Compression manager method of Fragmentation device, and existing Compression manager method is excessive or too high to the storage space requirement to the computing expense, compression effectiveness can't guarantee and compression result is not easy to the problem that the memory device take page or leaf as the minimum memory unit is managed to solve.
The embodiment of the invention is achieved in that a kind of Compression manager method of Fragmentation device, and described method comprises:
Steps A, set up dictionary take page or leaf as the unit, record the physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dictionary;
Step B, obtain write order, described write order includes the logical page address that page data to be written and described page data to be written write; Obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
Another purpose of the embodiment of the invention is to provide a kind of Compression manager device of Fragmentation device, and described device comprises:
Dictionary is set up the unit, is used for setting up dictionary take page or leaf as the unit, records the physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dictionary;
Processing unit is used for obtaining write order, and described write order includes the logical page address that page data to be written and described page data to be written write; Obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
Can find out from technique scheme, the least unit of data compression is page or leaf in the embodiment of the invention, data in the page or leaf are not carried out compression and decompression, writing and reading of data also is take page or leaf as unit, so the Compression manager method that the embodiment of the invention provides is fit to adopt arithmetic capability deficiency or the low Fragmentation device of cost very much.And the Compression manager method that provides of the embodiment of the invention, data to be written in current write order have deposited dictionary in, data writing not then, data write efficiency that therefore can Effective Raise Fragmentation device, reduce the indegree of writing of data, and then reduce the wearing and tearing of Fragmentation device.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the realization flow figure of the Fragmentation device Compression manager method that provides of the embodiment of the invention one;
Fig. 2 is the realization flow figure of the Fragmentation device Compression manager method that provides of the embodiment of the invention two;
Fig. 3 is the realization flow figure of the Fragmentation device Compression manager method that provides of the embodiment of the invention three;
Fig. 4 is the composition structural drawing of the Fragmentation device Compression manager device that provides of the embodiment of the invention four.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
For technical solutions according to the invention are described, describe below by specific embodiment.
Embodiment one:
Fig. 1 shows the realization flow of the Fragmentation device Compression manager method that the embodiment of the invention one provides, and details are as follows for the method process:
In step S101, set up dictionary take page or leaf as the unit, record the information such as physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dictionary.
In the present embodiment, described Fragmentation device is for take the memory device of page or leaf as the minimum memory unit, namely by piece wipe, by the memory device of page or leaf read-write, such as flash storage device etc.Described page data is the data of storage in the page or leaf.
In step S102, obtain write order, described write order includes the information such as logical page address that page data to be written and described page data to be written write.
In step S103, obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary, if judged result is "Yes", execution in step S105 then, if judged result is "No", execution in step S104 then.
In the present embodiment, obtain the condition code of described page data to be written, the condition code obtained and all condition codes in the described dictionary are compared, judge and whether have the condition code identical with the condition code of obtaining in the described dictionary, if, represent that then the page data to be written in the current write order has deposited described dictionary, execution in step S105 in; If not, execution in step S104.
The condition code of page data all can adopt identical algorithm to obtain in the condition code of page data to be written described in the present embodiment and the described dictionary.Preferably, obtain by hash algorithm.Can certainly adopt other algorithms to obtain, at this not in order to limit the present invention.
Hash (Hash) algorithm belongs to and large data are carried out message takes passages, and obtains the condition code of this segment data, is mainly used in the checking of password authentification and data integrity, also can be used for simultaneously judging whether two segment datas are identical fast.
Take the MD5 hash algorithm as example, following several segment datas in the table 2 for example:
Page data The MD5 value
1234567890abcdefg 7206ddfa511b6ab05734b603c1b88be6
2234567890abcdefg 628cb0947d31075fa305699029ddfecc
0234567890abcdefg df9e94f848b6608dd2af317b693744ba
1234567890abcdefgh ad91a28a12e83ce4999b23260f7785c3
1234567890abcdef 996ce17f6abc9fe126b57aa5f1d8c92c
1234567890abcdefg 7206ddfa511b6ab05734b603c1b88be6
Table 2
As can be seen from Table 2, even page data only changes a little, the condition code after hash algorithm calculates all can produce significant change, therefore adopts hash algorithm calculated characteristics code, can reduce the repetition rate of coding.
In step S104, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written, is about to described page data to be written and is stored to the physical address corresponding with described logical address.
In step S105, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
In the present embodiment, write before the page data to be written in described write order, when namely being present in the Fragmentation device, do not carry out described write command, the physical page address that the page data that the logical page address that only described page data to be written is write points to and described page data to be written has the same signature writes, and these data of reminding user write, so data write efficiency of energy Effective Raise Fragmentation device, reduce the indegree of writing of data, and then reduce the wearing and tearing of Fragmentation device.
Need to prove, the page data address of recording in the described dictionary of present embodiment is physical page address, but also can be logical page address, it is out-of-date to have write before the page data to be written in write order, only needs the logical page address that writes of page data to be written in the current write order is pointed to the logical page address that raw data with the same signature writes and gets final product.In addition, when the record be logical page address the time, when sense data, logical page address need to be converted to physical page address.
As another preferred embodiment of the present invention, in order to reduce the repetition rate of coding, the described condition code of obtaining page data to be written in the write order judges whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes specifically comprises:
When described Fragmentation device is supported multiple hash algorithm, page data to be written in the current write order is carried out repeatedly message to be taken passages, obtain the condition code after each message is taken passages, judge whether exist in the described dictionary and condition code after described each message is taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, the condition code after recording page data in the wherein said dictionary repeatedly message being taken passages;
Perhaps, when described Fragmentation device is supported a kind of hash algorithm, page data to be written in the current write order being carried out the message of repeatedly different skews takes passages, obtain the condition code after each different skew message is taken passages, judge whether exist in the described dictionary and condition code after described each different skew message are taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the repeatedly different condition codes that are offset after message are taken passages of page data in the wherein said dictionary;
Perhaps, when described Fragmentation device is supported bug check and is corrected the ECC code, obtain the ECC code of page data to be written in the current write order and the condition code behind the message extracts, judge the condition code that whether exists simultaneously in the described dictionary after this ECC code and message are taken passages, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the ECC code of page data and the condition code behind the message extracts in the wherein said dictionary;
Perhaps, obtain the condition code of page data to be written in the current write order, when in described dictionary, having the condition code identical with the condition code of obtaining, judge whether N byte in the page data that the same signature is corresponding in N byte and the described dictionary in the described page data to be written be all identical, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes, wherein said N is for greater than zero and be less than or equal to the integer of the size of page or leaf in the described paging memory, if namely the size of page or leaf is the 8k byte in the described paging memory, then described N is less than or equal to the 8k byte.Need to prove that in order not affect efficiency of data compression, above-mentioned comparison procedure can adopt hardware comparator to realize.
Preferably, in order to guarantee further to improve the efficient of data compression in the larger situation of dictionary, the described condition code of obtaining page data to be written in the write order judges whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes specifically comprises:
Obtain the condition code of page data to be written in the current write order, described condition code is carried out message take passages acquisition secondary extracts value, judge and whether have described secondary extracts value in the described dictionary, if exist, judge again and whether have described condition code in the described dictionary, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and records the secondary extracts value of page data character pair code in the wherein said dictionary.Wherein, described secondary extracts value is less than the size of condition code and in the scope that the repetition rate of coding allows.
In the present embodiment, set up in advance feature code table and secondary extracts value table, described feature code table and secondary extracts value table are respectively applied to the condition code of record page data and the secondary extracts value of described condition code.Owing to only need just to have begun the little secondary extracts value table of matched data amount, only in the situation that identical secondary extracts value occurs, just need the large feature code table of comparing data amount, therefore, can greatly improve matching efficiency, and then improve efficiency of data compression.
Below describe in detail by way of example:
In the larger situation of dictionary, 1024 pages or leaves are for example arranged, the condition code that every page data adopts hash algorithm to carry out generating after message is taken passages is 32 bytes, and the feature code table that then generates has 1024 * 32 bytes, searches for System Hardware Requirement higher in such scope.Take passages so described feature code table is carried out secondary, the value after this secondary is taken passages is much smaller than 32 bytes, and in the scope that the repetition rate of coding allows, as shown in table 3.
Raw data The feature code value Secondary extracts value
555555555555555555 130668ae34911a14e4288367b071447a 130668ae
aaaaaaaaaaaaaaaaaaaa 22d42eb002cefa81e9ad604ea57bc01d 22d42eb0
000000000000000000 3ea032bf79e8c116b05f4698d5a8e044 3ea032bf
ffffffffffffffffffffffffffffffff c78068577ec5dc1d06605f291a79174f c7806857
Table 3
Getting front 4 bytes of feature code value (MD5 value) in the table 3 is secondary cryptographic hash (secondary extracts value), whether be used for fast search feature code table has the secondary extracts value of coupling, if there be the value identical with the secondary extracts value of page data to be written in the current write order in the dictionary, then carry out again the coupling of feature code value.
The least unit of data compression is page or leaf in the present embodiment, data in the page or leaf are not carried out compression and decompression, writing and reading of data also is take page or leaf as unit, so the Compression manager method that the embodiment of the invention provides is fit to adopt arithmetic capability deficiency or the low Fragmentation device of cost very much.And the Compression manager method that provides of the embodiment of the invention, data to be written in current write order have deposited dictionary in, data writing not then, data write efficiency that therefore can Effective Raise Fragmentation device, reduce the indegree of writing of data, and then reduce the wearing and tearing of Fragmentation device.
Embodiment two:
Fig. 2 shows the realization flow of the Fragmentation device Compression manager method that the embodiment of the invention two provides, and details are as follows for the method process:
In step S201, set up static dictionary take page or leaf as the unit, record in the described static dictionary and write indegree and be greater than or equal to the information such as physical page address that page data, described page data characteristic of correspondence code and described page data that the page data of first threshold and/or user be concerned about write.
In the present embodiment, described static dictionary is to be fixed in the described Fragmentation device, does not allow the dictionary that upgrades, and described static dictionary can create according to following condition:
1, according to the memory capacity of described Fragmentation device, set the dictionary size (memory capacity) that satisfies certain proportion (such as 1%), for example when the memory capacity of Fragmentation device was 100M, the size of dictionary (memory capacity) was 1M;
2, sample in a large number according to the main range of application of described Fragmentation device, statistical study draws later on best dictionary; For example, will write indegree and be greater than or equal to the data of first threshold (10 times) as the page data in the dictionary;
3, according to user selection self needs (being the data that the user is concerned about), set the dictionary content.
In step S202, obtain write order, described write order includes the information such as logical page address that page data to be written and described page data to be written write;
In step S203, obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary, if judged result is "Yes", execution in step S205 then, if judged result is "No", execution in step S204 then;
Preferably, judge whether there be the condition code identical with the condition code of obtaining in the described static dictionary, if judged result is "Yes", execution in step S205 then, if judged result is "No", execution in step S204 then;
In step S204, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written, is about to described page data to be written and is stored to the physical address corresponding with described logical address;
In step S205, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
As another preferred embodiment of the present invention, in order to reduce the repetition rate of coding, the described condition code of obtaining page data to be written in the write order judges whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes specifically comprises:
When described Fragmentation device is supported multiple hash algorithm, page data to be written in the current write order is carried out repeatedly message to be taken passages, obtain the condition code after each message is taken passages, judge whether exist in the described dictionary and condition code after described each message is taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, the condition code after recording page data in the wherein said dictionary repeatedly message being taken passages;
Perhaps, when described Fragmentation device is supported a kind of hash algorithm, page data to be written in the current write order being carried out the message of repeatedly different skews takes passages, obtain the condition code after each different skew message is taken passages, judge whether exist in the described dictionary and condition code after described each different skew message are taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the repeatedly different condition codes that are offset after message are taken passages of page data in the wherein said dictionary;
Perhaps, when described Fragmentation device is supported bug check and is corrected the ECC code, obtain the ECC code of page data to be written in the current write order and the condition code behind the message extracts, judge the condition code that whether exists simultaneously in the described dictionary after this ECC code and message are taken passages, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the ECC code of page data and the condition code behind the message extracts in the wherein said dictionary;
Perhaps, obtain the condition code of page data to be written in the current write order, when in described dictionary, having the condition code identical with the condition code of obtaining, judge whether N byte in the page data that the same signature is corresponding in N byte and the described dictionary in the described page data to be written be all identical, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes, wherein said N is for greater than zero and be less than or equal to the integer of the size of page or leaf in the described paging memory, if namely the size of page or leaf is the 8k byte in the described paging memory, then described N is less than or equal to the 8k byte.Need to prove that in order not affect efficiency of data compression, above-mentioned comparison procedure can adopt hardware comparator to realize.
Preferably, in order to guarantee further to improve the efficient of data compression in the larger situation of dictionary, the described condition code of obtaining page data to be written in the write order judges whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes specifically comprises:
Obtain the condition code of page data to be written in the current write order, described condition code is carried out message take passages acquisition secondary extracts value, judge and whether have described secondary extracts value in the described dictionary, if exist, judge again and whether have described condition code in the described dictionary, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and records the secondary extracts value of page data character pair code in the wherein said dictionary.Wherein, described secondary extracts value is less than the size of condition code and in the scope that the repetition rate of coding allows.
In the present embodiment, set up in advance feature code table and secondary extracts value table, described feature code table and secondary extracts value table are respectively applied to the condition code of record page data and the secondary extracts value of described condition code.Owing to only need just to have begun the little secondary extracts value table of matched data amount, only in the situation that identical secondary extracts value occurs, just need the large feature code table of comparing data amount, therefore, can greatly improve matching efficiency, and then improve efficiency of data compression.
In the present embodiment, judge according to the static dictionary of setting up in advance whether described page data to be written writes before, owing to comprise the regular data that write in this static dictionary, thus but the efficient that Effective Raise is judged.
Embodiment three:
Fig. 3 shows the realization flow of the Fragmentation device Compression manager method that the embodiment of the invention three provides, and details are as follows for the method process:
In step S301, set up dynamic dictionary take page or leaf as the unit, record the information such as physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dynamic dictionary.
In the present embodiment, described dynamic dictionary is to allow the dictionary that is updated.
In step S302, set Second Threshold (for example 10 times), the indegree of writing of the page data that writes the Fragmentation device is counted.
In step S303, obtain write order, described write order includes the logical page address that page data to be written and described page data to be written write.
In step S304, obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dynamic dictionary, if judged result is "Yes", execution in step S305 then, if judged result is "No", execution in step S306 then.
In step S305, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
In step S306, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written.
In step S307, judge writing indegree and whether reaching described Second Threshold of described page data to be written, if judged result is "Yes", then execution in step S308 if judged result is "No", then finishes this operation.
In step S308, should be updated in the described dynamic dictionary by page data to be written.
Comprise that specifically information updatings such as physical page address that this page data to be written, this page data characteristic of correspondence code to be written and this page data to be written write are in described dynamic dictionary.
As another preferred embodiment of the present invention, become increasing in order to prevent described dynamic dictionary, affect the efficient of data compression and search, also comprise:
When the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete clauses and subclauses invalid in the described dynamic dictionary or untapped clauses and subclauses in Preset Time, described invalid clauses and subclauses are that the writing address of the page data stored in the described dynamic dictionary has write other data, cause this page data invalid; Untapped clauses and subclauses did not write paging memory spare for page data corresponding to these clauses and subclauses in the described Preset Time in Preset Time.
Perhaps, the indegree of writing at described page data continues the indegree of writing of described page data is counted after reaching described Second Threshold, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete and write indegree in the described dynamic dictionary less than the page data of the 4th threshold value.For example the page data of full 0 x8f is write indegree and has been reached 10 times, then this page data is updated to described dynamic dictionary, but the counting of each page data is still continuing in the described dynamic dictionary, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, full 0 x8f page data write indegree less than the 4th threshold value (such as 15 times) time, full 0 x8f page data is deleted from described dynamic dictionary.
As another preferred embodiment of the present invention, in order to reduce the repetition rate of coding, the described condition code of obtaining page data to be written in the write order judges whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes specifically comprises:
When described Fragmentation device is supported multiple hash algorithm, page data to be written in the current write order is carried out repeatedly message to be taken passages, obtain the condition code after each message is taken passages, judge whether exist in the described dictionary and condition code after described each message is taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, the condition code after recording page data in the wherein said dictionary repeatedly message being taken passages;
Perhaps, when described Fragmentation device is supported a kind of hash algorithm, page data to be written in the current write order being carried out the message of repeatedly different skews takes passages, obtain the condition code after each different skew message is taken passages, judge whether exist in the described dictionary and condition code after described each different skew message are taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the repeatedly different condition codes that are offset after message are taken passages of page data in the wherein said dictionary;
Perhaps, when described Fragmentation device is supported bug check and is corrected the ECC code, obtain the ECC code of page data to be written in the current write order and the condition code behind the message extracts, judge the condition code that whether exists simultaneously in the described dictionary after this ECC code and message are taken passages, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the ECC code of page data and the condition code behind the message extracts in the wherein said dictionary;
Perhaps, obtain the condition code of page data to be written in the current write order, when in described dictionary, having the condition code identical with the condition code of obtaining, judge whether N byte in the page data that the same signature is corresponding in N byte and the described dictionary in the described page data to be written be all identical, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes, wherein said N is for greater than zero and be less than or equal to the integer of the size of page or leaf in the described paging memory, if namely the size of page or leaf is the 8k byte in the described paging memory, then described N is less than or equal to the 8k byte.Need to prove that in order not affect efficiency of data compression, above-mentioned comparison procedure can adopt hardware comparator to realize.
Preferably, in order to guarantee further to improve the efficient of data compression in the larger situation of dictionary, the described condition code of obtaining page data to be written in the write order judges whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes specifically comprises:
Obtain the condition code of page data to be written in the current write order, described condition code is carried out message take passages acquisition secondary extracts value, judge and whether have described secondary extracts value in the described dictionary, if exist, judge again and whether have described condition code in the described dictionary, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and records the secondary extracts value of page data character pair code in the wherein said dictionary.Wherein, described secondary extracts value is less than the size of condition code and in the scope that the repetition rate of coding allows.
In the present embodiment, set up in advance feature code table and secondary extracts value table, described feature code table and secondary extracts value table are respectively applied to the condition code of record page data and the secondary extracts value of described condition code.Owing to only need just to have begun the little secondary extracts value table of matched data amount, only in the situation that identical secondary extracts value occurs, just need the large feature code table of comparing data amount, therefore, can greatly improve matching efficiency, and then improve efficiency of data compression.
As another preferred embodiment of the present invention, described dictionary can also comprise static dictionary and dynamic dictionary simultaneously; Page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the data that the user is concerned about;
Described method also comprised before obtaining the step of write order:
Set Second Threshold, the indegree of writing of the page data that writes the Fragmentation device is counted;
The described condition code of obtaining described page data to be written, judge whether exist the condition code identical with the condition code of obtaining specifically to comprise in the described dictionary:
Obtain the condition code of described page data to be written, judge and whether have the condition code identical with the condition code of obtaining in the described static dictionary, if not, the number of times that writes the Fragmentation device according to described page data to be written judges whether needs are updated to described dynamic dictionary to described page data to be written.
Embodiment four:
Fig. 4 shows the composition structure of the Fragmentation device Compression manager device that the embodiment of the invention four provides, and for convenience of explanation, only shows the part relevant with the embodiment of the invention.
This Fragmentation device Compression manager device can be applied in the memory device, can be to run on the unit that software unit, hardware cell or software and hardware in the memory device combine, also can be used as independently, suspension member be integrated in the memory device or runs in the application system of memory device.
This Fragmentation device Compression manager device comprises that dictionary sets up unit 41 and processing unit 42.Wherein, the concrete function of each unit is as follows:
Dictionary is set up unit 41, is used for setting up dictionary take page or leaf as the unit, records the physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dictionary;
Processing unit 42 is used for obtaining write order, and described write order includes the logical page address that page data to be written and described page data to be written write; Obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
Preferably, described dictionary is static dictionary, and the page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the page data that the user is concerned about.
Preferably, described dictionary is dynamic dictionary;
Described processing unit 42 also was used for before obtaining write order, set Second Threshold, and the indegree of writing of the page data that writes the Fragmentation device is counted;
Described processing unit 42 is being carried out described write order, the logical page address that writes according to described page data to be written writes after the described page data to be written, also be used for when the writing indegree and reach described Second Threshold of described page data, this page data being updated in the described dynamic dictionary.
Preferably, described dictionary comprises static dictionary and dynamic dictionary; Page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the data that the user is concerned about;
Described processing unit 42 also was used for before obtaining write order, set Second Threshold, and the indegree of writing of the page data that writes the Fragmentation device is counted;
Described processing unit 42, be used for obtaining the condition code of described page data to be written, judge and whether have the condition code identical with the condition code of obtaining in the described static dictionary, if not, the number of times that writes the Fragmentation device according to described page data to be written judges whether needs are updated to described dynamic dictionary to described page data to be written.
Further be, described processing unit 42 also is used for, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete clauses and subclauses invalid in the described dynamic dictionary or untapped clauses and subclauses in Preset Time, described invalid clauses and subclauses are that the writing address of the page data stored in the described dynamic dictionary has write other data, cause this page data invalid; Untapped clauses and subclauses did not write paging memory spare for page data corresponding to these clauses and subclauses in the described Preset Time in Preset Time; Perhaps,
The indegree of writing at described page data continues the indegree of writing of described page data is counted after reaching described Second Threshold, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete and write indegree in the described dynamic dictionary less than the page data of the 4th threshold value.
Further, described processing unit 42 specifically is used for,
When described Fragmentation device is supported multiple hash algorithm, page data to be written in the current write order is carried out repeatedly message to be taken passages, obtain the condition code after each message is taken passages, judge whether exist in the described dictionary and condition code after described each message is taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, the condition code after recording page data in the wherein said dictionary repeatedly message being taken passages;
Perhaps, when described Fragmentation device is supported a kind of hash algorithm, page data to be written in the current write order being carried out the message of repeatedly different skews takes passages, obtain the condition code after each different skew message is taken passages, judge whether exist in the described dictionary and condition code after described each different skew message are taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the repeatedly different condition codes that are offset after message are taken passages of page data in the wherein said dictionary;
Perhaps, when described Fragmentation device is supported bug check and is corrected the ECC code, obtain the ECC code of page data to be written in the current write order and the condition code behind the message extracts, judge the condition code that whether exists simultaneously in the described dictionary after this ECC code and message are taken passages, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the ECC code of page data and the condition code behind the message extracts in the wherein said dictionary;
Perhaps, obtain the condition code of page data to be written in the current write order, when in described dictionary, having the condition code identical with the condition code of obtaining, judge whether N byte in the page data that the same signature is corresponding in N byte and the described dictionary in the described page data to be written be all identical, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and wherein said N is for greater than zero and be less than or equal to the integer of the size of page or leaf in the described paging memory.
Further, described processing unit 42 specifically is used for,
Obtain the condition code of page data to be written in the current write order, again described condition code is carried out message and take passages acquisition secondary extracts value, judge and whether have described secondary extracts value in the described dictionary, if exist, judge again and whether have described condition code in the described dictionary, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and records the secondary extracts value of page data character pair code in the wherein said dictionary.
In the present embodiment, the condition code of described page data can be obtained by hash algorithm.
The Fragmentation device Compression manager device that present embodiment provides can use the Fragmentation device Compression manager method in aforementioned correspondence, and details do not repeat them here referring to the associated description of above-mentioned Fragmentation device Compression manager embodiment of the method one to three.
One of ordinary skill in the art will appreciate that as above-described embodiment four included units are to divide according to function logic, but be not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit also just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In sum, the least unit of data compression is page or leaf in the embodiment of the invention, data in the page or leaf are not carried out compression and decompression, writing and reading of data also is take page or leaf as unit, so the Compression manager method that the embodiment of the invention provides is fit to adopt arithmetic capability deficiency or the low Fragmentation device of cost very much.And the Compression manager method that provides of the embodiment of the invention, data to be written in current write order have deposited dictionary in, data writing not then, data write efficiency that therefore can Effective Raise Fragmentation device, reduce the indegree of writing of data, and then reduce the wearing and tearing of Fragmentation device.In addition, the embodiment of the invention can effectively reduce the repetition rate of coding in the comparison procedure by multiple manner of comparison, and can improve efficient and the efficiency of data compression of coupling, has stronger ease for use and practicality.
Above content is the further description of the present invention being done in conjunction with concrete preferred implementation, can not assert that implementation of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention; make without departing from the inventive concept of the premise some alternative or obvious modification that are equal to; and performance or purposes are identical, all should be considered as belonging to the scope of patent protection that the present invention is determined by claims of submitting to.

Claims (18)

1. the Compression manager method of a Fragmentation device is characterized in that, described method comprises:
Steps A, set up dictionary take page or leaf as the unit, record the physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dictionary;
Step B, obtain write order, described write order includes the logical page address that page data to be written and described page data to be written write; Obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
2. the method for claim 1 is characterized in that, described dictionary is static dictionary, and the page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the data that the user is concerned about.
3. the method for claim 1 is characterized in that, described dictionary is dynamic dictionary;
Described method also comprised before obtaining the step of write order:
Set Second Threshold, the indegree of writing of the page data that writes the Fragmentation device is counted;
At the described write order of described execution, the logical page address that writes according to described page data to be written also comprises after writing described page data step to be written:
When the writing indegree and reach described Second Threshold of described page data to be written, should be updated in the described dynamic dictionary by page data to be written.
4. the method for claim 1 is characterized in that, described dictionary comprises static dictionary and dynamic dictionary; Page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the data that the user is concerned about;
Described method also comprised before obtaining the step of write order:
Set Second Threshold, the indegree of writing of the page data that writes the Fragmentation device is counted;
The described condition code of obtaining described page data to be written, judge whether exist the condition code identical with the condition code of obtaining specifically to comprise in the described dictionary:
Obtain the condition code of described page data to be written, judge and whether have the condition code identical with the condition code of obtaining in the described static dictionary, if not, the number of times that writes the Fragmentation device according to described page data to be written judges whether needs are updated to described dynamic dictionary to described page data to be written.
5. such as claim 3 or 4 described methods, it is characterized in that described method also comprises:
When the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete clauses and subclauses invalid in the described dynamic dictionary or untapped clauses and subclauses in Preset Time, described invalid clauses and subclauses are that the writing address of the page data stored in the described dynamic dictionary has write other data, cause this page data invalid; Untapped clauses and subclauses did not write paging memory spare for page data corresponding to these clauses and subclauses in the described Preset Time in Preset Time.
6. such as claim 3 or 4 described methods, it is characterized in that described method also comprises:
The indegree of writing at described page data continues the indegree of writing of described page data is counted after reaching described Second Threshold, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete and write indegree in the described dynamic dictionary less than the page data of the 4th threshold value.
7. the method for claim 1 is characterized in that, described step B specifically comprises:
When described Fragmentation device is supported multiple hash algorithm, page data to be written in the current write order is carried out repeatedly message to be taken passages, obtain the condition code after each message is taken passages, judge whether exist in the described dictionary and condition code after described each message is taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, the condition code after recording page data in the wherein said dictionary repeatedly message being taken passages;
Perhaps, when described Fragmentation device is supported a kind of hash algorithm, page data to be written in the current write order being carried out the message of repeatedly different skews takes passages, obtain the condition code after each different skew message is taken passages, judge whether exist in the described dictionary and condition code after described each different skew message are taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the repeatedly different condition codes that are offset after message are taken passages of page data in the wherein said dictionary;
Perhaps, when described Fragmentation device is supported bug check and is corrected the ECC code, obtain the ECC code of page data to be written in the current write order and the condition code behind the message extracts, judge the condition code that whether exists simultaneously in the described dictionary after this ECC code and message are taken passages, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the ECC code of page data and the condition code behind the message extracts in the wherein said dictionary;
Perhaps, obtain the condition code of page data to be written in the current write order, when in described dictionary, having the condition code identical with the condition code of obtaining, judge whether N byte in the page data that the same signature is corresponding in N byte and the described dictionary in the described page data to be written be all identical, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and wherein said N is for greater than zero and be less than or equal to the integer of the size of page or leaf in the described paging memory.
8. the method for claim 1 is characterized in that, described step B specifically comprises:
Obtain the condition code of page data to be written in the current write order, described condition code is carried out message take passages acquisition secondary extracts value, judge and whether have described secondary extracts value in the described dictionary, if exist, judge again and whether have described condition code in the described dictionary, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and records the secondary extracts value of page data character pair code in the wherein said dictionary.
9. such as each described method of claim 1 to 8, it is characterized in that the described condition code of obtaining described page data to be written specifically comprises:
Obtain the condition code of described page data to be written by hash algorithm.
10. the Compression manager device of a Fragmentation device is characterized in that, described device comprises:
Dictionary is set up the unit, is used for setting up dictionary take page or leaf as the unit, records the physical page address that page data, described page data characteristic of correspondence code and described page data write in the described dictionary;
Processing unit is used for obtaining write order, and described write order includes the logical page address that page data to be written and described page data to be written write; Obtain the condition code of described page data to be written, judge whether there be the condition code identical with the condition code of obtaining in the described dictionary; If not, carry out described write order, the logical page address that writes according to described page data to be written writes described page data to be written; If do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that described page data to be written is write writes.
11. device as claimed in claim 10 is characterized in that, described dictionary is static dictionary, and the page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the page data that the user is concerned about.
12. device as claimed in claim 10 is characterized in that, described dictionary is dynamic dictionary;
Described processing unit also was used for before obtaining write order, set Second Threshold, and the indegree of writing of the page data that writes the Fragmentation device is counted;
Described processing unit is being carried out described write order, the logical page address that writes according to described page data to be written writes after the described page data to be written, also be used for when the writing indegree and reach described Second Threshold of described page data, this page data being updated in the described dynamic dictionary.
13. device as claimed in claim 10 is characterized in that, described dictionary comprises static dictionary and dynamic dictionary; Page data in the described static dictionary is to write indegree to be greater than or equal to the data of first threshold and/or the data that the user is concerned about;
Described processing unit also was used for before obtaining write order, set Second Threshold, and the indegree of writing of the page data that writes the Fragmentation device is counted;
Described processing unit, be used for obtaining the condition code of described page data to be written, judge and whether have the condition code identical with the condition code of obtaining in the described static dictionary, if not, the number of times that writes the Fragmentation device according to described page data to be written judges whether needs are updated to described dynamic dictionary to described page data to be written.
14. such as claim 12 or 13 described devices, it is characterized in that, described processing unit also is used for, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete clauses and subclauses invalid in the described dynamic dictionary or untapped clauses and subclauses in Preset Time, described invalid clauses and subclauses are that the writing address of the page data stored in the described dynamic dictionary has write other data, cause this page data invalid; Untapped clauses and subclauses did not write paging memory spare for page data corresponding to these clauses and subclauses in the described Preset Time in Preset Time.
15. such as claim 12 or 13 described devices, it is characterized in that, described processing unit also is used for, the indegree of writing at described page data continues the indegree of writing of described page data is counted after reaching described Second Threshold, when the memory capacity of described dynamic dictionary reaches the 3rd threshold value, delete and write indegree in the described dynamic dictionary less than the page data of the 4th threshold value.
16. device as claimed in claim 10 is characterized in that, described processing unit specifically is used for,
When described Fragmentation device is supported multiple hash algorithm, page data to be written in the current write order is carried out repeatedly message to be taken passages, obtain the condition code after each message is taken passages, judge whether exist in the described dictionary and condition code after described each message is taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, the condition code after recording page data in the wherein said dictionary repeatedly message being taken passages;
Perhaps, when described Fragmentation device is supported a kind of hash algorithm, page data to be written in the current write order being carried out the message of repeatedly different skews takes passages, obtain the condition code after each different skew message is taken passages, judge whether exist in the described dictionary and condition code after described each different skew message are taken passages identical condition code all, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the repeatedly different condition codes that are offset after message are taken passages of page data in the wherein said dictionary;
Perhaps, when described Fragmentation device is supported bug check and is corrected the ECC code, obtain the ECC code of page data to be written in the current write order and the condition code behind the message extracts, judge the condition code that whether exists simultaneously in the described dictionary after this ECC code and message are taken passages, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the physical page address that the page data that logical page address points to and described page data to be written has the same signature that page data to be written in the current write order is write writes records the ECC code of page data and the condition code behind the message extracts in the wherein said dictionary;
Perhaps, obtain the condition code of page data to be written in the current write order, when in described dictionary, having the condition code identical with the condition code of obtaining, judge whether N byte in the page data that the same signature is corresponding in N byte and the described dictionary in the described page data to be written be all identical, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and wherein said N is for greater than zero and be less than or equal to the integer of the size of page or leaf in the described paging memory.
17. device as claimed in claim 10 is characterized in that, described processing unit specifically is used for,
Obtain the condition code of page data to be written in the current write order, again described condition code is carried out message and take passages acquisition secondary extracts value, judge and whether have described secondary extracts value in the described dictionary, if exist, judge again and whether have described condition code in the described dictionary, if not, carry out current write order, the logical page address that writes according to page data to be written in the current write order writes described page data to be written; If, do not carry out described write order, the logical page address that page data to be written in the current write order is write points to the physical page address that the page data that has the same signature with described page data to be written writes, and records the secondary extracts value of page data character pair code in the wherein said dictionary.
18., it is characterized in that described processing unit is for the condition code of obtaining described page data to be written by hash algorithm such as each described device of claim 10 to 17.
CN201210519408.0A 2012-12-06 2012-12-06 A kind of Compression manager method of Fragmentation device and device Active CN103049388B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210519408.0A CN103049388B (en) 2012-12-06 2012-12-06 A kind of Compression manager method of Fragmentation device and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210519408.0A CN103049388B (en) 2012-12-06 2012-12-06 A kind of Compression manager method of Fragmentation device and device

Publications (2)

Publication Number Publication Date
CN103049388A true CN103049388A (en) 2013-04-17
CN103049388B CN103049388B (en) 2015-12-23

Family

ID=48062035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210519408.0A Active CN103049388B (en) 2012-12-06 2012-12-06 A kind of Compression manager method of Fragmentation device and device

Country Status (1)

Country Link
CN (1) CN103049388B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202138A (en) * 2015-06-01 2016-12-07 三星电子株式会社 Storage device and method for autonomous space compression
CN106970826A (en) * 2017-03-10 2017-07-21 浙江大学 A kind of page fault solution based on big page
US11042328B2 (en) 2015-06-01 2021-06-22 Samsung Electronics Co., Ltd. Storage apparatus and method for autonomous space compaction

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6374266B1 (en) * 1998-07-28 2002-04-16 Ralph Shnelvar Method and apparatus for storing information in a data processing system
CN101067800A (en) * 2007-07-05 2007-11-07 炬力集成电路设计有限公司 Memory deterioration balance method based on local sampling
CN101630290A (en) * 2009-08-17 2010-01-20 成都市华为赛门铁克科技有限公司 Method and device of processing repeated data
CN101719099A (en) * 2009-11-26 2010-06-02 成都市华为赛门铁克科技有限公司 Method and device for reducing write amplification of solid state disk
CN102646069A (en) * 2012-02-23 2012-08-22 华中科技大学 Method for prolonging service life of solid-state disk
CN102722455A (en) * 2012-05-22 2012-10-10 深圳市江波龙电子有限公司 Method and device for storing data in flash memory equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6374266B1 (en) * 1998-07-28 2002-04-16 Ralph Shnelvar Method and apparatus for storing information in a data processing system
CN101067800A (en) * 2007-07-05 2007-11-07 炬力集成电路设计有限公司 Memory deterioration balance method based on local sampling
CN101630290A (en) * 2009-08-17 2010-01-20 成都市华为赛门铁克科技有限公司 Method and device of processing repeated data
CN101719099A (en) * 2009-11-26 2010-06-02 成都市华为赛门铁克科技有限公司 Method and device for reducing write amplification of solid state disk
CN102646069A (en) * 2012-02-23 2012-08-22 华中科技大学 Method for prolonging service life of solid-state disk
CN102722455A (en) * 2012-05-22 2012-10-10 深圳市江波龙电子有限公司 Method and device for storing data in flash memory equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202138A (en) * 2015-06-01 2016-12-07 三星电子株式会社 Storage device and method for autonomous space compression
US11042328B2 (en) 2015-06-01 2021-06-22 Samsung Electronics Co., Ltd. Storage apparatus and method for autonomous space compaction
CN106202138B (en) * 2015-06-01 2022-04-01 三星电子株式会社 Storage device and method for autonomic space compression
CN106970826A (en) * 2017-03-10 2017-07-21 浙江大学 A kind of page fault solution based on big page
CN106970826B (en) * 2017-03-10 2020-05-08 浙江大学 Large page-based missing page abnormity solving method

Also Published As

Publication number Publication date
CN103049388B (en) 2015-12-23

Similar Documents

Publication Publication Date Title
US11036799B2 (en) Low RAM space, high-throughput persistent key value store using secondary memory
CN101916228B (en) Flash translation layer (FTL) with data compression function and implementation method
CN108427538B (en) Storage data compression method and device of full flash memory array and readable storage medium
US8645334B2 (en) Minimize damage caused by corruption of de-duplicated data
US8051252B2 (en) Method and apparatus for detecting the presence of subblocks in a reduced-redundancy storage system
WO2016107272A1 (en) Solid state disk storage device, and data accessing method for solid state disk storage device
CN106537327A (en) Flash memory compression
CN104238962B (en) The method and device of data is write into caching
CN103559027A (en) Design method of separate-storage type key-value storage system
WO2022143540A1 (en) Block chain index storage method and apparatus, computer device and medium
CN102467572B (en) Data block inquiring method for supporting data de-duplication program
CN103020317A (en) Device and method for data compression based on data deduplication
CN102147768B (en) Memory, solid caching system and caching data processing method
US20110004720A1 (en) Method and apparatus for performing full range random writing on a non-volatile memory
CN105117351A (en) Method and apparatus for writing data into cache
WO2020007288A1 (en) Method and system for managing memory data and maintaining data in memory
CN103678158B (en) A kind of data layout optimization method and system
CN103152430B (en) A kind of reduce the cloud storage method that data take up room
CN103473266A (en) Solid state disk and method for deleting repeating data thereof
CN107924292A (en) Hardware-accelerated type storage compression
CN105447168A (en) Method for restoring and recombining fragmented files in MP4 format
US8924642B2 (en) Monitoring record management method and device
CN103049388B (en) A kind of Compression manager method of Fragmentation device and device
CN104462388A (en) Redundant data cleaning method based on cascade storage media
Liu et al. A High Performance Memory Key-Value Database Based on Redis.

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20171124

Address after: 528400 Zhongshan Zhongshan Torch Development Zone, Guangdong Province, No. 191, No. seven

Patentee after: ZHONGSHAN JIANGBOLONG ELECTRONICS CO., LTD.

Address before: 518000, Guangdong, Nanshan District Province, Shenzhen Road, No. 8 financial services technology innovation base, 8 floor, A, B, C, D, E,, F1

Patentee before: Shenzhen jiangbolong Electronic Co., Ltd.

TR01 Transfer of patent right