CN106776527A - The display methods of electronic book data, device and terminal device - Google Patents

The display methods of electronic book data, device and terminal device Download PDF

Info

Publication number
CN106776527A
CN106776527A CN201611155950.7A CN201611155950A CN106776527A CN 106776527 A CN106776527 A CN 106776527A CN 201611155950 A CN201611155950 A CN 201611155950A CN 106776527 A CN106776527 A CN 106776527A
Authority
CN
China
Prior art keywords
data
poem
font size
electronic book
chinese
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
CN201611155950.7A
Other languages
Chinese (zh)
Other versions
CN106776527B (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.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue Technology 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 Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN201611155950.7A priority Critical patent/CN106776527B/en
Publication of CN106776527A publication Critical patent/CN106776527A/en
Application granted granted Critical
Publication of CN106776527B publication Critical patent/CN106776527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Document Processing Apparatus (AREA)

Abstract

A kind of display methods of electronic book data, device and terminal device are the embodiment of the invention provides, wherein, the display methods of the electronic book data includes:Electronic book data is analyzed according to setting analysis rule, Chinese poem data to be shown are determined according to analysis result;According to the every word quantity and the layout width of e-book of row poem in the Chinese poem data, it is determined that the often font size of row poem, makes every row poem completely be shown in a line;The Chinese poem data are shown according to the font size.Realizing every row Chinese poem by the embodiment of the present invention can completely show in a line, optimize the typesetting display effect of Chinese poem, improve the experience of user's reading electronic book.

Description

The display methods of electronic book data, device and terminal device
Technical field
The present embodiments relate to technical field of data processing, more particularly to a kind of display methods of electronic book data, dress Put and terminal device.
Background technology
With the popularization of terminal device, the people of reading electronic book is more and more on the terminal device, is read by terminal device The advantages of reading e-book big with environmental protection, low-power consumption, amount of storage, and facilitate user to carry.
At present, when carrying out typesetting to e-book, if adjustment e-book font size, by e-book font adjustment it is excessive or It is too small, the typesetting effect of e-book can be influenceed, for example, carrying out typesetting to the Chinese poem in e-book, adjust e-book font Size, adjust excessive, a Chinese poem shows imperfect in a line, causes a Chinese poem to be shown in two rows, The typesetting of the other guide of Chinese poem can be also influenceed, order Chinese poem typesetting is chaotic, and the experience of user's reading electronic book is poor.
The content of the invention
A kind of display methods of electronic book data, device and terminal device are the embodiment of the invention provides, to solve at present When carrying out typesetting to e-book, the typesetting of Chinese poem is chaotic, the poor problem of the experience of user's reading electronic book.
A kind of one side according to embodiments of the present invention, there is provided display methods of electronic book data, including:
Electronic book data is analyzed according to setting analysis rule, Chinese poem to be shown is determined according to analysis result Data;
According to the every word quantity and the layout width of e-book of row poem in the Chinese poem data, it is determined that often row poem The font size of word, makes every row poem completely be shown in a line;
The Chinese poem data are shown according to the font size.
A kind of another aspect according to embodiments of the present invention, there is provided display device of electronic book data, including:
Data analysis module, it is true according to analysis result for being analyzed to electronic book data according to setting analysis rule Fixed Chinese poem data to be shown;
Font determining module, for according to often the word quantity of row poem and the row of e-book in the Chinese poem data Version width, it is determined that the often font size of row poem, makes every row poem completely be shown in a line;
Data disaply moudle, for showing the Chinese poem data according to the font size.
Another aspect according to embodiments of the present invention, additionally provides a kind of terminal device, including:It is processor, memory, logical Letter interface and communication bus, the processor, the memory and the communication interface complete mutual by the communication bus Between communication;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device as above The corresponding operation of display methods of described electronic book data.
Another further aspect according to embodiments of the present invention, additionally provides a kind of computer-readable recording medium, the computer Readable storage medium storing program for executing is stored with:For being analyzed to electronic book data according to setting analysis rule, determined according to analysis result The executable instruction of Chinese poem data to be shown;For according to the every word quantity of row poem in the Chinese poem data With the layout width of e-book, it is determined that the often font size of row poem, the executable finger for making every row poem completely be shown in a line Order;Executable instruction for showing the Chinese poem data according to the font size.
A kind of display methods of electronic book data, device and the terminal device for providing according to embodiments of the present invention, by pressing Electronic book data is analyzed according to setting analysis rule, Chinese poem data to be shown are determined according to analysis result, according to The every word quantity and the layout width of e-book of row poem in Chinese poem data, it is determined that the often font size of row poem, root Chinese poem data are shown according to font size.With it is traditional typesetting is carried out to Chinese poem when, the font of the Chinese poem of adjustment is big It is small, cause that the Chinese poem of a line or can not complete display be compared in a line again, the embodiment of the present invention is according to often row poem Word quantity and the layout width of e-book determine often to go displayable lteral data, realizing every row Chinese poem can be Completely shown in a line, optimize the typesetting display effect of Chinese poem, improve the experience of user's reading electronic book.
Brief description of the drawings
The step of Fig. 1 is a kind of display methods of according to embodiments of the present invention one electronic book data flow chart;
The step of Fig. 2 is a kind of display methods of according to embodiments of the present invention two electronic book data flow chart;
Fig. 3 is a kind of structured flowchart of the display device of according to embodiments of the present invention three electronic book data;
Fig. 4 is a kind of structured flowchart of the display device of according to embodiments of the present invention four electronic book data;
Fig. 5 is a kind of structural representation of according to embodiments of the present invention five terminal device.
Specific embodiment
(identical label represents identical element in some accompanying drawings) and embodiment, implement to the present invention below in conjunction with the accompanying drawings The specific embodiment of example is described in further detail.Following examples are used to illustrate the present invention, but are not limited to the present invention Scope.
It will be understood by those skilled in the art that the term such as " first ", " second " in the embodiment of the present invention is only used for difference Different step, equipment or module etc., neither represent any particular technology implication, also do not indicate that the inevitable logic between them is suitable Sequence.
Embodiment one
Reference picture 1, show according to embodiments of the present invention one a kind of electronic book data display methods the step of flow Figure.
The display methods of the electronic book data in the present embodiment can be realized by any appropriate terminal device, such as intelligent hand Machine, panel computer or desktop computer etc., but not limited to this, other devices for possessing similar data processing function can refer to this reality The display methods that example realizes electronic book data is applied, the embodiment of the present invention is not restricted to this.The present embodiment is only with terminal device Example is illustrated, and the screen of terminal device is narrower compared to width for miscellaneous equipment so that read using related e-book Read using when carrying out e-book reading, it is easier to which electronic book data occurs, especially the problem of Chinese poem data display.
The display methods of the electronic book data of the present embodiment comprises the following steps:
Step S100, according to setting analysis rule electronic book data is analyzed, determined according to analysis result to be shown Chinese poem data.
In the present embodiment, electronic book data may be considered preserve or be documented in it is any type of in e-book medium Data, for example, text, symbol, form and figure etc., the present embodiment is not limited to the particular content of electronic data.Wherein, E-book medium can be operating system, any medium of application program support of terminal device or terminal device, such as txt texts File, file of chm text formattings of this form etc., the present embodiment is to preservation or the e-book medium of record electronic book data It is not specifically limited.
In the present embodiment, Chinese poem data may be considered the poem data for meeting certain format, for example, five speeches are exhausted Sentence, seven-word poem etc..
This step S100 is analyzed to electronic book data, and then determines to obtain Chinese to be shown from electronic book data Poem data.Electronic book data can be Chinese poem data to be shown, can also be to include Chinese poem number to be shown According to, and, the data of other words and/or picture.
Step S102, according to the every word quantity and the layout width of e-book of row poem in Chinese poem data, it is determined that Often the font size of row poem, makes every row poem completely be shown in a line.
In the present embodiment, often the word quantity of row poem can be the same or different in Chinese poem data, e-book Layout width since it is desired that for some setting regions are such as left white region, remarks region headspace, therefore generally compare terminal The screen width of equipment is narrow.
In the present embodiment, often row poem may be considered every poem, the display format of certain Chinese poem for " XXXXX, YYYYY." wherein, " XXXXX " may be considered a line poem or a poem, " YYYYY " may be considered another row poem Or another poem.By this step, it may be determined that the font size of each word in " XXXXX " or " YYYYY ", order " XXXXX " completely shows in a line, and " YYYYY " completely shows in another row.
Step S104, Chinese poem data are shown according to font size.
Determine in Chinese poem after the font size of each word in step S102, can be according to the font size for determining The Chinese poem data of display, wherein, font size may be considered font size or the pixel value corresponding to font size, this Embodiment is not limited to the specific representation of font size.
According to the present embodiment provide a kind of electronic book data display methods, by according to setting analysis rule to electronics Book data are analyzed, and Chinese poem data to be shown are determined according to analysis result, according to every row poem in Chinese poem data The word quantity and the layout width of e-book of word, it is determined that the often font size of row poem, Chinese poem is shown according to font size Word data.With it is traditional typesetting is carried out to Chinese poem when, the font size of the Chinese poem of adjustment, in causing a line or Literary poem can not complete display be compared in a line again, and the present embodiment is wide according to the typesetting of the word quantity and e-book of often row poem Degree determines often capable displayable lteral data, and realizing every row Chinese poem can completely show in a line, optimize Chinese The typesetting display effect of poem, improves the experience of user's reading electronic book.
Embodiment two
Reference picture 2, show according to embodiments of the present invention two a kind of electronic book data display methods the step of flow Figure.
The display methods of the electronic book data in the present embodiment can be realized by any appropriate terminal device, such as intelligent hand Machine, panel computer or desktop computer etc., but not limited to this, other devices for possessing similar data processing function can refer to this reality The display methods that example realizes electronic book data is applied, the embodiment of the present invention is not restricted to this, the present embodiment is still with terminal device Example is illustrated.
The present embodiment emphasizes the difference with above-described embodiment on the basis of above-described embodiment, and something in common can be with With reference to introduction and explanation in above-described embodiment.
The display methods of the electronic book data of the present embodiment comprises the following steps:
Step S200, according to setting analysis rule electronic book data is analyzed, determined according to analysis result to be shown Chinese poem data.
In the present embodiment, can be by the Chinese poem to be shown of any one or more determination in following three kinds of modes Data, the mode includes:
Mode one:Number of words and line number according to Chinese poem determine Chinese poem data to be shown.
Line-break is carried out to electronic book data, every style of writing digital data is obtained, the word quantity of digital data of often composing a piece of writing is recognized, if even The word of continuous multline text data is equal in number in setting word quantity, then judge continuous multline text data line number whether etc. In setting line number, if being equal to setting line number, continuous multline text data are defined as Chinese poem data to be shown.Its In, setting word quantity and setting line number can by those skilled in the art according to actual needs with the specific feelings of Chinese poem Condition is appropriately arranged with, and the embodiment of the present invention is not restricted to this.For example, continuous 4 style of writing digital data is equal to 5 or 7 etc..
Wherein, line-break is carried out to electronic book data, obtains every style of writing digital data, it is adaptable to electronic book data without line-break or The chaotic situation of line-break, can specifically be identified by obtaining the typesetting in electronic book data, and two adjacent typesettings are identified into it Between lteral data be defined as the mode of a line lteral data and realize.In the present embodiment, typesetting mark includes at least one of: Punctuate, symbol, space.For example, electronic book data is " #XXXXX, YYYYY.", obtain typesetting therein mark " # ", ", " and “." by typesetting mark " # " and ", " between " XXXXX " be defined as a line lteral data, by typesetting mark ", " and "." between " YYYYY " is defined as a line lteral data.Again for example, electronic book data is " XXXXX YYYYY ", at " XXXXX " and " YYYYY " Between there is " space " typesetting mark, and " XXXXX " is the start-up portion of electronic book data, and " YYYYY " is e-book number According to ending, by the start-up portion of electronic book data, or " XXXXX " before " space " is defined as a line word number According to by the ending of electronic book data, or " YYYYY " after " space " is defined as a line lteral data.
If the word quantity that sets in setting analysis rule is 5, set line number as 4, then by the lteral data of continuous 4 row, And often the word quantity of style of writing digital data is that 5 lteral data is defined as Chinese poem data to be shown.
Mode two:Syntactic analysis is carried out to electronic book data, the result according to syntactic analysis determines Chinese poem to be shown Word data.
Syntactic analysis is carried out to electronic book data, it is adaptable to which the word quantity or word line number of electronic book data are not advised , it is necessary to the lteral data in being directed to electronic book data carries out syntactic analysis, such as analysis word belongs to main for model, irregular situation Language, object, attribute, the adverbial modifier etc..The realization that syntactic analysis is carried out to electronic book data can be using any appropriate related skill Art realization, such as trained syntactic analysis network model, the particular technique means that the present embodiment is used to syntactic analysis It is not limited.
Mode three:The literal type label carried in electronic book data is obtained, is Chinese poem by literal type labeled marker The lteral data of word is defined as Chinese poem data to be shown.
If carrying literal type label in electronic book data, sign of the literal type label to lteral data can be recognized Implication, for example, three kinds of literal type labels, respectively literal type label b1, b2 and b3 are carried in certain electronic book data, text Word type label b1 is used to indicate name, and lteral data " Bob " such as is denoted as into b1 labels, and literal type label b2 is used to mark Show quotation, lteral data " the theory of relativity " is such as denoted as b2 labels, literal type label b3 is used to indicate Chinese poem, such as by text " daytime, the Yellow River entered ocean current to digital data near the mountain to the greatest extent." it is denoted as b3 labels.In this manner it is possible to according to literal type label b3, by text " daytime, the Yellow River entered ocean current to digital data near the mountain to the greatest extent." it is defined as Chinese poem data to be shown.
Step S202, by e-book layout width divided by every row poem word quantity, the font for obtaining every row poem is big It is small.
In this step S202, e-book layout width may be considered the Breadth Maximum of e-book typesetting, and what is obtained often goes The font size of poem may be considered the maximum font size of every row poem, can be complete in a line according to the font size Display a line or a poem.But it should be recognized that in actual applications, because of screen manufacture craft, the hardware of terminal device The difference of parameter, it is possible to though occur being shown according to the font size for determining, but it is final still occur a line poem without The problem of method complete display in a line.Therefore, the embodiment of the invention provides further prioritization scheme, i.e., by font Size is finely adjusted, it is ensured that complete display of a line poem in a line.Wherein, a kind of feasible fine setting operation such as step S204 Shown in~step S208.It should be noted that following step S204~step S208 is optional step, according to the word for determining Body is sized in a line to be performed in the case of completely showing a line poem.
Step S204, according to font size pre-display Chinese poem data.
In this step S204, pre-display Chinese poem data not actual displayed Chinese poem data, pre-display operation It is invisible to user, realize judging whether font size is suitable according to the result of pre-display by this step, if needs are carried out Further fine setting.
Step S206, the result according to pre-display, judge whether to need to be adjusted font size, if desired to font Size is adjusted, then perform step S208;If need not be adjusted to font size, step S210 is performed, according to step The Chinese poem data of font size display that rapid S202 is obtained.
In this step S206, judge whether to need to be adjusted font size, in specifically may determine that after pre-display Whether the often row poem in literary poem data completely shows in a line, if in the presence of a line Chinese poem that can not be completely shown in a line Word or a Chinese poem, then it is assumed that need to be adjusted font size.
Step S208, according to setting regulation rule font size is adjusted.
For example, the corresponding display pixel value of font size can be reduced into presetted pixel.
In the present embodiment, presetted pixel is preferably 1-3 pixel, so as to realize that a line poem is complete aobvious in a line While showing, without significantly being adjusted to font size or redefining font size, font size adjustment is reduced Data processing load, improve font size regulated efficiency.It is how much specifically chosen from 1-3 pixels in actual application Pixel can be set according to actual conditions, and the specific pixel reduced when the present embodiment is to adjustment font size is not limited.
Step S210, the Chinese poem data of font size display according to determination.
If font size is adjusted, this step is according to the Chinese poem data of font size display after adjustment;If word Without adjustment, then this step is according to the Chinese poem data of font size display obtained in step S202 for body size.
According to the present embodiment provide a kind of electronic book data display methods, by according to setting analysis rule to electronics Book data are analyzed, and Chinese poem data to be shown are determined according to analysis result, according to every row poem in Chinese poem data The word quantity and the layout width of e-book of word, it is determined that the often font size of row poem, Chinese poem is shown according to font size Word data.With it is traditional typesetting is carried out to Chinese poem when, the font size of the Chinese poem of adjustment, in causing a line or Literary poem can not complete display be compared in a line again, and the present embodiment is wide according to the typesetting of the word quantity and e-book of often row poem Degree determines often capable displayable lteral data, and realizing every row Chinese poem can completely show in a line, optimize Chinese The typesetting display effect of poem, improves the experience of user's reading electronic book.
The present embodiment, can be according to the lattice of lteral data in electronic book data it is determined that during Chinese poem data to be shown The difference of formula, Chinese poem data to be shown are determined by three kinds of modes.If the number of words of the lteral data in electronic book data Compare specification with line number, Chinese poem data to be shown can be determined according to the number of words of setting and line number;If electronic book data In lteral data number of words and line number it is irregular, can determine to wait to show according to the result for carrying out electronic book data syntactic analysis The Chinese poem data shown;If carrying literal type label in electronic book data, can be according to the word of the Chinese poem of sign Type label determines Chinese poem data to be shown.Abundant Chinese poem data determination mode is present embodiments provided, is fitted For various electronic book datas, the use scope that Chinese poem data to be shown are determined according to electronic book data is expanded.
The present embodiment to font size it is determined that after the font size of Chinese poem data, further can also adjust It is whole, to adapt to the difference of the screen display Chinese poem of different terminal equipment, improve the display effect of Chinese poem data.
Embodiment three
Reference picture 3, shows a kind of structured flowchart of the display device of according to embodiments of the present invention three electronic book data.
The display device of the electronic book data of the present embodiment includes:Data analysis module 300, for according to setting analysis rule Then electronic book data is analyzed, Chinese poem data to be shown are determined according to analysis result;Font determining module 302, For according to the every word quantity and the layout width of e-book of row poem in Chinese poem data, it is determined that the often font of row poem Size, makes every row poem completely be shown in a line;Data disaply moudle 304, for showing Chinese poem number according to font size According to.
According to the present embodiment provide a kind of electronic book data display device, by according to setting analysis rule to electronics Book data are analyzed, and Chinese poem data to be shown are determined according to analysis result, according to every row poem in Chinese poem data The word quantity and the layout width of e-book of word, it is determined that the often font size of row poem, Chinese poem is shown according to font size Word data.With it is traditional typesetting is carried out to Chinese poem when, the font size of the Chinese poem of adjustment, in causing a line or Literary poem can not complete display be compared in a line again, and the present embodiment is wide according to the typesetting of the word quantity and e-book of often row poem Degree determines often capable displayable lteral data, and realizing every row Chinese poem can completely show in a line, optimize Chinese The typesetting display effect of poem, improves the experience of user's reading electronic book.
The display device of the electronic book data of the present embodiment can be arranged at the appropriate equipment with data-handling capacity In, including but not limited to mobile terminal, desktop computer etc..
Example IV
Reference picture 4, shows a kind of structured flowchart of the display device of according to embodiments of the present invention four electronic book data.
The display device of the electronic book data of the present embodiment includes:Data analysis module 400, for according to setting analysis rule Then electronic book data is analyzed, Chinese poem data to be shown are determined according to analysis result;Font determining module 402, For according to the every word quantity and the layout width of e-book of row poem in Chinese poem data, it is determined that the often font of row poem Size, makes every row poem completely be shown in a line;Data disaply moudle 404, for showing Chinese poem number according to font size According to.
Alternatively, data disaply moudle 404 includes:Pre-display module 4040, for according to font size pre-display Chinese Poem data;Size judge module 4042, for the result according to pre-display, judges whether to need to adjust font size It is whole;Adjusting module 4044, for being if desired adjusted to font size, is then carried out according to setting regulation rule to font size Adjustment;Display module 4046, for according to the Chinese poem data of font size display after adjustment.
Alternatively, adjusting module 4044, for the corresponding display pixel value of font size to be reduced into presetted pixel.
Alternatively, adjusting module 4044, for the corresponding display pixel value of font size to be reduced into 1 to 3 pixel.
Alternatively, data analysis module 400 includes:Line-break module 4000, for carrying out line-break to electronic book data, obtains Often compose a piece of writing digital data;Identification module 4002, the word quantity for recognizing digital data of often composing a piece of writing;Line number judge module 4004, uses If equal in number in setting word quantity in the word of continuous multline text data, the line number of continuous multline text data is judged Whether setting line number is equal to;First determining module 4006, if being equal to setting line number for the line number of continuous multline text data, Continuous multline text data are defined as Chinese poem data to be shown.
Alternatively, line-break module 4000 includes:Identifier acquisition module, for obtaining the mark of the typesetting in electronic book data; Row determining module, for the lteral data between adjacent two typesettings mark to be defined as into every style of writing digital data.
Alternatively, typesetting mark includes at least one of:Punctuate, symbol, space.
Alternatively, data analysis module 400 includes:Syntax Analysis Module 4008, for carrying out grammer to electronic book data Analysis, the result according to syntactic analysis determines Chinese poem data to be shown.
Alternatively, data analysis module 400 includes:Label acquisition module 4010, carries for obtaining in electronic book data Literal type label;Second determining module 4012, for lteral data that literal type labeled marker is Chinese poem is true It is set to Chinese poem data to be shown.
Alternatively, font determining module 402, divided by the word quantity of every row poem, obtains for by e-book layout width To the font size of often row poem.
The display device of the electronic book data of the present embodiment is used to realize corresponding e-book number in aforesaid plurality of embodiment According to display methods, and with the beneficial effect of corresponding embodiment of the method, will not be repeated here.
Embodiment five
Fig. 5 is a kind of structural representation of terminal device provided in an embodiment of the present invention, and the specific embodiment of the invention is not Implementing for terminal device is limited.
As shown in figure 5, the terminal device can include:Processor (processor) 510, communication interface (Communications Interface) 520, memory (memory) 530 and communication bus 540.
Wherein:
Processor 510, communication interface 520 and memory 530 complete mutual communication by communication bus 540.
Communication interface 520, communicates for the network element with such as server or other terminal devices etc..
Processor 510, for configuration processor 532, can specifically perform the correlation step in above method embodiment.
Specifically, program 532 can include program code, and the program code includes computer-managed instruction.
Processor 510 is probably a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.The one or more processors that terminal device includes, can be same type of processors, such as one or more CPU;Also may be used To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 530, electronic book data and program 532 for depositing correlation.Memory 530 may include high-speed RAM Memory, it is also possible to also including nonvolatile memory (non-volatile memory), for example, at least one disk storage Device.
Program 532 specifically can be used for so that processor 510 performs following operation:According to setting analysis rule to e-book Data are analyzed, and Chinese poem data to be shown are determined according to analysis result;According to every row poem in Chinese poem data Word quantity and e-book layout width, it is determined that the often font size of row poem, makes every row poem completely be shown in a line; Chinese poem data are shown according to font size.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 according to font size in showing During literary poem data, according to font size pre-display Chinese poem data;According to the result of pre-display, judge whether to need to word Body size is adjusted;If desired font size is adjusted, then font size is adjusted according to setting regulation rule; According to the Chinese poem data of font size display after adjustment.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 is according to setting regulation rule pair When font size is adjusted, the corresponding display pixel value of font size is reduced into presetted pixel.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 is corresponding aobvious by font size When showing that pixel value reduces presetted pixel, the corresponding display pixel value of font size is reduced into by 1 to 3 pixel.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 is according to setting analysis rule pair Electronic book data is analyzed, and when determining Chinese poem data to be shown according to analysis result, electronic book data is broken OK, every style of writing digital data is obtained;Recognize the word quantity of digital data of often composing a piece of writing;If the word quantity of continuous multline text data is equal Equal to setting word quantity, then judge whether the line number of continuous multline text data is equal to setting line number;If being equal to setting line number, Continuous multline text data are then defined as Chinese poem data to be shown.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 breaks to electronic book data OK, when obtaining every style of writing digital data, the typesetting mark in electronic book data is obtained;By the text between adjacent two typesettings mark Digital data is defined as a line lteral data.
In a kind of optional implementation method, typesetting mark includes at least one of:Punctuate, symbol, space.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 is according to setting analysis rule pair Electronic book data is analyzed, and when determining Chinese poem data to be shown according to analysis result, language is carried out to electronic book data Method is analyzed, and the result according to syntactic analysis determines Chinese poem data to be shown.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 is according to setting analysis rule pair Electronic book data is analyzed, and when determining Chinese poem data to be shown according to analysis result, is taken in acquisition electronic book data The literal type label of band;The lteral data that literal type labeled marker is Chinese poem is defined as Chinese poem to be shown Data.
In a kind of optional implementation method, program 532 is additionally operable to so that processor 510 is according in Chinese poem data The every word quantity and the layout width of e-book of row poem, it is determined that often the font size of row poem when, e-book typesetting is wide The word quantity divided by every row poem is spent, the font size of every row poem is obtained.
In program 532 each step implement it is corresponding in the corresponding steps and unit that may refer in above-described embodiment Description, will not be described here.It is apparent to those skilled in the art that, it is for convenience and simplicity of description, above-mentioned to retouch The equipment and the specific work process of module stated, may be referred to the corresponding process description in preceding method embodiment, herein no longer Repeat.
According to a kind of terminal device that the present embodiment is provided, electronic book data is divided by according to setting analysis rule Analysis, Chinese poem data to be shown are determined according to analysis result, according to the every word quantity of row poem in Chinese poem data With the layout width of e-book, it is determined that the often font size of row poem, Chinese poem data are shown according to font size.With tradition When carrying out typesetting to Chinese poem, the font size of the Chinese poem of adjustment causes a line or the Chinese poem can not be again Complete display is compared in a line, and the present embodiment determines that often row can according to the word quantity of often row poem and the layout width of e-book The lteral data of display, realizing every row Chinese poem can completely show that the typesetting for optimizing Chinese poem shows in a line Show effect, improve the experience of user's reading electronic book.
It should be noted that the displaying scheme of electronic book data provided in an embodiment of the present invention, it is adaptable to use e-book Reading application carries out the scene that electronic book data shows, but not limited to this, and other similar scenes are equally applicable.
It may be noted that the need for according to implementation, all parts/step described in the embodiment of the present invention can be split as more Multi-part/step, also can be combined into new part/step by the part operation of two or more components/steps or components/steps Suddenly, realizing the purpose of the embodiment of the present invention.
Above-mentioned method according to embodiments of the present invention can be realized in hardware, firmware, or be implemented as being storable in note Software or computer code in recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optic disk), or it is implemented through net The original storage that network is downloaded is in long-range recording medium or nonvolatile machine readable media and will be stored in local recording medium In computer code so that method described here can be stored in using all-purpose computer, application specific processor or can compile Such software processing in the recording medium of journey or specialized hardware (such as ASIC or FPGA).It is appreciated that computer, treatment Device, microprocessor controller or programmable hardware include can store receive software or the storage assembly of computer code (for example, RAM, ROM, flash memory etc.), when the software or computer code are by computer, processor or hardware access and execution, realize The display methods of electronic book data described here.Additionally, when all-purpose computer accesses the display being shown in which for realization During code, all-purpose computer is converted to the special-purpose computer for performing the display being shown in which for the execution of code.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Unit and method and step, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel Described function, but this realization can be realized it is not considered that exceeding using distinct methods to each specific application The scope of the embodiment of the present invention.
Embodiment of above is merely to illustrate the embodiment of the present invention, and not to the limitation of the embodiment of the present invention, relevant skill The those of ordinary skill in art field, in the case of the spirit and scope for not departing from the embodiment of the present invention, can also make various Change and modification, therefore all equivalent technical schemes fall within the category of the embodiment of the present invention, the patent of the embodiment of the present invention Protection domain should be defined by the claims.
A1, a kind of display methods of electronic book data are the embodiment of the invention provides, including:
Electronic book data is analyzed according to setting analysis rule, Chinese poem to be shown is determined according to analysis result Data;
According to the every word quantity and the layout width of e-book of row poem in the Chinese poem data, it is determined that often row poem The font size of word, makes every row poem completely be shown in a line;
The Chinese poem data are shown according to the font size.
A2, the method according to A1, wherein, the Chinese poem data are shown according to the font size, including:
The Chinese poem data according to the font size pre-display;
According to the result of the pre-display, judge whether to need to be adjusted the font size;
If desired the font size is adjusted, then the font size is adjusted according to setting regulation rule It is whole;
The Chinese poem data are shown according to the font size after adjustment.
A3, the method according to A2, wherein, the font size is adjusted according to setting regulation rule, including:
The corresponding display pixel value of the font size is reduced into presetted pixel.
A4, the method according to A3, wherein, the corresponding display pixel value of the font size is reduced into presetted pixel, Including:
The corresponding display pixel value of the font size is reduced into by 1 to 3 pixel.
A5, the method according to A1, wherein, according to setting analysis rule electronic book data is analyzed, according to point Analysis result determines Chinese poem data to be shown, including:
Line-break is carried out to the electronic book data, every style of writing digital data is obtained;
Recognize the word quantity of digital data of often composing a piece of writing;
If the word of continuous multline text data is equal in number in setting word quantity, continuous multline text data are judged Line number whether be equal to setting line number;
If being equal to setting line number, continuous multline text data are defined as Chinese poem data to be shown.
A6, the method according to A5, wherein, line-break is carried out to the electronic book data, every style of writing digital data is obtained, wrap Include:
Obtain the typesetting mark in the electronic book data;
Lteral data between two adjacent typesetting marks is defined as a line lteral data.
A7, the method according to A6, wherein, the typesetting mark includes at least one of:Punctuate, symbol, space.
A8, the method according to A1, wherein, according to setting analysis rule electronic book data is analyzed, according to point Analysis result determines Chinese poem data to be shown, including:
Syntactic analysis is carried out to the electronic book data, the result according to syntactic analysis determines Chinese poem number to be shown According to.
A9, the method according to A1, wherein, according to setting analysis rule electronic book data is analyzed, according to point Analysis result determines Chinese poem data to be shown, including:
Obtain the literal type label carried in the electronic book data;
The lteral data that the literal type labeled marker is Chinese poem is defined as Chinese poem data to be shown.
A10, the method according to A1, wherein, according in the Chinese poem data often the word quantity of row poem and The layout width of e-book, it is determined that the often font size of row poem, including:
By the e-book layout width divided by the word quantity of every row poem, the font size of every row poem is obtained.
The embodiment of the present invention additionally provides B11, a kind of display device of electronic book data, including:
Data analysis module, it is true according to analysis result for being analyzed to electronic book data according to setting analysis rule Fixed Chinese poem data to be shown;
Font determining module, for according to often the word quantity of row poem and the row of e-book in the Chinese poem data Version width, it is determined that the often font size of row poem, makes every row poem completely be shown in a line;
Data disaply moudle, for showing the Chinese poem data according to the font size.
B12, the device according to B11, wherein, the data disaply moudle, including:
Pre-display module, for the Chinese poem data according to the font size pre-display;
Size judge module, for the result according to the pre-display, judges whether to need to carry out the font size Adjustment;
Adjusting module, for being if desired adjusted to the font size, then according to setting regulation rule to the word Body size is adjusted;
Display module, for showing the Chinese poem data according to the font size after adjustment.
B13, the device according to B12, wherein, the adjusting module, for by the corresponding display of the font size Pixel value reduces presetted pixel.
B14, the device according to B13, wherein, the adjusting module, for by the corresponding display of the font size Pixel value reduces by 1 to 3 pixel.
B15, the device according to B11, wherein, the data analysis module, including:
Line-break module, for carrying out line-break to the electronic book data, obtains every style of writing digital data;
Identification module, the word quantity for recognizing digital data of often composing a piece of writing;
Line number judge module, if equal in number in setting word quantity for the word of continuous multline text data, sentences Whether the line number of the continuous multline text data of disconnection is equal to setting line number;
First determining module, if being equal to setting line number for the line number of continuous multline text data, continuously will compose a piece of writing more Digital data is defined as Chinese poem data to be shown.
B16, the device according to B15, wherein, the line-break module, including:
Identifier acquisition module, for obtaining the mark of the typesetting in the electronic book data;
Row determining module, for the lteral data between two adjacent typesetting marks to be defined as into a line word number According to.
B17, the device according to B16, wherein, the typesetting mark includes at least one of:Punctuate, symbol, sky Lattice.
B18, the device according to B11, wherein, the data analysis module includes:Syntax Analysis Module;
The syntax Analysis Module, for carrying out syntactic analysis to the electronic book data, according to the result of syntactic analysis Determine Chinese poem data to be shown.
B19, the device according to B11, wherein, the data analysis module, including:
Label acquisition module, for obtaining the literal type label carried in the electronic book data;
Second determining module, for the lteral data that the literal type labeled marker is Chinese poem to be defined as waiting to show The Chinese poem data shown.
B20, the device according to B11, wherein, the font determining module, for by the e-book layout width Divided by the word quantity of every row poem, the font size of every row poem is obtained.
The embodiment of the present invention provides C21, a kind of terminal device again, including:Processor, memory, communication interface and logical Letter bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device such as The corresponding operation of display methods of the electronic book data described in any one of A1-A10.

Claims (10)

1. a kind of display methods of electronic book data, including:
Electronic book data is analyzed according to setting analysis rule, Chinese poem number to be shown is determined according to analysis result According to;
According to the every word quantity and the layout width of e-book of row poem in the Chinese poem data, it is determined that often row poem Font size, makes every row poem completely be shown in a line;
The Chinese poem data are shown according to the font size.
2. method according to claim 1, wherein, the Chinese poem data are shown according to the font size, including:
The Chinese poem data according to the font size pre-display;
According to the result of the pre-display, judge whether to need to be adjusted the font size;
If desired the font size is adjusted, then the font size is adjusted according to setting regulation rule;
The Chinese poem data are shown according to the font size after adjustment.
3. method according to claim 2, wherein, the font size is adjusted according to setting regulation rule, wrap Include:
The corresponding display pixel value of the font size is reduced into presetted pixel.
4. method according to claim 3, wherein, the corresponding display pixel value of the font size is reduced into default picture Element, including:
The corresponding display pixel value of the font size is reduced into by 1 to 3 pixel.
5. method according to claim 1, wherein, electronic book data is analyzed according to setting analysis rule, according to Analysis result determines Chinese poem data to be shown, including:
Line-break is carried out to the electronic book data, every style of writing digital data is obtained;
Recognize the word quantity of digital data of often composing a piece of writing;
If the word of continuous multline text data is equal in number in setting word quantity, the row of continuous multline text data is judged Whether number is equal to setting line number;
If being equal to setting line number, continuous multline text data are defined as Chinese poem data to be shown.
6. method according to claim 5, wherein, line-break is carried out to the electronic book data, every style of writing digital data is obtained, Including:
Obtain the typesetting mark in the electronic book data;
Lteral data between two adjacent typesetting marks is defined as a line lteral data.
7. method according to claim 6, wherein, the typesetting mark includes at least one of:Punctuate, symbol, sky Lattice.
8. method according to claim 1, wherein, electronic book data is analyzed according to setting analysis rule, according to Analysis result determines Chinese poem data to be shown, including:
Syntactic analysis is carried out to the electronic book data, the result according to syntactic analysis determines Chinese poem data to be shown.
9. a kind of display device of electronic book data, including:
Data analysis module, for being analyzed electronic book data according to setting analysis rule, determines to treat according to analysis result The Chinese poem data of display;
Font determining module, for often the typesetting of the word quantity and e-book of row poem to be wide according in the Chinese poem data Degree, it is determined that the often font size of row poem, makes every row poem completely be shown in a line;
Data disaply moudle, for showing the Chinese poem data according to the font size.
10. a kind of terminal device, including:Processor, memory, communication interface and communication bus, the processor, the storage Device and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction wants the computing device such as right Ask the corresponding operation of display methods of the electronic book data described in any one of 1-8.
CN201611155950.7A 2016-12-14 2016-12-14 Electronic book data display method and device and terminal equipment Active CN106776527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611155950.7A CN106776527B (en) 2016-12-14 2016-12-14 Electronic book data display method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611155950.7A CN106776527B (en) 2016-12-14 2016-12-14 Electronic book data display method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN106776527A true CN106776527A (en) 2017-05-31
CN106776527B CN106776527B (en) 2020-03-17

Family

ID=58888014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611155950.7A Active CN106776527B (en) 2016-12-14 2016-12-14 Electronic book data display method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN106776527B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711674A (en) * 2020-12-28 2021-04-27 维沃移动通信有限公司 Method and device for generating song list
CN113298741A (en) * 2020-11-13 2021-08-24 阿里巴巴集团控股有限公司 Picture synthesis method and device and electronic equipment
CN114546192A (en) * 2021-12-31 2022-05-27 北京达佳互联信息技术有限公司 Content display processing method and device and content display method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008083316A2 (en) * 2006-12-29 2008-07-10 Amazon Technologies, Inc. Invariant referencing in digital works
CN101645970A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Method and device for adjusting test font size of mobile terminal
CN101916174A (en) * 2010-06-28 2010-12-15 汉王科技股份有限公司 Display method and device thereof, treatment method and device thereof for electronic document handwriting
CN102521280A (en) * 2011-11-26 2012-06-27 华为技术有限公司 Loading method and loading device of EPub electronic book
CN103268185A (en) * 2013-04-26 2013-08-28 珠海全志科技股份有限公司 Text display method and text display device for e-book reader
US8655411B2 (en) * 2005-08-23 2014-02-18 Samsung Electronics Co., Ltd Method and apparatus of displaying a character input in a portable terminal
CN104239282A (en) * 2014-09-09 2014-12-24 百度在线网络技术(北京)有限公司 Processing method and device for electronic book
CN104915332A (en) * 2015-06-15 2015-09-16 广东欧珀移动通信有限公司 Method and device for generating composing template

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8655411B2 (en) * 2005-08-23 2014-02-18 Samsung Electronics Co., Ltd Method and apparatus of displaying a character input in a portable terminal
WO2008083316A2 (en) * 2006-12-29 2008-07-10 Amazon Technologies, Inc. Invariant referencing in digital works
CN101645970A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Method and device for adjusting test font size of mobile terminal
CN101916174A (en) * 2010-06-28 2010-12-15 汉王科技股份有限公司 Display method and device thereof, treatment method and device thereof for electronic document handwriting
CN102521280A (en) * 2011-11-26 2012-06-27 华为技术有限公司 Loading method and loading device of EPub electronic book
CN103268185A (en) * 2013-04-26 2013-08-28 珠海全志科技股份有限公司 Text display method and text display device for e-book reader
CN104239282A (en) * 2014-09-09 2014-12-24 百度在线网络技术(北京)有限公司 Processing method and device for electronic book
CN104915332A (en) * 2015-06-15 2015-09-16 广东欧珀移动通信有限公司 Method and device for generating composing template

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113298741A (en) * 2020-11-13 2021-08-24 阿里巴巴集团控股有限公司 Picture synthesis method and device and electronic equipment
CN113298741B (en) * 2020-11-13 2024-01-12 阿里巴巴集团控股有限公司 Picture synthesis method and device and electronic equipment
CN112711674A (en) * 2020-12-28 2021-04-27 维沃移动通信有限公司 Method and device for generating song list
CN114546192A (en) * 2021-12-31 2022-05-27 北京达佳互联信息技术有限公司 Content display processing method and device and content display method and device
CN114546192B (en) * 2021-12-31 2023-11-28 北京达佳互联信息技术有限公司 Content display processing method and device and content display method and device

Also Published As

Publication number Publication date
CN106776527B (en) 2020-03-17

Similar Documents

Publication Publication Date Title
US9152619B2 (en) System and method for constructing markup language templates and input data structure specifications
CN102486769A (en) Document directory processing method and device
CN105607880A (en) Printing method and device for examined and approved documents
US20210209289A1 (en) Method and apparatus for generating customized content based on user intent
CN110244921A (en) Label printing method, device, electronic equipment and system
EP3667517A1 (en) Natural language processing method and apparatus
CN106776527A (en) The display methods of electronic book data, device and terminal device
CN112446207A (en) Title generation method and device, electronic equipment and storage medium
US7661065B2 (en) Systems and methods that facilitate improved display of electronic documents
CN111695518A (en) Method and device for labeling structured document information and electronic equipment
KR101229175B1 (en) Method and adaptive for creating handwriting font
CN103365894B (en) A kind of font format conversion method and device
US10061752B2 (en) Method and apparatus for generating a font of which style is changeable
CN115039064A (en) Dynamic typesetting
CN113867694B (en) Method and system for intelligently generating front-end code
US20150113487A1 (en) Automated integrated circuit design documentation
CN104516868A (en) Layout space streaming restoring method and layout space streaming restoring system
CN111142871B (en) Front-end page development system, method, equipment and medium
CN115130437B (en) Intelligent document filling method and device and storage medium
US11030388B2 (en) Live text glyph modifications
CN106598934A (en) Electronic book data display method and device, and terminal equipment
US11868790B2 (en) One-to-many automatic content generation
US10025763B2 (en) Masking an object in hypertext markup language
JP2019528485A (en) Font generation method, recording medium recording the method, and font generation apparatus
CN106776552A (en) File identification method, device, server and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant