An information storage device includes a memory and a processor coupled to the memory. The memory is configured to store therein a plurality of data. The processor is configured to receive a write request of writing first data to the memory. The processor is configured to perform an exclusive OR operation on the first data and second data of the plurality of data to obtain first difference data. The processor is configured to encode the first difference data by a run-length encoding to obtain encoded data. The processor is configured to determine whether a first size of the encoded data is smaller than a predetermined threshold value. The processor is configured to store, upon determining that the first size is smaller than the predetermined threshold value, the encoded data in the memory in association with first position information indicating a position of the second data.
Legal claims defining the scope of protection, as filed with the USPTO.
1. An information storage device, comprising: a memory configured to store therein a plurality of data; and a processor coupled to the memory and configured to: receive a write request of writing a first data to the memory; perform an exclusive OR operation on the first data and a second data of the plurality of data to obtain first difference data; encode the first difference data by a run-length encoding to obtain first encoded data; determine whether a first size of the first encoded data is smaller than a predetermined threshold value; when it is determined that the first size of the first encoded data is equal to or larger than the predetermined threshold value, perform the exclusive OR operation on the first data and one of the plurality of data different from the second data to obtain second difference data; encode the second difference data by the run-length encoding to obtain second encoded data; determine whether a second size of the second encoded data is smaller than the predetermined threshold value, and when it is determined that the second size of the second encoded data is smaller than the predetermined threshold value, store the second encoded data in the memory in association with first position information indicating a position of the second data that serves as duplicated data of the first data, and when it is determined that the first size of the first encoded data is smaller than the predetermined threshold value, store the first encoded data in the memory in association with the first position information indicating the position of the second data in order to remove the second data of the plurality of data stored in the memory that serves as the duplicated data of the first data.
2. The information storage device according to claim 1 , wherein the write request includes the first data and a first address of a write destination in which the first data is to be written, and the processor is configured to: store, upon determining that the first size of the first encoded data is smaller than the predetermined threshold value, the first address in the memory in association with second position information indicating a position of the first encoded data.
3. The information storage device according to claim 2 , wherein the processor is configured to: receive a read request of reading data, the read request including the first address; determine, on basis of information stored in the memory, whether data corresponding to the first address is one of the plurality of data and the first encoded data; obtain, upon determining that data corresponding to the first address is the first encoded data, position information associated with the first address in the memory; decode the first encoded data stored in a position indicated by the obtained position information to obtain decoded data; perform the exclusive OR operation on the decoded data and data stored in a position indicated by position information stored in the position indicated by the obtained position information to obtain return data; and transmit the return data in response to the read request.
4. The information storage device according to claim 1 , wherein the processor is configured to: perform the exclusive OR operation on the first data and each of the plurality of data to obtain each difference data; encode each difference data by the run-length encoding to obtain each encoded data; determine whether each size of each encoded data is smaller than the predetermined threshold value; and determine, upon determining that each size is equal to or larger than the predetermined threshold value for all of the plurality of data, whether a number of in a binary notation of the first data is smaller than a half of a number of bits in the binary notation of the first data; perform, upon determining that the number of l's in the binary notation is smaller than a half of the number of bits in the binary notation of the first data, bit inversion on every bit of the binary notation of the first data to obtain a first bit-inverted data; store the first bit-inverted data in the memory; and store full-bit data in the memory in association with third position information, the full-bit data being encoded data obtained by encoding a first binary data by the run-length encoding, the first binary data being a bit string of 1's, the third position information indicating a position of the first bit-inverted data.
5. A method for removing duplicated data, the method comprising: receiving, by a computer, a write request of writing first data to a memory storing therein a plurality of data; performing an exclusive OR operation on the first data and second data of the plurality of data to obtain first difference data; encoding the first difference data by a run-length encoding to obtain first encoded data; determining whether a first size of the first encoded data is smaller than a predetermined threshold value; when it is determined that the first size of the first encoded data is equal to or larger than the predetermined threshold value, performing the exclusive OR operation on the first data and one of the plurality of data different from the second data to obtain second difference data; encoding the second difference data by the run-length encoding to obtain second encoded data; determining whether a second size of the encoded data is smaller than the predetermined threshold value, and when it is determined that the second size of the second encoded data is smaller than the predetermined threshold value, store the second encoded data in the memory in association with first position information indicating a position of the second data that serves as duplicated data of the first data; and when it is determined that the first size of the first encoded data is smaller than the predetermined threshold value, storing the first encoded data in the memory in association with the first position information indicating the position of the second data in order to remove the second data of the plurality of data stored in the memory that serves as the duplicated data of the first data.
6. A non-transitory computer-readable recording medium having stored therein a program that causes a computer to execute a process, the process comprising: receiving a write request of writing first data to a memory storing therein a plurality of data; performing an exclusive OR operation on the first data and second data of the plurality of data to obtain first difference data; encoding the first difference data by a run-length encoding to obtain first encoded data; determining whether a first size of the first encoded data is smaller than a predetermined threshold value; when it is determined that the first size of the first encoded data is equal to or larger than the predetermined threshold value, performing the exclusive OR operation on the first data and one of the plurality of data different from the second data to obtain second difference data; encoding the second difference data by the run-length encoding to obtain second encoded data; determining whether a second size of the second encoded data is smaller than the predetermined threshold value, and when it is determined that the second size of the second encoded data is smaller than the predetermined threshold value, storing the second encoded data in the memory in association with first position information indicating a position of the second data that serves as duplicated data of the first data, and when it is determined that the first size of the first encoded data is smaller than the predetermined threshold value, storing the first encoded data in the memory in association with the first position information indicating the position of the second data in order to remove the second data of the plurality of data stored in the memory that serves as the duplicated data of the first data.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
March 29, 2017
February 18, 2020
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.