# US 2014/0156913 A1 · Data processing method, memory controller and memory storage apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0156913 A1
- Document ID: US20140156913A1
- Status: Published application
- Kind: A1
- Application number: 13/845,040
- Filed: 2013-03-17
- Published: 2014-06-05
- Earliest claimed: 2012-12-05
- Assignees: Phison Electronics Corp.
- Applicants: Phison Electronics Corp.
- Inventors: Hsu-Chih Chiang
- Web page: https://patentgrep.com/patent/US20140156913A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 3/06: Digital input from, or digital output to, record carriers {, e.g. RAID, emulated record carriers or networked record carriers}
- G06F 3/0622: {in relation to access}
- G06F 3/0635: {by changing the path, e.g. traffic rerouting, path reconfiguration}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 3/0688: {Non-volatile semiconductor memory arrays}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data processing method, a memory controller and a memory storage apparatus are provided. The method includes receiving a write command from a host system. A write data stream corresponding to the write command includes multiple sub-data streams, and each of the sub-data streams is attached with a data index mark by an application installed in the host system. The application determines the data index mark attached to each sub-data stream in accordance with a first rule including a predetermined function, an initial parameter selecting manner and a parameter increasing manner, in which the first rule is pre-agreed by the application with the memory storage apparatus. The method also includes reordering the sub-data streams according to the first rule and the data index mark of each sub-data stream. The method further includes transmitting the reordered sub-data streams to a smartcard chip in the memory storage apparatus.

## Claims

### Claim 1

A method of data processing, for a memory storage apparatus having a rewritable non-volatile memory module and a smartcard chip, wherein the rewritable non-volatile memory module comprises a plurality of physical erase units, and each of the physical erase units comprises a plurality of physical program units, the method comprising:
receiving a write command from a host system, wherein a write data stream corresponding to the write command comprises a plurality of sub-data streams, and each of the sub-data stream is attached with a data index mark by an application installed in the host system, wherein the write data stream corresponds to an original data stream to be transmitted to the memory storage apparatus by the application, and a first rule is pre-agreed by the memory storage apparatus with the application, wherein the first rule comprises a predetermined function, an initial parameter selecting manner and a parameter increasing manner, and the application selects an initial parameter according to the initial parameter selecting manner, substitutes the initial parameter into the predetermined function so as to obtain the data index mark attached to a first sub-data stream in the original data stream and determines the data index mark individually attached to each of the other sub-data streams among the sub-data streams according to the parameter increasing manner, the data index mark of the first sub-data stream and a sequence of the sub-data streams in the original data stream;
reordering the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams; and
transmitting the reordered sub-data streams to the smartcard chip.

### Claim 2 (depends on 1)

The method according to claim 1, wherein an operation system is installed in the host system, the application transmits the original data stream to the memory storage apparatus via the operation system and divides the original data stream into the plurality of sub-data streams according to a capacity of a basic access unit, and a sequence of the sub-data streams in the write data stream is identical to or different from the sequence of sub-data streams in the original data stream.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the step of reordering the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams comprises:
confirming the initial parameter selected by the application according to the initial parameter selecting manner;
substituting the initial parameter into the predetermined function so as to obtain a function value; and
reordering the sub-data streams to comply with the original data stream according to the function value, the parameter increasing manner and the data index mark of each of the sub-data streams.

### Claim 4 (depends on 1)

The method according to claim 1, wherein a plurality of logical erase units are configured for mapping to a portion of the physical erase units, the plurality of logical erase units is at least formatted to a file allocation table (FAT) area, a root directory area and a file area, a plurality of communication files are stored in the file area, and the application selects one of the communication files according to a second rule pre-agreed by the memory storage apparatus with the application and attaches a file identification mark corresponding to the selected communication file to one of the sub-data streams.

### Claim 5 (depends on 4)

The method according to claim 4, wherein after the step of receiving the write command from the host system, the method further comprises:
confirming the communication file selected from the communication files by the application according to the second rule; and
performing the step of reordering the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams only when the file identification mark attached to the one of the sub-data stream corresponds to the confirmed communication file.

### Claim 6 (depends on 5)

The method according to claim 5, wherein after the step of transmitting the reordered sub-data streams to the smartcard chip, the method further comprises:
transmitting a response message to the host system via the communication file confirmed according to the second rule, wherein the response message comprises the file identification mark corresponding to the confirmed communication file.

### Claim 7

A memory controller, configured in a memory storage apparatus having a rewritable non-volatile memory module and a smartcard chip, the memory controller comprising:
a host interface, configured to couple to a host system;
a memory interface, configured to couple to the rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has a plurality of physical erase units, and each of the physical erase units has a plurality of physical program units; and
a memory management circuit, coupled to the host interface and the memory interface and receive a write command from the host system,
wherein a write data stream corresponding to the write command comprises a plurality of sub-data streams, and each of the sub-data streams is attached with a data index mark by an application installed in the host system,
wherein the write data stream corresponds to an original data stream to be transmitted to the memory storage apparatus by the application, and a first rule is pre-agreed by the memory storage apparatus with the application, wherein the first rule comprises a predetermined function, an initial parameter selecting manner and a parameter increasing manner,
wherein the application selects an initial parameter according to the initial parameter selecting manner, substitutes the initial parameter into the predetermined function so as to obtain the data index mark attached to a first sub-data stream in the original data stream and determines the data index mark individually attached to each of the other sub-data streams among the sub-data streams according to the parameter increasing manner, the data index mark of the first sub-data stream and a sequence of the sub-data streams in the original data stream,
wherein the memory management circuit is further configured to reorder the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams, and
wherein the memory management circuit is further configured to transmit the reordered sub-data streams to the smartcard chip.

### Claim 8 (depends on 7)

The memory controller according to claim 7, wherein an operation system is installed in the host system, the application transmits the original data stream to the memory storage apparatus via the operation system and divides the original data stream into the plurality of sub-data streams according to a capacity of a basic access unit, and a sequence of the sub-data streams in the write data stream is identical to or different from the sequence of sub-data streams in the original data stream.

### Claim 9 (depends on 7)

The memory controller according to claim 7, wherein when reordering the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams, the memory management circuit confirms the initial parameter selected by the application according to the initial parameter selecting manner, substitutes the initial parameter into the predetermined function so as to obtain a function value and reorders the sub-data streams to comply with the original data stream according to the function value, the parameter increasing manner and the data index mark of each of the sub-data streams.

### Claim 10 (depends on 7)

The memory controller according to claim 7, wherein the memory management circuit configures a plurality of logical erase units for mapping to a portion of the physical erase units, formats the plurality of logical erase units to a file allocation table (FAT) area, a root directory area and a file area and stores a plurality of communication files in the file area,
wherein the application selects one of the communication files according to a second rule pre-agreed by the memory storage apparatus with the application and attaches a file identification mark corresponding to the selected communication file to one of the sub-data streams.

### Claim 11 (depends on 10)

The memory controller according to claim 10, wherein the memory management circuit is further configured to confirm the communication file selected from the communication files by the application according to the second rule after the write command from the host system is received and reorder the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams only when the file identification mark attached to the one of the sub-data stream corresponds to the confirmed communication file.

### Claim 12 (depends on 11)

The memory controller according to claim 11, wherein after the reordered sub-data streams are transmitted to the smartcard chip, the memory management circuit is further configured to transmit a response message to the host system via the communication file confirmed according to the second rule, wherein the response message comprises the file identification mark corresponding to the confirmed communication file.

### Claim 13

A memory storage apparatus, comprising:
a connector, configured to couple to a host system;
a rewritable non-volatile memory module, having a plurality of physical erase units, and each of the physical erase units having a plurality of physical program units;
a smartcard chip; and
a memory controller, coupled to the connector, the rewritable non-volatile memory module and the smartcard chip and configured to receive a write command from the host system,
wherein a write data stream corresponding to the write command comprises a plurality of sub-data streams, and each of the sub-data streams is attached with a data index mark by an application installed in the host system,
wherein the write data stream corresponds to an original data stream to be transmitted to the memory storage apparatus by the application, and a first rule is pre-agreed by the memory storage apparatus with the application, wherein the first rule comprises a predetermined function, an initial parameter selecting manner and a parameter increasing manner,
wherein the application selects an initial parameter according to the initial parameter selecting manner, substitutes the initial parameter into the predetermined function so as to obtain the data index mark attached to a first sub-data stream in the original data stream and determines the data index mark individually attached to each of the other sub-data streams among the sub-data streams according to the parameter increasing manner, the data index mark of the first sub-data stream and a sequence of the sub-data streams in the original data stream,
wherein the memory controller is further configured to reorder the sub-data streams according to the first rule pre-agreed with the application, and the data index mark of each of the sub-data streams, and
wherein the memory controller is further configured to transmit the reordered sub-data streams to the smartcard chip.

### Claim 14 (depends on 13)

The memory storage apparatus according to claim 13, wherein an operation system is installed in the host system, the application transmits the original data stream to the memory storage apparatus via the operation system and divides the original data stream into the plurality of sub-data streams according to a capacity of a basic access unit, and a sequence of the sub-data streams in the write data stream is identical to or different from the sequence of sub-data streams in the original data stream.

### Claim 15 (depends on 13)

The memory storage apparatus according to claim 13, wherein when reordering the sub-data streams according to the first rule pre-agreed with the application and the data index mark of each of the sub-data streams, the memory controller confirms the initial parameter selected by the application according to the initial parameter selecting manner, substitutes the initial parameter into the predetermined function so as to obtain a function value and reorders the sub-data streams to comply with the original data stream according to the function value, the parameter increasing manner and the data index mark of each of the sub-data streams.

### Claim 16 (depends on 13)

The memory storage apparatus according to claim 13, wherein the memory controller configures a plurality of logical erase units for mapping to a portion of the physical erase units, formats the plurality of logical erase units to a file allocation table (FAT) area, a root directory area and a file area and stores a plurality of communication files in the file area,
wherein the application selects one of the communication files according to a second rule pre-agreed by the memory storage apparatus with the application and attaches a file identification mark corresponding to the selected communication file to one of the sub-data streams.

### Claim 17 (depends on 16)

The memory storage apparatus according to claim 16, wherein the memory controller is further configured to confirm the communication file selected from the communication files by the application according to the second rule after the write command from the host system is received and reorder the sub-data streams according to the first rule pre-agreed with the host system and the data index mark of each of the sub-data streams only when the file identification mark attached to the one of the sub-data stream corresponds to the confirmed communication file.

### Claim 18 (depends on 17)

The memory storage apparatus according to claim 17, wherein after the reordered sub-data streams are transmitted to the smartcard chip, the memory controller is further configured to transmit a response message to the host system via the communication file confirmed according to the second rule, wherein the response message comprises the file identification mark corresponding to the confirmed communication file.
