# US 2015/0106697 A1 · Method and electronic device for processing e-book document

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

- Number: US 2015/0106697 A1
- Document ID: US20150106697A1
- Status: Published application
- Kind: A1
- Application number: 14/471,702
- Filed: 2014-08-28
- Published: 2015-04-16
- Earliest claimed: 2013-10-16
- Assignees: Xiaomi Inc.
- Applicants: Xiaomi Inc.
- Inventors: Jiafang Zhang; Lei Zhang
- Web page: https://patentgrep.com/patent/US20150106697A1

## CPC

- G06F 40/131: Fragmentation of text files, e.g. creating reusable text-blocks; Linking to fragments, e.g. using XInclude; Namespaces
- G06F 40/106: Display of layout of documents; Previewing
- G06F 40/143: Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
- G06F 40/221: Parsing markup language streams (streaming G06F40/149)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for processing an e-book document, includes: obtaining an e-book document; dividing content of the e-book document into a plurality of segments in accordance with a preset segmentation manner; composing the plurality of segments into an ordered segment group; selecting one segment from the segment group as a current segment; parsing the content of the current segment to generate layout data; and generating a page image in accordance with the layout data.

## Claims

### Claim 1

A method for processing an e-book document, comprising:
obtaining an e-book document;
dividing content of the e-book document into a plurality of segments in accordance with a preset segmentation manner;
composing the plurality of segments into an ordered segment group;
selecting one segment from the segment group as a current segment;
parsing the content of the current segment to generate layout data; and
generating a page image in accordance with the layout data.

### Claim 2 (depends on 1)

The method according to claim 1, after the generating the layout data, further comprising:
recording position information of the current segment in the segment group; and
judging whether a data amount of the layout data is less than a preset value and, if the data amount is less than the preset value, selecting a next segment to the current segment according to the position information, using the next segment as the current segment, and repeating the parsing of the content of the current segment.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the dividing of the content of the e-book document into the plurality of segments in accordance with the preset segmentation manner comprises:
determining a segment size; and
dividing the content of the e-book document into the plurality of segments having the same segment size.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
judging whether information of a start point of a present segment is complete and, if the information is not complete, moving the start point of the present segment toward a last segment to determine a start point of the information, and using the start point of the information as the start point of the present segment and an end point of the last segment.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
judging whether information of a start point of a present segment is complete and, if the information is not complete, moving the start point of the present segment toward an end point of the present segment to determine an end point of the information, and using the end point of the information as the start point of the present segment and an end point of a last segment.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
judging whether information of an end point of a present segment is complete and, if the information is not complete, moving the end point of the present segment toward a next segment to determine an end point of the information, and using the end point of the information as the end point of the present segment and a start point of the next segment.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
judging whether information of an end point of a present segment is complete and, if the information is not complete, moving the end point of the present segment toward a start point of the present segment to determine a start point of the information, and using the start point of the information as the end point of the present segment and a start point of a next segment.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising:
judging whether layout atom data contained in the layout data is used within a preset time period and, if the layout atom data is not used within the preset time period, deleting the layout atom data.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
judging whether a memory space occupied by layout atom data contained in the layout data is greater than a preset value and, if the occupied memory space is greater than the preset value, deleting the layout atom data.

### Claim 10

An electronic device, comprising:
a processor; and
a memory for storing instructions executable by the processor;
wherein the processor is configured to:
obtain an e-book document;
divide content of the e-book document into a plurality of segments in accordance with a preset segmentation manner;
compose the plurality of segments into an ordered segment group;
select one segment from the segment group as a current segment;
parse the content of the current segment to generate layout data; and
generate a page image in accordance with the layout data.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
record position information of the current segment in the segment group; and
judge whether a data amount of the layout data is less than a preset value and, if the data amount is less than the preset value, select a next segment to the current segment according to the position information, use the next segment as the current segment, and repeat parsing the content of the current segment.

### Claim 12 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
determining a segment size; and
divide the content of the e-book document into the plurality of segments having the same segment size.

### Claim 13 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
judge whether information of a start point of a present segment is complete and, if the information is not complete, move the start point of the present segment toward a last segment to determine a start point of the information, and use the start point of the information as the start point of the present segment and an end point of the last segment.

### Claim 14 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
judge whether information of a start point of a present segment is complete, and if the information is not complete, move the start point of the segment toward an end point of the present segment to determine an end point of the information, and using the end point of the information as the start point of the present segment and an end point of a last segment.

### Claim 15 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
judge whether information of an end point of a present segment is complete and, if the information is not complete, move the end point of the present segment toward a next segment to determine an end point of the information, and use the end point of the information as the end point of the present segment and a start point of the next segment.

### Claim 16 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
judge whether information of an end point of a present segment is complete and, if the information is not complete, move the end point of the present segment toward a start point of the present segment to determine a start point of the information, and using the start point of the information as the end point of the present segment and a start point of a next segment.

### Claim 17 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
judge whether layout atom data contained in the layout data is used within a preset time period and, if the layout atom data is not used within the preset time period, delete the layout atom data.

### Claim 18 (depends on 10)

The electronic device according to claim 10, wherein the processor is further configured to:
judge whether a memory space occupied by layout atom data contained in the layout data is greater than a preset value and, if the occupied memory space is greater than the preset value, delete the layout atom data.

### Claim 19

A non-transitory readable storage medium including instructions that, when executed by a processor of a terminal, cause the terminal to perform a method for processing an e-book document, the method comprising:
obtaining an e-book document;
dividing content of the e-book document into a plurality of segments in accordance with a preset segmentation manner;
composing the plurality of segments into an ordered segment group;
selecting one segment from the segment group as a current segment;
parsing the content of the current segment to generate layout data; and
generating a page image in accordance with the layout data.
