[go: up one dir, main page]

CN109597981B - Method and device for displaying text interactive information and storage medium - Google Patents

Method and device for displaying text interactive information and storage medium Download PDF

Info

Publication number
CN109597981B
CN109597981B CN201710922943.3A CN201710922943A CN109597981B CN 109597981 B CN109597981 B CN 109597981B CN 201710922943 A CN201710922943 A CN 201710922943A CN 109597981 B CN109597981 B CN 109597981B
Authority
CN
China
Prior art keywords
text
information
interactive
paragraph
typesetting
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.)
Active
Application number
CN201710922943.3A
Other languages
Chinese (zh)
Other versions
CN109597981A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710922943.3A priority Critical patent/CN109597981B/en
Publication of CN109597981A publication Critical patent/CN109597981A/en
Application granted granted Critical
Publication of CN109597981B publication Critical patent/CN109597981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a method, a device and a storage medium for displaying text interactive information, wherein the method comprises the steps of obtaining text content to be displayed and text interactive information preset by the text content; determining the size information of the placeholder paragraphs according to the text interaction information; inserting a position occupying paragraph corresponding to the size information at the position of the appointed chapter of the text content; typesetting the text content inserted with the space-occupying paragraph to obtain a typesetting result, putting an interactive window control with a corresponding size on the space-occupying paragraph according to the typesetting result, and displaying the text interactive information in the interactive window control. According to the embodiment of the invention, the occupation paragraphs are utilized to occupy the interactive window controls, when the display is carried out according to the typesetting result, only the interactive window controls with corresponding sizes are put into the occupation paragraphs, the typesetting is not required to be carried out again, and the convenience and flexibility of adding the interactive window controls into chapter contents are greatly improved.

Description

Method and device for displaying text interactive information and storage medium
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method and a device for displaying text interaction information and a storage medium.
Background
At present, in a text reader, due to performance considerations, text contents are rendered into pictures for display, and some authors have requirements of issuing a feeling, asking for approval and issuing an advertisement at the end of a chapter of a text, and then need to add an interactive form control to meet the requirements.
However, if the number of chapters is added into the interactive form at the end of a chapter, the page number of the chapter may be increased, which may affect the typesetting logic of the original text, for example, after the chapter is typeset and cut into pages, whether the remaining blank part of the last page can accommodate the control of the interactive form is calculated, if the remaining blank part of the last page can accommodate the control of the interactive form, the last page is pasted, if the control of the interactive form cannot be accommodated, a new page needs to be created and the control of the interactive form needs to be added to the new page, so adding the control of the interactive form at the end of the chapter may affect the existing typesetting logic of the text, and is poor in convenience and flexibility.
Disclosure of Invention
The invention provides a method and a device for displaying text interaction information and a storage medium, which are used for improving the convenience and flexibility of adding an interaction window control in chapter content.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
the invention provides a method for displaying text interactive information, which comprises the following steps:
acquiring text content to be displayed and text interaction information preset by the text content;
determining the size information of the placeholder paragraphs according to the text interaction information;
inserting a position occupying paragraph corresponding to the size information at the position of the specified chapter of the text content;
typesetting the text content inserted with the space-occupying paragraph to obtain a typesetting result, and putting an interactive window control with a corresponding size on the space-occupying paragraph according to the typesetting result;
and displaying the text interaction information in the interaction window control.
The second aspect of the present invention provides a display device for interactive text information, which includes:
the display device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring text contents to be displayed and text interaction information preset by the text contents;
the first determining unit is used for determining the size information of the placeholder paragraphs according to the text interaction information;
the inserting unit is used for inserting a position occupying paragraph corresponding to the size information at the position of the specified chapter of the text content;
the typesetting unit is used for typesetting the text content inserted with the space-occupying paragraph to obtain a typesetting result, and placing an interactive window control with a corresponding size on the space-occupying paragraph according to the typesetting result;
and the display unit is used for displaying the text interaction information in the interaction window control.
A third aspect of the present invention provides a storage medium having stored thereon computer instructions, wherein the instructions are loaded by a processor and execute the steps of the method for presenting interactive text information according to the first aspect.
According to the method and the device for displaying the text content, the text content to be displayed and the corresponding text interaction information are obtained, the size information of the occupied paragraphs is determined according to the text interaction information, the occupied paragraphs corresponding to the size information are inserted into the appointed chapter positions of the text content, the text content with the inserted occupied paragraphs is typeset together, namely, the occupied paragraphs are used for occupying the interactive window controls, when the text content is displayed according to the typesetting result, the interactive window controls with the corresponding sizes are only required to be placed into the occupied paragraphs, the typesetting is not required again, and the convenience and the flexibility of adding the interactive control windows into the chapter content are greatly improved.
Drawings
The technical scheme and other beneficial effects of the invention are obvious from the detailed description of the specific embodiments of the invention in combination with the attached drawings.
Fig. 1a is a schematic view of a scene of a method for displaying text interaction information according to an embodiment of the present invention;
fig. 1b is a schematic flowchart of a method for displaying text interaction information according to an embodiment of the present invention;
fig. 2a is a schematic structural diagram of a text reader according to an embodiment of the present invention;
fig. 2b is another schematic flow chart of a method for displaying text interaction information according to an embodiment of the present invention;
fig. 2c is a schematic diagram illustrating a setting of a place-occupying paragraph in the method for displaying text interaction information according to the embodiment of the present invention;
fig. 2d is a schematic diagram illustrating a setting of an interactive form control in the method for displaying text interactive information according to the embodiment of the present invention;
fig. 3a is a schematic structural diagram of a display apparatus for text interactive information according to an embodiment of the present invention;
fig. 3b is another schematic structural diagram of a display device for interactive text information according to an embodiment of the present invention;
fig. 3c is another schematic structural diagram of a display apparatus for interactive text information according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present invention are described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is to be understood that various steps and operations described hereinafter may be implemented in hardware.
The term "module" as used herein may be considered a software object executing on the computing system. The various components, modules, engines, and services described herein may be viewed as objects implemented on the computing system. The apparatus and method described herein are preferably implemented in software, but may also be implemented in hardware, and are within the scope of the present invention.
The embodiment of the invention provides a method and a device for displaying text interactive information and a storage medium.
Referring to fig. 1a, the figure is a schematic view of a scene of a method for displaying text interaction information according to an embodiment of the present invention, where the scene may include a display device of text interaction information, and may be integrated in a terminal, such as a mobile phone, a notebook computer, and the like.
As shown in fig. 1a, a display device of text interaction information may be integrated in a terminal a, and is mainly used for acquiring text content to be displayed and preset text interaction information corresponding to the text content; determining size information of the placeholder paragraphs according to the text interaction information, and then inserting the placeholder paragraphs corresponding to the size information at the specified chapter positions of the text content, wherein the specified chapter positions can be the chapter end, the chapter beginning and the like; typesetting the text content inserted with the space-occupying paragraph, and when displaying according to the typesetting result, placing an interactive form control with a corresponding size on the space-occupying paragraph, and displaying the text interactive information in the interactive form control so as to interact with a reader through the text interactive information, such as issuing a sense, asking for approval and issuing an advertisement in the interactive form control, and the like.
In addition, the scene can also include a server and a terminal b, wherein the terminal b can be a mobile phone, a notebook computer, and the like, a text author can upload text content and text interaction information to the server by using the terminal b, the server is used for receiving the text content uploaded by the text author, and after receiving a download instruction sent by a reader through the terminal, the server provides the text content and the text interaction information corresponding to the text content to the terminal according to the download instruction; or when detecting that the text content is updated or uploaded, actively pushing a corresponding reminding message to the terminal a, and the like.
The details will be described below separately.
In this embodiment, the text interactive information display device will be described in terms of a text interactive information display device, which may be integrated in a terminal, and the terminal may include a device such as a mobile phone, a notebook computer, a tablet pc (personal computer) and the like having a storage unit and a microprocessor.
A method for displaying text interactive information comprises the following steps: acquiring text content to be displayed and text interaction information preset by the text content; determining the size information of the placeholder paragraphs according to the text interaction information; inserting a position occupying paragraph corresponding to the size information at the position of the appointed chapter of the text content; and typesetting the text content inserted with the space-occupying paragraph to obtain a typesetting result, putting an interactive window control with a corresponding size into the space-occupying paragraph according to the typesetting result, and displaying the text interactive information in the interactive window control.
Referring to fig. 1b, fig. 1b is a schematic flow chart illustrating a method for displaying text interaction information according to an embodiment of the present invention. The method can comprise the following steps:
in step S101, a text content to be displayed and text interaction information preset in the text content are obtained.
In the embodiment of the present invention, a text reader Application (Application) is installed in the terminal, and the text reader is used to execute the method for displaying the text interaction information, wherein the text reader, which may also be referred to as a word reader, is an Application software used for reading common words, and can read texts in standard formats such as RSS (Simple Syndication) and Atom (format for subscribing a web log), etc.
It can be understood that the terminal may download the text content and the text interaction information from the network side to the terminal local, and extract the text interaction information from the terminal local, or the terminal may directly obtain the text interaction information from the network side, which is not limited herein.
The text interaction information refers to information interactively communicated with a reading user, and can be set by a text author, a publisher or an advertiser when releasing text content, namely, the text interaction information is correspondingly set for each text with interaction requirements.
For example, the text interaction information may be comment information that the user wants to read, such as posting a feeling, providing a suggestion, and asking for approval, and may also be advertisement information, such as other work information of the text author, other information related to the text content, or other advertisement information, and is not limited herein.
In step S102, size information of the placeholder paragraphs is determined according to the text interaction information.
For example, after text interaction information preset in text content is acquired, size information of an occupied paragraph to be set is determined according to the text interaction information, and for example, the size information of the occupied paragraph is determined according to format information, content type and the like of the text interaction information.
In the embodiment of the present invention, the placeholder paragraph occupies a fixed position in the format of the paragraph, and can be regarded as a blank paragraph, so that content can be added to the blank paragraph, for example, an interactive form control is added.
There are many implementations of determining the size information of the placeholder paragraph according to the text interaction information, and in some embodiments, determining the size information of the placeholder paragraph according to the text interaction information may include:
(1) and determining the size information of the required interactive window control according to the text interactive information.
(2) And determining the size information of the placeholder paragraphs according to the size information of the interactive form control.
For example, according to format information, content type and the like of the text interaction information, the size information of the required interactive window control is determined, wherein the format information refers to preset font, paragraph and other format information required by the text interaction information during display, and the content type includes comment information required to read user postings, suggestions, praise and the like, or advertisement information and the like.
Furthermore, because the interactive form control needs to be added to the space occupying paragraph, the size information of the space occupying paragraph needs to be determined according to the determined size information of the interactive form control, and the space occupying paragraph with a corresponding size is generated according to the size information of the space occupying paragraph.
In the embodiment of the present invention, the interactive form control is a form control for adding and displaying text interactive information.
In step S103, a placeholder paragraph corresponding to the size information is inserted in a designated chapter position of the text content.
For example, after generating a space-occupying paragraph with a corresponding size according to the size information of the space-occupying paragraph, a position of a designated chapter of the space-occupying paragraph needs to be determined to be inserted, and after the position is determined, the space-occupying paragraph is inserted into the designated chapter.
Based on that, the "inserting a placeholder paragraph corresponding to the size information at the specified chapter position of the text content" may specifically be: and inserting a position occupying paragraph corresponding to the size information at the end of the chapter of the text content.
It is to be understood that the designated chapter positions may be set as one or more, and correspondingly, the number of the inserted space-occupying paragraphs may also be one or more, and may be set according to actual requirements, for example, in a general case, the space-occupying paragraph may be set to be inserted at the end of the chapter, and in a scenario where the content of some chapters is large, the space-occupying paragraph may also be set to be inserted at the beginning of the chapter, and the like, which by way of example does not limit the present invention.
Further, in this embodiment of the present invention, "when a place-occupying paragraph corresponding to the size information is inserted into a specified chapter position of the text content," the method may further include: the color of the text content of the place-occupying paragraph is set to transparent. Therefore, the position can be reserved for the occupation of the interactive form control added later, and the effect that the content user of the occupied paragraph is invisible is achieved.
In some embodiments, when an placeholder paragraph corresponding to the size information is inserted into the designated chapter position of the text content, the text content of the placeholder paragraph may also be set to be blank, and an effect that a content user of the placeholder paragraph is invisible may also be achieved, which is not specifically limited by the present invention.
In step S104, the text content inserted with the space-occupying paragraph is typeset to obtain a typesetting result, and an interactive window control with a corresponding size is put into the space-occupying paragraph according to the typesetting result.
In step S105, the text interaction information is displayed in the interactive form control.
In an embodiment of the present invention, there are many implementation manners for "typesetting the text content into which the placeholder paragraphs are inserted to obtain a typesetting result", for example, in some implementation manners, the implementation manners may include:
a1, generating typesetting information according to the preset page format information, the text paragraph information which can be displayed by the page and the position occupying paragraph.
b1, typesetting the text content inserted with the placeholder paragraphs according to the typesetting information to obtain a typesetting result.
It can be understood that the layout is performed after the space-occupying paragraphs are inserted into the text content, and the interactive pages are added into the layout logic of the original chapter content to perform the layout together, so that the step of judging whether the special logic of the interactive pages is added is not required to be executed, the convenience and flexibility of adding the interactive window control into the chapter content are greatly improved, and the probability of layout errors is reduced.
In this embodiment, the layout information may be directly generated according to the preset page format information of the text content, the text paragraph information that can be displayed on the page, and the inserted space-occupying paragraphs, and the text content to which the space-occupying paragraphs are added may be subjected to layout and paging according to the layout information.
The page format information refers to format information such as fonts and paragraphs to be displayed in a page form control, the text paragraph information which can be displayed on the page refers to information such as text paragraphs or text characters which can be accommodated in the page form control, and the position occupying paragraph refers to a position occupying paragraph of which the size information and the insertion position are determined.
For another example, in some embodiments, the "typesetting the text content inserted with the placeholder paragraphs to obtain the typesetting result" may be as follows:
and a2, acquiring the current reading progress information.
b2, generating typesetting information according to the preset page format information, the text paragraph information which can be displayed by the page and the position occupying paragraph.
c2, typesetting the text content inserted with the space-occupying paragraph according to the typesetting information and the reading progress information to obtain a typesetting result.
Compared with the previous embodiment, the embodiment has the advantages that the consideration on the current reading progress information is added, namely before typesetting, the current reading progress information is obtained, then the unread text content needing typesetting currently is determined according to the current reading progress information, and the determined unread text content is typeset and paged according to the typesetting information and the current reading progress information.
In the embodiment of the present invention, "after the text content into which the placeholder paragraph is inserted is typeset according to the typesetting information to obtain the typesetting result," the text content also needs to be displayed, for example, the method may further include:
(1) and acquiring the text content required to be displayed on the current page according to the typesetting result.
(2) And rendering the text content to be displayed on the current page to obtain a text picture.
(3) And displaying the text picture in a preset page form control.
It can be understood that, in the text reader, for the consideration of performance, the text content needs to be rendered into a picture for display, first, according to the result of composition paging, the text content that needs to be displayed on the current page is extracted, then the text content that needs to be displayed on the current page is rendered, a text picture that can be viewed by a user is generated, and the text picture is pasted into a preset page window control to display the text picture.
In the embodiment of the present invention, the size of the page form control may be set to the size of the terminal page, and may be used to display text content, and place other form controls with smaller sizes, such as an interactive form control, and the like.
In some embodiments, if the current page includes the placeholder paragraph, an interactive form control needs to be added to the page form control, and based on this, the step of "placing the interactive form control of the corresponding size on the placeholder paragraph according to the layout result" by the terminal may specifically include the following steps:
(1) and if the current page contains the placeholder paragraphs according to the typesetting result, generating an interactive window control with a corresponding size according to the size information of the interactive window control.
(2) And determining coordinate information for placing the interactive form control according to the position of the placeholder paragraph on the current page.
(3) In the page form control, the interactive form control with the corresponding size is placed at the position indicated by the coordinate information, so that the interactive form control with the corresponding size is placed on the placeholder paragraphs.
That is to say, if the current page includes the placeholder paragraph, that is, the current page is a page including a specified chapter position, in addition to rendering the text content of the current page, obtaining and displaying the text picture, an interactive form control needs to be added to the page, so as to display the text interaction information in the interactive form control.
Specifically, the interactive form control with the corresponding size is generated according to the size information of the determined interactive form control, and in addition, different types of interactive form controls can be selectively generated according to the type of the text interactive information; after the interactive window control is generated, the coordinate information of the occupied paragraphs is extracted according to the position of the occupied paragraphs on the current page, so that the coordinate information of the interactive window control can be obtained, then the interactive window control is placed at the position indicated by the coordinate information, namely, the occupied paragraphs are inserted into the page window control, the interactive window control with the corresponding size is placed, and finally, the text interactive information is pasted into the interactive window control so as to display the text interactive information.
As can be seen from the above, according to the method for displaying text interaction information provided in this embodiment, text content to be displayed and corresponding text interaction information are obtained, size information of an occupied paragraph is determined according to the text interaction information, then an occupied paragraph corresponding to the size information is inserted into an appointed chapter position of the text content, and the text content into which the occupied paragraph is inserted is typeset together, that is, the occupied paragraph is used to occupy an interactive window control.
The method according to the first embodiment will be described in further detail below by way of example.
Firstly, the display device of the text interaction information is integrated in a terminal, an application software-text reader for reading common characters is installed in the terminal, and the text reader is utilized to execute the following display method of the text interaction information. The text reader may include a plurality of functional modules, and perform corresponding operations to complete the following method for displaying text interaction information, referring to fig. 2a, a schematic structural diagram of the functional modules in the text reader is shown, and each functional module is described simply as follows:
page window module 21: and the form control is used for displaying the content of each page and receiving various interactive operations of the user.
Page form agent module 22: the method is an information source of the page form and is used for receiving command call of the page form, providing contents to be displayed and interactive form controls for the page form, and simultaneously providing information such as the current reading progress of texts and whether the interactive form controls need to be loaded currently for the page form.
The interactive information management module 23: the system is used for pulling the interaction information corresponding to the current text content (such as the current chapter content), caching the chapter information corresponding to the text content, and providing an interface for acquiring the text interaction information for the page window agent module.
Interactive form generation module 24: the method is used for calculating the size (such as height) of the interactive window control according to the pre-typesetting of the input text interaction information, and generating the interactive window control with the corresponding size according to the input text interaction information.
The text content processing module 25: the method is used for loading original text content, reading text interaction information and inserting corresponding place-occupying paragraphs at specified chapter positions (such as chapter ends and the like) according to the text interaction information.
The layout information generating module 26: the method is used for typesetting and cutting pages, namely dividing chapter content containing placeholder paragraphs into corresponding pages, calculating text content capable of being accommodated in each page, then generating a data structure containing paragraph information from the text of each page, and providing the data structure to a rendering module for rendering.
The rendering module 27: the system is used for generating a picture according to the text content contained in the page and the corresponding paragraph information and putting the picture into a page window module for displaying.
Based on the above-described function modules, the method for displaying text interaction information will be described in detail below. Referring to fig. 2b, fig. 2b is another schematic flow chart illustrating a method for displaying text interaction information according to an embodiment of the present invention. The method can be embodied as follows:
in step S201, the page frame module 21 sends a reading instruction to the page frame agent module 22.
For example, an application home page of the text reader is displayed through the page window control, a plurality of control instruction buttons are set in the application home page, such as a reading button, a downloading button, an exit button, and the like, and the user sends a reading instruction to the page window agent module 22 through the electrolytic reading button, where the reading instruction is used for requesting to display the current text content corresponding to the reading instruction.
It is understood that the text content in the embodiment of the present invention may refer to some texts in the standardized format such as RSS and Atom. The specific content can be any literal material content, which refers to the expression form of written language, and from the literature, the specific content is usually a sentence or a combination of sentences with complete and systematic meaning; a text may be a sentence, a paragraph, or a chapter (section), and is not particularly limited herein.
In step S202, the page frame agent module 22 forwards the reading instruction to the text content processing module 25.
In step S203, the text content processing module 25 loads the corresponding text content to be read according to the reading instruction.
The page window agent module 22 is configured to receive a command call of a page window and provide content to be displayed for the page window, so that the page window agent module 22 forwards the reading instruction to the text content processing module 25, and the text content processing module 25 may load text content to be read corresponding to the reading instruction from a network side or locally.
In step S204, the interactive information management module 23 calculates size information of a required interactive window control according to text interactive information corresponding to the text content, and returns the text interactive information and the size information of the interactive window control to the text content processing module 25.
When the text content processing module 25 loads the corresponding text content to be read, the interactive information management module 23 may load the text interactive information corresponding to the text content, and calculate the size information of the required interactive window control according to the text interactive information.
The text interaction information refers to information interactively communicated with a reading user, and can be set by a text author, a publisher or an advertiser when releasing text content, namely, the text interaction information is correspondingly set for each text with interaction requirements.
For example, the text interaction information may be comment information that the user wants to read, such as posting a feeling, providing a suggestion, and asking for approval, and may also be advertisement information, such as other work information of the text author, other information related to the text content, or other advertisement information, and is not limited herein.
In this embodiment, the interactive information management module 23 calculates the size information of the required interactive window control according to the text interactive information corresponding to the text content, and may specifically include: the method comprises the steps of determining size information (namely the height of an interactive form control) of a required interactive form control according to format information, content types and the like of text interactive information, wherein the format information refers to preset font, paragraph and other format information required by the text interactive information during display, and the content types comprise comment information such as words, suggestions and praise required to be read by a user or advertisement information.
Then, the interactive information management module 23 returns the text interactive information and the size information of the interactive window control to the text content processing module 25.
In step S205, the text content processing module 25 inserts a space occupying paragraph with a corresponding size at the end of the chapter of the text content according to the size information of the interactive window control, and sets the text content color attribute of the space occupying paragraph to be transparent.
For example, the text content processing module 25 inserts a placeholder paragraph at the end of the chapter of the text content according to the height required by the interactive form control, where the paragraph height of the placeholder paragraph is set as the height of the interactive form control, and the color attribute of the text content of the placeholder paragraph is set as transparent.
In the embodiment of the present invention, the placeholder paragraph occupies a fixed position in the format of the paragraph, and can be regarded as a blank paragraph, so that content can be added to the blank paragraph, for example, an interactive form control is added.
Please refer to fig. 2c, which is a schematic diagram illustrating the setting of placeholder paragraphs, in this embodiment, the placeholder paragraph is set at the end of the chapter, and if there are many chapters, the placeholder paragraph may also be set to be inserted at the beginning of the chapter, that is, the number of inserted placeholder paragraphs is not limited to one, and may also be multiple, which is not limited to the present invention.
Furthermore, as shown in fig. 2c, a place-occupying paragraph is inserted at the end of the chapter and the color attribute of the text content is set to be transparent, so that not only can a place be reserved for the interactive window control added later, but also the effect that the content user of the place-occupying paragraph is invisible is achieved.
It will be appreciated that for ease of understanding, the placeholder paragraph shown in FIG. 2c is represented by a dashed box, which is effectively an invisible effect.
In some embodiments, when a place-occupying paragraph is inserted at the end of a chapter, the text content of the place-occupying paragraph may also be set to be blank, and the effect that the content of the place-occupying paragraph is invisible to a user may also be achieved, which is not specifically limited by the present invention.
In step S206, the page frame agent module 22 obtains the text content with the placeholder paragraphs from the text content processing module 25, and transmits the text content with the placeholder paragraphs and the current reading progress information to the composition information generating module 26.
Since the page frame agent module 22 can provide the information of the current reading progress of the text, after the text content processing module 25 adds the space occupying paragraph into the text content, the page frame agent module 22 obtains the text content with the space occupying paragraph from the text content processing module 25 and transmits the text content with the space occupying paragraph and the current reading progress information to the composition information generating module 26.
In step S207, the layout information generating module 26 generates layout information according to the displayable text paragraph information and the preset page format information of the page, and performs layout on the text content with the placeholder paragraphs in combination with the current reading progress information.
For example, the layout information generating module 26 determines the unread text content to be currently laid out according to the current reading progress information, where the text content is the unread chapter content containing the placeholder paragraphs, performs format adjustment on the chapter content according to preset page format information, such as paragraph and font, so as to calculate the text content that can be accommodated by each page, then divides the chapter content containing the placeholder paragraphs into corresponding pages, and generates a data structure containing paragraph information for each page of text.
In the embodiment, the layout paging is performed on the unread text content, so that the data volume processed by the terminal can be reduced, and the operation efficiency can be improved.
In step S208, the rendering module 27 renders the text content included in the current page according to the corresponding paragraph information, so as to generate a text picture.
It can be understood that, in the text reader, for the consideration of performance, the text content needs to be rendered into a picture for display, and the rendering module 27 reads paragraph information corresponding to the current page according to the result of the composition paging, so that the text content contained in the current page can be rendered to generate a text picture for a user to view.
In step S209, the page form module 21 posts and displays the text picture to the page form control.
The page form module 21 reads the text picture of the current page from the rendering module 27 through the page form agent module 22, and the page form module 21 attaches the text picture to the page form control for displaying, so that the text display part is completed.
Further, if the current page includes the placeholder paragraph, that is, the current page is a page including a designated chapter position, in addition to rendering the text content of the current page, obtaining and displaying a text picture, an interactive form control needs to be added to the page to display text interaction information. For example, in this embodiment, if the designated chapter position is the end of a chapter, if the current page is the last page, an interactive form control needs to be added to the page.
For example, it can be determined by page frame agent module 22 whether the interactive frame control needs to be loaded currently, and if so, the information is provided to page frame module 21, and page frame module 21 requests interactive frame generation module 24 to transmit the generated interactive frame control.
In step S210, the interactive form generating module 24 generates an interactive form control with a corresponding size according to the size information of the interactive form control, and returns the interactive form control to the page form module 21.
Specifically, first, when the page form module 21 receives a message that an interactive form control needs to be added, text interactive information is read from the interactive information management module 23, and after the text interactive information is read, the interactive form generation module 24 generates an interactive form control of a corresponding size according to the size information of the interactive form control, and returns the interactive form control to the page form module 21.
In step S211, the layout information generating module 26 determines coordinate information for placing the interactive form control according to the position of the placeholder in the current page.
Further, the page form module 21 requests the page form agent module 22 to provide information of a position to which the interactive form control should be added, and then the page form agent module 22 requests the composition information generation module 26, and the composition information generation module 26 determines coordinate information of the interactive form control to be placed according to the position of the placeholder on the current page, and then returns the coordinate information to the page form agent module 22, and the page form agent module 22 returns the coordinate information of the interactive form control to be placed to the page form module 21.
In step S212, the page form module 21 places an interactive form control on the placeholder according to the coordinate information, and displays the text interactive information in the interactive form control.
It can be understood that, firstly, the interactive form control with the corresponding size is generated according to the determined size information of the interactive form control, and in addition, different types of interactive form controls can be selected and generated according to the type of the text interactive information; after the interactive window control is generated, the coordinate information of the occupied paragraphs is extracted according to the position of the occupied paragraphs on the current page, so that the coordinate information of the interactive window control can be obtained, then the interactive window control is placed at the position indicated by the coordinate information, namely, the occupied paragraphs are inserted into the page window control, the interactive window control with the corresponding size is placed, and finally the text interactive information is pasted into the interactive window control so as to display the text interactive information.
Referring to fig. 2d together, in order to place an interactive window control in an occupied paragraph and utilize a structural schematic diagram showing text interactive information in the interactive window control, for convenience of understanding, the interactive window control shown in fig. 2d is represented by a dashed line frame, and actually, the occupied paragraph is invisible, that is, through special design, a position is reserved for the interactive window control by adding a method of adding an occupied transparent paragraph before typesetting and rendering, and after that, the interactive window control is generated and added to the corresponding position.
It should be noted that, in the specific implementation, the above functional modules may be implemented as independent entities, or may be arbitrarily combined to be implemented as one or several entities, and the division of the above functional modules is merely for illustration, which is convenient for understanding and description, and does not form a limitation to the present invention.
As can be seen from the above, according to the method for displaying text interaction information provided in this embodiment, text content to be displayed and corresponding text interaction information are obtained, size information of an occupied paragraph is determined according to the text interaction information, then an occupied paragraph corresponding to the size information is inserted into an appointed chapter position of the text content, and the text content into which the occupied paragraph is inserted is typeset together, that is, the occupied paragraph is used to occupy an interactive window control. The method of adding an occupied transparent paragraph before typesetting and rendering reserves a position for the interactive window control in advance through a special design, and then generates the interactive window control to add to the corresponding position, thereby not only maintaining the high efficiency of rendering, but also adding the complex interactive window control quickly and efficiently, and ensuring that the development and maintenance work is simple and easy.
In order to better implement the method for displaying the text interaction information provided by the embodiment of the invention, the embodiment of the invention also provides a device based on the method for displaying the text interaction information. The meaning of the noun is the same as that in the method for displaying the text interaction information, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3a, fig. 3a is a schematic structural diagram of a display apparatus for text interaction information according to an embodiment of the present invention, and the display apparatus 300 for text interaction information may include a first obtaining unit 301, a first determining unit 302, an inserting unit 303, a composing unit 304, and a displaying unit 305.
The first obtaining unit 301 is configured to obtain text content to be displayed and text interaction information preset in the text content.
In the embodiment of the invention, a text reader application is installed in the terminal, and the text reader is utilized to execute the display method of the text interaction information, wherein the text reader, which can also be called a character reader, is used as application software for reading common characters, and can read texts in standard formats such as RSS (simple information syndication) and Atom (format of subscription network log) and the like.
It can be understood that the terminal may download the text content and the text interaction information from the network side to the terminal local, and extract the text interaction information from the terminal local, or the terminal may directly obtain the text interaction information from the network side, which is not limited herein.
The text interaction information refers to information interactively communicated with a reading user, and can be set by a text author, a publisher or an advertiser when releasing text content, namely, the text interaction information is correspondingly set for each text with interaction requirements.
For example, the text interaction information may be comment information that the user wants to read, such as posting a feeling, providing a suggestion, and asking for approval, and may also be advertisement information, such as other work information of the text author, other information related to the text content, or other advertisement information, and is not limited herein.
A first determining unit 302, configured to determine size information of the placeholder paragraphs according to the text interaction information.
For example, after text interaction information preset in text content is acquired, size information of an occupied paragraph to be set is determined according to the text interaction information, and for example, the size information of the occupied paragraph is determined according to format information, content type and the like of the text interaction information.
In the embodiment of the present invention, the placeholder paragraph occupies a fixed position in the format of the paragraph, and can be regarded as a blank paragraph, so that content can be added to the blank paragraph, for example, an interactive form control is added.
An inserting unit 303, configured to insert a placeholder paragraph corresponding to the size information at a specified chapter position of the text content.
For example, after the occupied paragraph with the corresponding size is generated according to the size information of the occupied paragraph, the position of the designated section where the occupied paragraph needs to be inserted needs to be determined first, and after the position is determined, the occupied paragraph is inserted into the designated section.
The specified chapter position may be a chapter start, a chapter end, or the like, and based on this, the inserting unit 303 is specifically configured to insert a placeholder paragraph corresponding to the size information at the chapter end of the text content.
It is to be understood that the designated chapter positions may be set as one or more, and correspondingly, the number of the inserted space-occupying paragraphs may also be one or more, and may be set according to actual requirements, for example, in a general case, the space-occupying paragraph may be set to be inserted at the end of the chapter, and in a scenario where the content of some chapters is large, the space-occupying paragraph may also be set to be inserted at the beginning of the chapter, and the like, which by way of example does not limit the present invention.
And the typesetting unit 304 is used for typesetting the text content into which the space-occupying paragraph is inserted to obtain a typesetting result, and placing the interactive window control with the corresponding size on the space-occupying paragraph according to the typesetting result.
And a presentation unit 305 for presenting the text interaction information in the interactive form control.
It can be understood that the layout is performed after the space-occupying paragraphs are inserted into the text content, and the interactive pages are added into the layout logic of the original chapter content to perform the layout together, so that the step of judging whether the special logic of the interactive pages is added is not required to be executed, the convenience and flexibility of adding the interactive window control into the chapter content are greatly improved, and the probability of layout errors is reduced.
Referring to fig. 3b together, fig. 3b is another schematic structural diagram of a display apparatus for interactive text information according to an embodiment of the present invention, in the display apparatus 300 for interactive text information, the first determining unit 302 may specifically include:
(1) the first determining subunit 3021 is configured to determine size information of a required interactive form control according to the text interaction information.
(2) And the second determining subunit 3022 is configured to determine size information of the placeholder paragraphs according to the size information of the interactive form control.
For example, according to format information, content type and the like of the text interaction information, the size information of the required interactive window control is determined, wherein the format information refers to preset font, paragraph and other format information required by the text interaction information during display, and the content type includes comment information required to read user postings, suggestions, praise and the like, or advertisement information and the like.
Furthermore, because the interactive form control needs to be added to the space occupying paragraph, the size information of the space occupying paragraph needs to be determined according to the determined size information of the interactive form control, and the space occupying paragraph with a corresponding size is generated according to the size information of the space occupying paragraph.
In the embodiment of the present invention, the interactive form control is a form control for adding and displaying text interactive information.
As shown in fig. 3b, the apparatus 300 for presenting text interaction information may further include a setting unit 306, configured to set a color of the text content of the place-occupying paragraph to be transparent when the place-occupying paragraph corresponding to the size information is inserted at the end of the chapter of the text content.
Therefore, the position can be reserved for the occupation of the interactive form control added later, and the effect that the content user of the occupied paragraph is invisible is achieved.
In some embodiments, when an placeholder paragraph corresponding to the size information is inserted into the designated chapter position of the text content, the setting unit 306 may also set the text content of the placeholder paragraph to be blank, and an effect that a content user of the placeholder paragraph is invisible may also be achieved, which is not specifically limited by the present invention.
In this embodiment of the present invention, the typesetting unit 304 typesets the text content with the inserted space-occupying paragraphs, and there are many ways to obtain the typesetting result, for example, in some embodiments, the typesetting unit 304 may directly generate the typesetting information according to the preset page format information of the text content, the displayable text paragraph information of the page, and the inserted space-occupying paragraphs, and typeset and page the text content with the added space-occupying paragraphs according to the typesetting information.
The page format information refers to format information such as fonts and paragraphs required to be displayed in a page form control, the text paragraph information which can be displayed on the page refers to information such as text paragraphs or text characters which can be contained in the page form control, and the position-occupying paragraphs refer to position-occupying paragraphs of which the size information and the inserting positions are determined.
For another example, in some embodiments, as shown in fig. 3b, the composition unit 304 may specifically include:
the obtaining subunit 3041 is configured to obtain current reading progress information.
The generating subunit 3042 is configured to generate the layout information according to the preset page format information, the text paragraph information that can be displayed on the page, and the placeholder paragraphs.
The layout subunit 3043 is configured to perform layout on the text content inserted with the placeholder paragraphs according to the layout information and the reading progress information, so as to obtain a layout result.
Compared with the previous embodiment, the embodiment has the advantages that the consideration on the current reading progress information is added, namely before typesetting, the current reading progress information is obtained, then the unread text content needing typesetting currently is determined according to the current reading progress information, and the determined unread text content is typeset and paged according to the typesetting information and the current reading progress information.
In this embodiment of the present invention, after the composition unit 304 composes the text content into which the placeholder paragraphs are inserted according to the composition information, the text content needs to be displayed, please refer to fig. 3c, which is another schematic structural diagram of the display apparatus for text interaction information, where the display apparatus 300 for text interaction information may further include:
the second obtaining unit 307 is configured to obtain text content to be displayed on the current page according to the typesetting result.
And the rendering unit 308 is configured to render the text content that needs to be displayed on the current page, so as to obtain a text picture.
The display unit 305 is configured to display the text picture in a preset page form control.
It can be understood that, in the text reader, for the consideration of performance, the text content needs to be rendered into a picture for display, first, according to the result of composition paging, the text content that needs to be displayed on the current page is extracted, then the text content that needs to be displayed on the current page is rendered, a text picture that can be viewed by a user is generated, and the text picture is pasted into a preset page window control to display the text picture.
In the embodiment of the present invention, the size of the page form control may be set to the size of the terminal page, and may be used to display text content, and place other form controls with smaller sizes, such as an interactive form control, and the like.
In some embodiments, as shown in fig. 3c, if the current page includes the placeholder paragraph, an interactive form control needs to be added to the page form control, and based on this, the apparatus 300 for presenting text interaction information may further include:
the generating unit 309 is configured to, if it is determined that the current page includes the placeholder paragraph according to the typesetting result, generate an interactive window control of a corresponding size according to the size information of the interactive window control.
And a second determining unit 310, configured to determine, according to the position of the placeholder on the current page, coordinate information for placing the interactive form control.
The placing unit 311 is configured to place, in the page form control, an interactive form control of a corresponding size at a position indicated by the coordinate information, so that the interactive form control of the corresponding size is placed on the placeholder.
That is to say, if the current page includes the placeholder paragraph, that is, the current page is a page including a specified chapter position, in addition to rendering the text content of the current page, obtaining and displaying the text picture, an interactive form control needs to be added to the page to display the text interactive information.
Specifically, the interactive form control with the corresponding size is generated according to the size information of the determined interactive form control, and in addition, different types of interactive form controls can be selectively generated according to the type of the text interactive information; after the interactive window control is generated, the coordinate information of the occupied paragraphs is extracted according to the position of the occupied paragraphs on the current page, so that the coordinate information of the interactive window control can be obtained, then the interactive window control is placed at the position indicated by the coordinate information, namely, the occupied paragraphs are inserted into the page window control, the interactive window control with the corresponding size is placed, and finally, the text interactive information is pasted into the interactive window control so as to display the text interactive information.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The display device of the text interactive information can be specifically integrated in a terminal, and the terminal can comprise a mobile phone, a notebook computer, a tablet PC and other equipment which are provided with a storage unit and a microprocessor.
Therefore, the display device of text interaction information provided by this embodiment obtains the text content to be displayed and the corresponding text interaction information, determines the size information of the placeholder paragraphs according to the text interaction information, inserts the placeholder paragraphs corresponding to the size information at the designated chapter positions of the text content, and typesets the text content with the inserted placeholder paragraphs together, that is, the placeholder paragraphs are used to placeholder the interactive window controls, when displaying according to the typesetting result, only the corresponding size of the interactive window controls need to be put in the placeholder paragraphs, and typesetting is not needed again, so that convenience and flexibility of adding the interactive window controls in the chapter contents are greatly improved.
Embodiments of the present invention also provide a terminal, as shown in fig. 4, the terminal 400 may include one or more computer-readable storage media, such as a memory 401, a sensor 402, an input unit 403, a display unit 404, a power supply 405, and a processor 406 including one or more processing cores. Those skilled in the art will appreciate that the terminal structure shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 401 may be used to store applications and data. The memory 401 stores applications containing executable code. The application programs may constitute various functional modules. The processor 406 executes various functional applications and data processing by running the application programs stored in the memory 401. Further, the memory 401 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 401 may also include a memory controller to provide the processor 406 and the input unit 403 access to the memory 401.
The terminal may also include at least one sensor 402, such as a light sensor, a gravitational acceleration sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
The input unit 403 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control. In particular, in a particular embodiment, the input unit 403 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 406, and can receive and execute commands sent by the processor 406. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 403 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a fingerprint recognition module, a trackball, a mouse, a joystick, and the like.
The display unit 404 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 404 may include a display panel. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 406 to determine the type of touch event, and the processor 406 then provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 4 the touch-sensitive surface and the display panel are shown as two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal also includes a power source 405 (such as a battery) to power the various components. Preferably, the power source may be logically connected to the processor 406 through a power management system, so that the power management system may perform functions of managing charging, discharging, and power consumption. The power supply 405 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The processor 406 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal and processes data by running or executing an application program stored in the memory 401 and calling data stored in the memory 401, thereby performing overall monitoring of the terminal. Alternatively, processor 406 may include one or more processing cores; preferably, the processor 406 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like.
Although not shown in fig. 4, the terminal may further include a camera, a bluetooth module, a network module, and the like, which are not described herein again.
Specifically, in this embodiment, the processor 406 in the terminal loads the executable code corresponding to the process of one or more application programs into the memory 401 according to the following instructions, and the processor 406 runs the application program stored in the memory 401, thereby implementing various functions:
acquiring text content to be displayed and text interaction information preset by the text content;
determining the size information of the placeholder paragraphs according to the text interaction information;
inserting a position occupying paragraph corresponding to the size information at the position of the appointed chapter of the text content;
typesetting the text content inserted with the space-occupying paragraph to obtain a typesetting result, and putting an interactive window control with a corresponding size on the space-occupying paragraph according to the typesetting result;
and displaying the text interaction information in the interaction form control.
Inserting a placeholder paragraph corresponding to the size information at a designated chapter position of the text content may include: and inserting a position occupying paragraph corresponding to the size information at the end of the chapter of the text content.
The processor 406 determining the size information of the placeholder paragraphs according to the text interaction information may include: determining the size information of the required interactive window control according to the text interactive information; and determining the size information of the placeholder paragraphs according to the size information of the interactive form control.
When the place occupying paragraph corresponding to the size information is inserted into the specified chapter position of the text content, the color of the text content of the place occupying paragraph is set to be transparent.
The processor 406 typesets the text content with the inserted placeholder paragraphs, including:
acquiring current reading progress information; generating typesetting information according to preset page format information, text paragraph information which can be displayed on a page and an occupied paragraph; and typesetting the text content inserted with the placeholder paragraphs according to the typesetting information and the reading progress information to obtain a typesetting result.
Further, acquiring text contents to be displayed on the current page according to the typesetting result; rendering text contents to be displayed on a current page to obtain a text picture; and displaying the text picture in a preset page form control.
The processor 406 puts an interactive form control with a corresponding size on the placeholder paragraph according to the typesetting result, including:
if the current page is determined to contain the placeholder paragraph according to the typesetting result, generating an interactive window control with a corresponding size according to the size information of the interactive window control; determining coordinate information for placing an interactive window control according to the position of the placeholder paragraph on the current page; in the page form control, placing the interactive form control with the corresponding size at the position indicated by the coordinate information, so that the interactive form control with the corresponding size is placed on the placeholder paragraphs.
Therefore, in the terminal provided by this embodiment, the text content to be displayed and the corresponding text interaction information are obtained, the size information of the occupied paragraphs is determined according to the text interaction information, then the occupied paragraphs corresponding to the size information are inserted into the designated chapter positions of the text content, and the text content into which the occupied paragraphs are inserted is typeset together, that is, the occupied paragraphs are used to occupy the interactive window controls, when the display is performed according to the typesetting result, only the interactive window controls with the corresponding sizes are placed into the occupied paragraphs, and the typesetting is not required again, so that the convenience and flexibility of adding the interactive window controls into the chapter contents are greatly improved.
In addition, an embodiment of the present invention further provides a storage medium, on which computer instructions are stored, where the instructions are loaded by a processor and executed to perform the steps of the method for displaying text interaction information provided in the above embodiment.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and a part which is not described in detail in a certain embodiment may refer to the above detailed description of the presentation method for text interaction information, and is not described herein again.
The display device of the text interaction information provided by the embodiment of the present invention is, for example, a computer, a tablet computer, a mobile phone with a touch function, and the like, and the display device of the text interaction information and the display method of the text interaction information in the above embodiments belong to the same concept, and any method provided in the display method embodiment of the text interaction information can be run on the display device of the text interaction information, and the specific implementation process thereof is described in the display method embodiment of the text interaction information, and is not described herein again.
It should be noted that, for the method for displaying text interaction information in the present invention, a person skilled in the art may understand that all or part of the process for implementing the method for displaying text interaction information in the embodiment of the present invention may be completed by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and the process of executing the computer program may include the process of the embodiment of the method for displaying text interaction information. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the display device of the text interaction information in the embodiment of the present invention, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The method, the apparatus and the storage medium for displaying text interactive information provided by the embodiment of the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. A method for displaying text interactive information is characterized by comprising the following steps:
acquiring text content to be displayed and text interaction information preset by the text content, wherein the text interaction information is displayed through an interactive window control;
determining size information of an occupancy paragraph according to the text interaction information, wherein the occupancy paragraph is used for occupying a position required by adding an interaction window control through a paragraph format before typesetting for the text content;
inserting a position occupying paragraph corresponding to the size information at the position of the specified chapter of the text content;
typesetting the text content inserted with the space-occupying paragraphs to obtain a typesetting result, and if the current page is determined to contain the space-occupying paragraphs according to the typesetting result, generating interactive window controls with corresponding sizes according to the size information of the interactive window controls; determining coordinate information for placing an interactive window control according to the position of the placeholder paragraph on the current page; placing an interactive form control with a corresponding size in the page form controls at the position indicated by the coordinate information, so that the interactive form controls with the corresponding size are placed in the placeholder paragraphs, wherein the page form controls are used for collecting data, and the data comprises a text picture and the interactive form controls;
displaying the text interaction information in the interaction window control;
after obtaining the typesetting result, the method further comprises the following steps: acquiring text contents to be displayed on the current page according to the typesetting result; rendering text contents to be displayed on a current page to obtain a text picture; and displaying the text picture in a preset page form control.
2. The method for displaying interactive text information according to claim 1, wherein the determining the size information of the placeholder paragraphs according to the interactive text information comprises:
determining the size information of the required interactive window control according to the text interactive information;
and determining the size information of the placeholder paragraphs according to the size information of the interactive form control.
3. The method for displaying interactive text information according to claim 1, wherein when inserting a placeholder paragraph corresponding to the size information into a designated chapter position of the text content, the method further comprises:
setting the color of the text content of the place-occupying paragraph to be transparent.
4. The method for displaying interactive text information according to claim 2, wherein the typesetting of the text content with the placeholder paragraphs inserted therein to obtain the typesetting result comprises:
acquiring current reading progress information;
generating typesetting information according to preset page format information, text paragraph information which can be displayed on a page and an occupied paragraph;
and typesetting the text content inserted with the placeholder paragraphs according to the typesetting information and the reading progress information to obtain a typesetting result.
5. The method for displaying interactive text information according to any one of claims 1 to 4, wherein the inserting a placeholder paragraph corresponding to the size information at a designated chapter position of the text content comprises:
and inserting a position occupying paragraph corresponding to the size information at the end of the chapter of the text content.
6. A display device for text interactive information is characterized by comprising:
the system comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring text content to be displayed and text interaction information preset by the text content, and the text interaction information is displayed through an interaction window control;
the first determining unit is used for determining size information of an occupancy paragraph according to the text interaction information, wherein the occupancy paragraph is used for occupying a position required by adding an interactive window control through a paragraph format before typesetting for the text content;
the inserting unit is used for inserting a position occupying paragraph corresponding to the size information at the position of the specified chapter of the text content;
the typesetting unit is used for typesetting the text content inserted with the space-occupying paragraphs to obtain a typesetting result, and if the current page is determined to contain the space-occupying paragraphs according to the typesetting result, generating interactive window controls with corresponding sizes according to the size information of the interactive window controls; determining coordinate information for placing an interactive form control according to the position of the placeholder paragraph on the current page; placing an interactive form control with a corresponding size in the page form controls at the position indicated by the coordinate information, so that the interactive form controls with the corresponding size are placed in the placeholder paragraphs, wherein the page form controls are used for collecting data, and the data comprises a text picture and the interactive form controls;
the display unit displays the text interaction information in the interaction window control;
after obtaining the typesetting result, the method further comprises the following steps: acquiring text contents to be displayed on the current page according to the typesetting result; rendering text contents to be displayed on a current page to obtain a text picture; and displaying the text picture in a preset page form control.
7. The apparatus for displaying interactive text information according to claim 6, wherein the first determining unit comprises:
the first determining subunit is used for determining the size information of the required interactive window control according to the text interactive information;
and the second determining subunit is used for determining the size information of the placeholder paragraphs according to the size information of the interactive form control.
8. The apparatus for displaying interactive text information according to claim 6, further comprising a setting unit, configured to set a color of the text content of the placeholder paragraph to be transparent when the placeholder paragraph corresponding to the size information is inserted at the end of the chapter of the text content.
9. The apparatus for displaying interactive text information according to claim 8, wherein the composition unit comprises:
the acquisition subunit is used for acquiring the current reading progress information;
the generating subunit is used for generating typesetting information according to preset page format information, text paragraph information which can be displayed on a page and an occupied paragraph;
and the typesetting subunit is used for typesetting the text content inserted with the placeholder paragraphs according to the typesetting information and the reading progress information to obtain a typesetting result.
10. The apparatus for displaying interactive text information according to any one of claims 6 to 9, wherein the inserting unit is specifically configured to insert a space occupying paragraph corresponding to the size information at the end of a chapter of the text content.
11. A storage medium having stored thereon computer instructions, the instructions being loaded by a processor and performing the steps of the method for presenting a textual interaction message according to any of claims 1 to 5.
CN201710922943.3A 2017-09-30 2017-09-30 Method and device for displaying text interactive information and storage medium Active CN109597981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710922943.3A CN109597981B (en) 2017-09-30 2017-09-30 Method and device for displaying text interactive information and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710922943.3A CN109597981B (en) 2017-09-30 2017-09-30 Method and device for displaying text interactive information and storage medium

Publications (2)

Publication Number Publication Date
CN109597981A CN109597981A (en) 2019-04-09
CN109597981B true CN109597981B (en) 2022-05-17

Family

ID=65956300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710922943.3A Active CN109597981B (en) 2017-09-30 2017-09-30 Method and device for displaying text interactive information and storage medium

Country Status (1)

Country Link
CN (1) CN109597981B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110348000B (en) * 2019-07-16 2023-12-26 仲恺农业工程学院 Typesetting document interaction calculation method, device, equipment and computer readable medium
CN110784753B (en) * 2019-10-15 2023-01-17 腾讯科技(深圳)有限公司 Interactive video playing method and device, storage medium and electronic equipment
CN111475762B (en) * 2020-04-10 2023-07-18 掌阅科技股份有限公司 Publication page processing method, computing device and storage medium
CN114125566B (en) * 2021-12-29 2024-03-08 阿里巴巴(中国)有限公司 Interaction method, interaction system and electronic equipment
CN114330277B (en) * 2021-12-31 2023-08-22 抖音视界有限公司 Reading typesetting method, device, equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002304142A (en) * 2001-04-03 2002-10-18 Neeburu:Kk Method and device for advertisement placing processing and program
US20080306815A1 (en) * 2007-06-06 2008-12-11 Nebuad, Inc. Method and system for inserting targeted data in available spaces of a webpage
KR20090046670A (en) * 2008-04-21 2009-05-11 주식회사 아리아드 Keyword Insight Interactive Advertising System by Matching by Content Heatmap Frame
CN101404080A (en) * 2008-10-31 2009-04-08 北大方正集团有限公司 Advertisement imbedding and indication method and apparatus
US20120185787A1 (en) * 2011-01-13 2012-07-19 Microsoft Corporation User interface interaction behavior based on insertion point
US9098471B2 (en) * 2011-12-29 2015-08-04 Chegg, Inc. Document content reconstruction
US9116871B2 (en) * 2013-05-20 2015-08-25 Microsoft Technology Licensing, Llc Ink to text representation conversion
CN105373545A (en) * 2014-08-25 2016-03-02 阿里巴巴集团控股有限公司 Picture display method and device
CN106407199A (en) * 2015-07-27 2017-02-15 广州市动景计算机科技有限公司 Network article comment processing method and apparatus
CN107180041A (en) * 2016-03-09 2017-09-19 广州市动景计算机科技有限公司 Web page content review method and system
CN105912227A (en) * 2016-04-13 2016-08-31 广州阿里巴巴文学信息技术有限公司 Text information display method, device and mobile device

Also Published As

Publication number Publication date
CN109597981A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
CN109597981B (en) Method and device for displaying text interactive information and storage medium
CN109074172B (en) Inputting images to an electronic device
ES2866798T3 (en) Systems, methods, and interfaces for displaying online content and block-level content on an access device
CN106168978B (en) Method and device for processing popup in webpage
EP2592574B1 (en) Improved block zoom on a mobile electronic device
CN105912091B (en) Electronic device and method for reducing power consumption thereof
CN109155076B (en) Automatic identification and display of objects of interest in a graphic novel
US20150012818A1 (en) System and method for semantics-concise interactive visual website design
CN101842243A (en) Dynamic virtual input device configuration
US10310715B2 (en) Transition controlled e-book animations
KR20130115016A (en) Method and apparatus for providing feedback associated with e-book in terminal
JP2009181569A6 (en) Information display method, program, and information display system
JP2009181569A (en) Information display method, program, and information display system
CN112114734B (en) Online document display method, device, terminal and storage medium
US20150253985A1 (en) System and method for controlling display of virtual keyboard to avoid obscuring data entry fields
CN108700978B (en) Assigning textures to graphical keyboards based on subject textures of an application
US20180300021A1 (en) Text input system with correction facility
US20150007092A1 (en) Method and electronic device for displaying e-book
US20230100964A1 (en) Data input system/example generator
CN113297859A (en) Table information translation method and device and electronic equipment
US20110219294A1 (en) System And Method For Automatic Continuation Marks In An Electronic Publication
KR20110021714A (en) Method and apparatus for supplying electronic documents page by page computer graphics
JP6286897B2 (en) Document display device, document display method, and document display program
US9619915B2 (en) Method and apparatus for converting an animated sequence of images into a document page
CN114675911B (en) View display method, device and 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