CN111767488A - Article display method, electronic device and storage medium - Google Patents

Article display method, electronic device and storage medium Download PDF

Info

Publication number
CN111767488A
CN111767488A CN202010544673.9A CN202010544673A CN111767488A CN 111767488 A CN111767488 A CN 111767488A CN 202010544673 A CN202010544673 A CN 202010544673A CN 111767488 A CN111767488 A CN 111767488A
Authority
CN
China
Prior art keywords
picture
article
text
target article
natural
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.)
Pending
Application number
CN202010544673.9A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010544673.9A priority Critical patent/CN111767488A/en
Publication of CN111767488A publication Critical patent/CN111767488A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure relates to the field of information processing technologies, and in particular, to an article display method, an electronic device, and a storage medium. The article display method comprises the following steps: acquiring a background picture of a target article; acquiring a first parameter of the target article according to a preset display template, wherein the first parameter at least comprises a title of the target article; embedding the first parameter into the background picture according to the preset display template to obtain a home page picture of the target article; generating a text picture of the target article according to the preset display template and the text of the target article; and displaying the home page pictures and sequentially displaying the text pictures. By adopting the embodiment of the application, the problem of poor reading experience caused by the fact that the traditional reading mode is single can be solved.

Description

Article display method, electronic device and storage medium
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to an article display method, an electronic device, and a storage medium.
Background
With the rapid development of the internet, electronic reading gradually becomes a normal phenomenon, and more people can read articles through terminals in daily life; when displaying an article, such as an APP on a mobile phone, the whole content of the article is usually directly displayed in the order of title, author, text, and the like from top to bottom in the same format. However, the inventors found that the following problems exist in the related art: for various articles of different types, when all contents are displayed in sequence from top to bottom in a fixed and same format, the display effect of the articles is monotonous, the related information of the articles cannot be displayed prominently, the reading interest of a user cannot be improved well, the reading mode of the user is single, the reading experience is poor, and the reading fatigue is easy to generate.
Disclosure of Invention
An object of the embodiments of the present application is to provide an article display method, an electronic device, and a storage medium, which can solve the problem of poor reading experience caused by a single conventional reading manner.
In order to solve the above technical problem, an embodiment of the present application provides an article display method, including: acquiring a background picture of a target article; acquiring a first parameter of the target article according to a preset display template, wherein the first parameter at least comprises a title of the target article; embedding the first parameter into the background picture according to the preset display template to obtain a home page picture of the target article; generating a text picture of the target article according to the preset display template and the text of the target article; and displaying the home page pictures and sequentially displaying the text pictures.
An embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the article display method described above.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the article display method described above.
Compared with the prior art, the method and the device for processing the background images of the target article are obtained; acquiring a first parameter of the target article according to a preset display template, wherein the first parameter at least comprises a title of the target article; embedding the first parameter into the background picture according to the preset display template to obtain a home page picture of the target article; generating a text picture of the target article according to the preset display template and the text of the target article; and displaying the home page pictures and sequentially displaying the text pictures. Because the home page picture is generated according to the first parameter of the target article and the background picture, the first parameter at least comprises the title of the target article, and the title belongs to the related information of the target article, the displayed home page picture can clearly, prominently and beautifully display the related information of the target article; secondly, text pictures are also generated according to the text of the target article and are sequentially displayed, so that a reader can read the text of the target article in the form of pictures, and compared with the form of directly displaying all the contents of the article, the picture form provides a new reading mode and is easier to provide immersive reading experience; the home page picture and the text picture are generated based on the preset display template, so that different display templates can be preset to generate pictures with different styles, namely, the article can have diversified display effects to attract the reading interest of readers; in summary, the embodiment of the application provides diversified reading modes, and the interest and reading experience of readers are effectively improved.
In addition, before the obtaining the background picture of the target article, the method further includes: judging that a preset article display instruction is received; before the obtaining of the first parameter of the target article according to the preset display template, the method further includes: determining a preset display template corresponding to the article display instruction according to the article display instruction; that is to say, after receiving a preset article display instruction, the target article is converted into the image form to be displayed, and the preset display template corresponding to the article display instruction is also used when the target article is converted into the image form, so that the reader can select the article display mode according to the reading requirement of the reader, and finally the display effect of the article can be matched with the preference of the reader, thereby improving the reading interest and reading experience of the reader.
In addition, the generating a text picture of the target article according to the preset display template and the text of the target article includes: sequentially acquiring natural paragraphs of the text; typesetting the natural paragraphs according to the preset display template to obtain pictures corresponding to the natural paragraphs, wherein the pictures are used as text pictures of the target article, and the text pictures are arranged according to the sequence of obtaining the natural paragraphs; it can be understood that each text picture and the natural paragraphs of the text are in one-to-one correspondence in order, so that the order and integrity of the natural paragraphs are not damaged, and a reader reads the text pictures in order, and the reading experience is not damaged.
In addition, the sequentially acquiring the natural paragraphs of the text includes: acquiring a first natural section of the text; the typesetting of the natural paragraphs according to the preset display template comprises: acquiring a second parameter of the target article according to the preset display template, wherein the second parameter at least comprises author information of the target article; and typesetting the second parameter and the first natural paragraph according to the preset display template, so that the generated picture corresponding to the first natural paragraph can clearly, prominently and beautifully display the relevant information of the target article.
In addition, the preset display template comprises a preset displayable area; the typesetting of the natural paragraph according to the preset display template to obtain the picture corresponding to the natural paragraph comprises: and typesetting the natural paragraphs in the displayable region according to the preset display template to obtain the pictures corresponding to the natural paragraphs, so that the content of the target article is always displayed in the displayable region, the typesetting formats of the generated pictures corresponding to the natural paragraphs are tidy, and good reading experience is provided for readers.
In addition, when the natural paragraph includes a text, typesetting the natural paragraph in the displayable region according to the preset display template to obtain a picture corresponding to the natural paragraph, including: judging whether the characters included in the natural paragraph exceed the displayable area; if so, splitting the natural paragraphs to obtain a plurality of split paragraphs; arranging characters included by each split paragraph in the displayable region according to the preset display template and each split paragraph to obtain a picture corresponding to each split paragraph as a picture corresponding to the natural paragraph; if not, typesetting the characters included in the natural paragraphs in the displayable area; wherein, the characters included in each split paragraph do not exceed the displayable area; by means of the method for typesetting the natural paragraphs, when the characters included in the natural paragraphs exceed the displayable area, the contents included in the natural paragraphs are not arranged in the corresponding pictures in a crowded manner, and good reading experience is provided for readers.
In addition, the obtaining of the background picture of the target article includes: judging whether the target article comprises a picture or not; if yes, acquiring a picture in the target article as a background picture; if not, randomly acquiring a picture from a preset database as a background picture; it can be understood that when a picture is obtained from the target article as a background picture to generate a picture of the top page of the target article, the content in the target article can be displayed more clearly and prominently.
In addition, the article display instructions include picture switching instructions; the displaying the home page picture and the text picture in sequence comprises: displaying the home page pictures according to the picture switching instruction, and sequentially displaying the text pictures; the image switching instruction also corresponds to the article display instruction, so that the reader can select an image switching mode according to the reading requirement of the reader, and the reading interest and the reading experience of the reader are improved.
Drawings
One or more embodiments are illustrated by the corresponding figures in the drawings, which are not meant to be limiting.
FIG. 1 is a flow chart of a method of article display according to a first embodiment of the present application;
FIG. 2 is a flowchart according to a specific implementation of step 101 in a first embodiment of the present application;
FIG. 3 is a schematic illustration of a first photograph of a home page according to a first embodiment of the present application;
FIG. 4 is a flow chart of an article display method according to a second embodiment of the present application;
FIG. 5 is a schematic illustration of a text picture according to a second embodiment of the present application;
FIG. 6 is a schematic illustration of a displayable region in accordance with a second embodiment of the present application;
FIG. 7 is a flowchart of a typesetting method according to a second embodiment of the present application;
FIG. 8 is a flow chart of laying out a first paragraph of nature according to the second embodiment of the present application;
FIG. 9 is a schematic illustration of another text picture according to a second embodiment of the present application;
FIG. 10 is a flowchart of an article display method according to a third embodiment of the present application;
fig. 11 is a block diagram showing the structure of an electronic apparatus according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that in the examples of the present application, numerous technical details are set forth in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present application relates to an article display method, and a specific flow is shown in fig. 1, including:
step 101, obtaining a background picture of a target article;
102, acquiring a first parameter of a target article according to a preset display template;
103, embedding the first parameter into a background picture according to a preset display template to obtain a home page picture of the target article;
104, generating a text picture of the target article according to a preset display template and the text of the target article;
and 105, displaying the home page pictures and sequentially displaying the text pictures.
The following description specifically describes implementation details of the article display method of the present embodiment, and the following description is provided only for the convenience of understanding and is not necessary for implementing the present embodiment.
For example, the article display method in this embodiment may be applied to news apps, information apps, literature apps, and the like on smart terminals such as mobile phones; when a reader opens the app to read an article, the system in the terminal may execute the article display method in this embodiment to display the article for the reader to read.
In step 101, a background picture of a target article is obtained, and the background picture is a picture of a home page used for generating the target article. A specific implementation manner of obtaining a background picture of a target article, that is, a specific implementation manner of step 101, is provided in this step, and as shown in fig. 2, the method includes the following steps 1011 to 1013.
Step 1011, judging whether the target article comprises a picture or not; if yes, go to step 1012, otherwise go to step 1013.
Step 1012, acquiring a picture in the target article as a background picture;
step 1013, randomly acquiring a picture from a preset database as a background picture.
Specifically, in this step, data on a page on which the target article is displayed may be crawled by a web crawler tool, and whether the displayed target article includes a picture or not may be determined from the data on the page.
For example, when crawling the following data (i.e., code), it may be determined that a picture is included in the target article:
< imgsrc ═ … …' > (e.g.: imgsrc ═ i/photo. jpg "/>, indicating that a picture named" photo. jpg "in the target article is stored in the" i "folder on the server); it is to be understood that the above crawled data is only an example and does not constitute a limitation on determining whether the target article includes a picture.
When the target article comprises the picture, a picture in the target article is obtained and used as a background picture; the first picture in the target article is obtained, so that the content in the target article can be reflected when the home page picture is generated.
When the target article is not crawled to include the picture through the web crawler tool, a picture is randomly acquired from a preset database and is used as a background picture. More specifically, there may be a plurality of preset databases, which respectively correspond to different types of articles, and store different types of pictures, for example: a database 1 is preset, corresponding to travel articles, and stored are pictures of landscapes; a database 2 is preset, corresponding to sports articles, and sports pictures … … and the like are stored; when a picture is randomly acquired from a preset database, the picture can be randomly acquired from the database corresponding to the type of the target article, so that the randomly acquired picture also conforms to the type of the target article, the type of the target article can be displayed clearly and prominently when the home page picture is generated, the immersive reading experience is facilitated, and the situation that the home page picture is generated by acquiring a picture irrelevant to the target article is avoided.
In step 102, a first parameter of the target article is obtained according to a preset display template. Specifically, the preset display template may include: the layout rule and the items of the first parameters; the items of the first parameter at least include titles of articles, and the layout rule may include a layout rule of contents such as a background picture, the first parameter, and a text.
According to the project of the first parameter in the preset display template, the first parameter of the target article can be crawled through a web crawler tool; when the item of the first parameter at least comprises the title of the article, the first parameter of the target article can be obtained from the crawled data (namely the code), and the first parameter comprises the title of the target article; for example, the title of the target article may be obtained as "xxx telling legal stories" when crawling on the following data (i.e., codes), where "main-title" represents the title field:
< h1 class ═ main-title "> xxx telling the law story </h1 >.
The items of the first parameter may further include the number of comments, the reading amount, and the like of the target article, and then the first parameter of the target article, including the title, the number of comments, the reading amount, and the like of the target article, may be obtained from the crawled data (i.e., codes).
In step 103, the first parameter is embedded into the background picture according to a preset display template to obtain a home page picture of the target article. Specifically, according to a background picture included in a preset display template and a typesetting rule of a first parameter, the first parameter is embedded into the background picture for display, and meanwhile, the background picture can be processed to a certain extent to obtain a home page picture of a target article.
The preset layout rule included in the display template may include: the display effect of the background picture, the display size of the background picture, the embedding position of the first parameter, the text format of the first parameter, the arrangement rule of the first parameter, and the like, which are not particularly limited herein. In an example, when the first parameter includes a title, a number of comments, and a reading amount of the target article, the first parameter may be embedded in the background picture in a manner as shown in fig. 3; in the home page picture shown in fig. 3, a region enclosed by a black bold solid line represents a background picture; in order to clearly display the first parameter, the display effect of the background picture is set to be fuzzy display; in order to provide a better reading experience, the display size of the background picture is set to be 80% of the size of the display page through zooming or cutting and the like (the area enclosed by the black thin solid line represents the display page, and the size of the display page can be the resolution of the page crawled by a crawler tool); the text format of the title "the legal story told by xxx" of the target article is a Song style 12 number character, the text format is embedded in the background picture centrally, and the text format of the number of comments (the number of comments 6352) and the reading amount (12635 reading) is the Song style 12 number character, and the text format is embedded in the position below the title; a preset decorative pattern or the like may be further embedded around the first parameter. It is to be understood that fig. 3 is only an illustration for convenience of understanding and does not constitute a limitation on the top page picture.
In step 104, a text picture of the target article is generated according to the preset display template and the text of the target article. Specifically, according to the typesetting rule of the text content included in the preset display template, the text or the pictures of the text part are sequentially displayed in a plurality of pictures to be used as the text pictures of the target article.
In step 105, the home page picture is displayed, and the text pictures are sequentially displayed. It can be understood that when a reader opens the app to read the target article, the first page picture of the target article is displayed firstly for the reader to know the title, comment number, reading amount and other relevant information of the target article, and then the text pictures of the target article are sequentially displayed for the reader to read the text of the target article in the form of pictures, so that the picture form is not easy to fatigue and novel and is beneficial to improving reading experience.
Compared with the prior art, the method includes the steps that a background picture of a target article is obtained; acquiring a first parameter of the target article according to a preset display template, wherein the first parameter at least comprises a title of the target article; embedding the first parameters into the background picture according to the preset display template to obtain a home page picture of the target article; generating a text picture of the target article according to the preset display template and the text of the target article; and displaying the home page picture, and displaying the text picture in sequence. Because the home page picture is generated according to the first parameter of the target article and the background picture, the first parameter at least comprises the title of the target article, and the title belongs to the related information of the target article, the displayed home page picture can clearly, prominently and beautifully display the related information of the target article; secondly, generating and sequentially displaying the text pictures according to the text of the target article, so that a reader can read the text of the target article in the form of pictures, and compared with the form of directly displaying all the contents of the article, the picture form provides a new reading mode and is easier to provide an immersive reading experience; the home page picture and the text picture are generated based on the preset display template, so that different display templates can be preset to generate pictures with different styles, namely, the article can have diversified display effects to attract the reading interest of readers; in summary, the embodiment of the application provides diversified reading modes, and the interest and reading experience of readers are effectively improved.
A second embodiment of the present application relates to an article display method, which is substantially the same as the first embodiment, and mainly differs from the first embodiment in that: specific implementations for generating text pictures are provided. The specific flow of the chapter display method in this embodiment is shown in fig. 4, and the following description specifically describes the flow of fig. 4.
Step 201, obtaining a background picture of a target article; this step is substantially the same as step 101, and is not described herein again.
Step 202, acquiring a first parameter of a target article according to a preset display template; this step is substantially the same as step 102 and will not be described herein.
Step 203, embedding the first parameter into a background picture according to a preset display template to obtain a home page picture of the target article; this step is substantially the same as step 103, and is not described herein again.
Step 204, sequentially acquiring natural paragraphs of the text; and typesetting the natural paragraphs according to a preset display template to obtain pictures corresponding to the natural paragraphs, wherein the pictures are used as the text pictures of the target article.
Specifically, when the text of the target article is to be typeset, the text is typeset in units of natural paragraphs of the text of the target article. The natural paragraphs may also be crawled by a web crawler tool, for example, 2 natural paragraphs "xxx 1 … …" and "xxx 2 … …" may be obtained when crawling the following data (i.e., codes):
<p>
“xxx1……”
</p>
<p>
“xxx2……”
</p>
wherein, the paragraph in the middle of "< p >" and "</p >" represents a natural paragraph of the text.
After the natural paragraphs are sequentially acquired, a new picture page can be created, the content of one acquired natural paragraph is filled into the new picture page according to a preset display template to obtain a picture corresponding to the acquired natural paragraph, then the new picture page is created, the content of the next acquired natural paragraph is filled into the new picture page according to the preset display template to obtain a picture … … corresponding to the next acquired natural paragraph, and so on, and the text pictures of a plurality of target articles are obtained. The preset layout rule included in the display template may include: the display effect, the display size, the text format, the arrangement rule, and the like of the characters of the natural paragraphs are not particularly limited herein.
It can be understood that the text pictures of the target article are arranged according to the sequence of the acquired natural paragraphs, so that the sequence and integrity of the natural paragraphs are not damaged, and the reader reads the text pictures according to the sequence of the natural paragraphs.
It should be noted that, when the acquired natural paragraph is a picture, the acquired picture can be directly and independently displayed as a text picture, that is, the text picture including the text and the text picture including the picture are separately and independently displayed. If the annotation of the picture is obtained by the crawler tool after the picture is obtained by the crawler tool, the annotation and the picture can be displayed in the same text picture as shown in fig. 5, wherein the area framed by the black thin solid line frame represents a display page, the area framed by the black thick solid line frame represents a separately displayed picture, and the crawled annotation of the picture is displayed below the picture.
More specifically, in order to provide a good reading experience, a displayable area is also preset in the preset display template; when the natural paragraphs are typeset according to the preset display template, the natural paragraphs are typeset in the displayable area; that is, the layout format of the generated text image is neat, and the content of the natural paragraph does not exceed the displayable area all the time.
The size of the displayable area can be set according to the resolution of the page displaying the target article; in an example, if the resolution of the acquired page is 750 × 1334, the width of the displayable region may be set to be about 80% of the page width, and the length of the displayable region is about 60% of the page length, so that the size of the displayable region is about 600 × 800, and the displayable region is located in the middle region of the page, as shown in fig. 6, where the region enclosed by the black thin solid line represents the page, and the region enclosed by the black thick solid line represents the displayable region.
More specifically, when typesetting the text included in the natural paragraph in the displayable region, the method includes steps 2041 to 2044 in one typesetting manner as shown in fig. 7:
step 2041, judging whether the characters included in the natural paragraph exceed the displayable area; if yes, go to step 2042, otherwise go to step 2044.
Specifically, whether the text included in the natural paragraph exceeds the displayable area may be determined in the following ways:
(1) calculating the pixel number of each arranged character according to the character display size, the text format, the arrangement rule and the like of a natural paragraph in a preset display template; calculating the number of characters which can be arranged in the displayable area according to the size of the displayable area and the number of pixels of each character, and comparing the number of characters included in the natural paragraph with the number of characters included in the natural paragraph to judge whether the characters included in the natural paragraph exceed the displayable area;
(2) in the second mode, according to the preset display template, simulating and arranging the characters included in the natural paragraphs in the displayable region, and checking whether the characters included in the natural paragraphs in the simulated and arranged result exceed the displayable region.
It should be understood that the above two ways are only examples, and there is no limitation on how to determine whether the text included in the natural paragraph exceeds the displayable region.
Step 2042, the natural paragraphs are split to obtain a plurality of split paragraphs.
Step 2043, arranging the characters included in each split paragraph in the displayable region according to the preset display template and the split paragraphs to obtain a picture corresponding to each split paragraph, which is used as a picture corresponding to the natural paragraph.
Specifically, because the characters included in the natural paragraph exceed the displayable region, the characters of the exceeding part are detached, the characters which do not exceed the displayable region part are reserved as a split paragraph, and a picture corresponding to the split paragraph is generated; the part of the characters which are split out is used as another split paragraph, and a picture corresponding to the other split paragraph is generated; it can be understood that, if the detached part of the text still exceeds the displayable region during the arrangement, the detachment is continued until the text of each detached paragraph does not exceed the displayable region; it can be understood that a plurality of split paragraphs are split from one natural paragraph, and therefore, the picture corresponding to each of the plurality of split paragraphs is taken as the picture corresponding to the one natural paragraph.
By means of the method for typesetting the natural paragraphs, when the characters included in the natural paragraphs exceed the displayable area, the contents included in the natural paragraphs are not arranged in the corresponding pictures in a crowded manner, and good reading experience is provided for readers.
Step 2044, arranging characters included in the natural paragraphs in the displayable region; and will not be described in detail herein.
In addition, if the first natural paragraph is obtained when the natural paragraphs of the text are sequentially obtained, the first natural paragraph is laid out through steps 301 to 302 shown in fig. 8.
Step 301, acquiring a second parameter of the target article according to a preset display template;
and 302, typesetting the second parameter and the first natural paragraph according to a preset display template.
Specifically, the preset display template may further include an item of a second parameter, where the item of the second parameter at least includes author information of the article, and may further include a publishing time of the article, and the like; the second parameters of the target article, including author information and release time of the target article, may also be obtained from data (i.e., code) crawled by the crawler tool.
The preset display template may further include a typesetting rule of a second parameter, for example: an embedding position of the second parameter, a text format of the second parameter, an arrangement rule of the second parameter, and the like, which are not particularly limited herein. In an example, when the second parameter includes author information, publishing time, and the like of the target article, the second parameter and the first natural paragraph may be typeset in a manner as shown in fig. 9; in another text picture shown in fig. 9, a circular area represents an author head portrait of a target article, the author head portrait and an author name are embedded in the head position of the text picture in a centered manner, the publishing time of the target article is embedded in a position below the author name, a first natural paragraph is arranged in a middle-lower position of the text picture, and an arrangement manner of characters included in the first natural paragraph is the same as an arrangement manner of characters included in the natural paragraph in the foregoing text picture, which is not described herein again.
Step 205, displaying the home page pictures and sequentially displaying the text pictures; this step is substantially the same as step 105, and is not described herein again.
Compared with the prior art, the embodiment sequentially acquires the natural paragraphs of the text; typesetting the natural paragraphs according to the preset display template to obtain pictures corresponding to the natural paragraphs, wherein the pictures are used as text pictures of the target article, the text pictures are arranged according to the sequence for obtaining the natural paragraphs, so that each text picture and the natural paragraphs of the text are in sequence one-to-one correspondence, the sequence and the integrity of the natural paragraphs are not damaged, and a reader also reads the text pictures according to the sequence; the natural paragraphs can also be typeset in the displayable area, and when the characters included in the natural paragraphs exceed the displayable area, the natural paragraphs are split and then typeset, so that the content of the target article is always displayed in the displayable area, the content included in the natural paragraphs is not arranged in the corresponding pictures too crowded, the generated picture typesetting format corresponding to the natural paragraphs is neat, and good reading experience is provided for readers.
A third embodiment of the present application relates to an article display method, which is substantially the same as the first embodiment, and mainly differs from the first embodiment in that:
the specific flow of the chapter display method in this embodiment is shown in fig. 10, and the flow of fig. 10 will be described in detail below.
Step 401, determining that a preset article display instruction is received, and acquiring a background picture of a target article.
Specifically, the preset article display instruction may be an interactive operation performed by the reader with an app interface (i.e., a screen of the terminal) after the app is opened, for example, double-clicking the screen, triple-clicking the screen, or clicking a button with a clear indication, and is not limited herein; after the preset article display instruction is judged to be received, the background image of the target article is acquired, that is, the article display method in the embodiment is executed, and the target article is converted into the image form to be displayed, so that a reader can select the article display mode according to the reading requirement of the reader, the display effect of the article can be finally matched with the preference of the reader, and the reading interest and the reading experience of the reader are also improved.
Step 402, determining a preset display template corresponding to the article display instruction according to the article display instruction; and acquiring a first parameter of the target article according to a preset display template.
Specifically, a corresponding relation between an article display instruction and a preset display template is preset; in an example, the preset display template may include: the display effect of the preset display template can be set according to the requirement; the corresponding relationship between the article display instruction and the preset display template may include: the method comprises the steps that a double-click screen corresponds to a vertical screen display template, a three-click screen corresponds to a horizontal screen display template, a preset button A on an app interface is clicked to correspond to a style A display template, a preset button B on the app interface is clicked to correspond to a style B display template and the like, and the corresponding relation between an article display instruction and the preset display template can be set according to requirements. By the method, the reader can select the article display mode according to the reading requirement of the reader.
Step 403, embedding the first parameter into the background picture according to a preset display template to obtain a home page picture of the target article; this step is substantially the same as step 103, and is not described herein again.
Step 404, generating a text picture of the target article according to a preset display template and the text of the target article; this step is substantially the same as step 104, and is not described herein again.
And 405, displaying the pictures of the home page according to the picture switching instruction, and sequentially displaying the text pictures.
Specifically, the article display instruction further includes a picture switching instruction; the picture switching instruction may include: the image switching method comprises a left-right sliding switching instruction, an up-down sliding switching instruction, a click page turning switching instruction and the like, wherein the image switching instruction can be set according to the requirement. For example, when the image switching instruction included in the received article display instruction is a click page turning switching instruction, the reader can switch the displayed home page image and the sequentially displayed text images in a screen click manner to read the target article. The image switching instruction also corresponds to the article display instruction, so that the reader can select the image switching mode according to the reading requirement of the reader, and the reading interest and the reading experience of the reader are improved.
Compared with the prior art, the target article is converted into the image form for display after the preset article display instruction is judged to be received, and the preset display template and the switching instruction of the image are obtained according to the article display instruction, so that a reader can select the image switching mode according to the reading requirement of the reader, and the reading interest and the reading experience of the reader are improved.
A fourth embodiment of the present application relates to an electronic apparatus, as shown in fig. 11, including: comprises at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501, so that the at least one processor 501 can execute the article display method.
The memory 502 and the processor 501 are coupled by a bus, which may comprise any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 501 and the memory 502 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other devices over a transmission medium. The data processed by the processor 501 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 501.
The processor 501 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 502 may be used to store data used by processor 501 in performing operations.
A fifth embodiment of the present application relates to a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the article display method embodiments described above.
That is, as those skilled in the art can understand, all or part of the steps in the method of the embodiments described above may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the present application, and that various changes in form and details may be made therein without departing from the spirit and scope of the present application in practice.

Claims (10)

1. An article display method, comprising:
acquiring a background picture of a target article;
acquiring a first parameter of the target article according to a preset display template, wherein the first parameter at least comprises a title of the target article;
embedding the first parameter into the background picture according to the preset display template to obtain a home page picture of the target article;
generating a text picture of the target article according to the preset display template and the text of the target article;
and displaying the home page pictures and sequentially displaying the text pictures.
2. The article display method according to claim 1, wherein before the obtaining the background picture of the target article, the method further comprises:
judging that a preset article display instruction is received;
before the obtaining of the first parameter of the target article according to the preset display template, the method further includes:
and determining a preset display template corresponding to the article display instruction according to the article display instruction.
3. The article display method according to claim 1, wherein the generating a text picture of the target article according to the preset display template and the text of the target article comprises:
sequentially acquiring natural paragraphs of the text;
and typesetting the natural paragraphs according to the preset display template to obtain pictures corresponding to the natural paragraphs, wherein the pictures are used as text pictures of the target article, and the text pictures are arranged according to the sequence of obtaining the natural paragraphs.
4. The article display method of claim 3, wherein the sequentially obtaining the natural paragraphs of the text comprises:
acquiring a first natural section of the text;
the typesetting of the natural paragraphs according to the preset display template comprises:
acquiring a second parameter of the target article according to the preset display template, wherein the second parameter at least comprises author information of the target article;
and typesetting the second parameter and the first natural paragraph according to the preset display template.
5. The article display method according to claim 3, wherein the preset display template includes a preset displayable region; the typesetting of the natural paragraph according to the preset display template to obtain the picture corresponding to the natural paragraph comprises:
and typesetting the natural paragraph in the displayable area according to the preset display template to obtain the picture corresponding to the natural paragraph.
6. The article displaying method according to claim 5, wherein when the natural paragraph includes a text, the typesetting is performed on the natural paragraph in the displayable region according to the preset display template to obtain a picture corresponding to the natural paragraph, and the method includes:
judging whether the characters included in the natural paragraph exceed the displayable area;
if so, splitting the natural paragraphs to obtain a plurality of split paragraphs;
arranging characters included by each split paragraph in the displayable region according to the preset display template and each split paragraph to obtain a picture corresponding to each split paragraph as a picture corresponding to the natural paragraph;
if not, typesetting the characters included in the natural paragraphs in the displayable area;
wherein the characters included in each of the split paragraphs do not exceed the displayable region.
7. The article display method of claim 1, wherein the obtaining a background picture of the target article comprises:
judging whether the target article comprises a picture or not;
if yes, acquiring a picture in the target article as a background picture;
if not, randomly acquiring a picture from a preset database as a background picture.
8. The article display method according to claim 2, wherein the article display instruction includes a picture switching instruction;
the displaying the home page picture and the text picture in sequence comprises:
and displaying the home page pictures according to the picture switching instruction, and sequentially displaying the text pictures.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the article display method of any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements an article display method according to any one of claims 1 to 8.
CN202010544673.9A 2020-06-15 2020-06-15 Article display method, electronic device and storage medium Pending CN111767488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010544673.9A CN111767488A (en) 2020-06-15 2020-06-15 Article display method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010544673.9A CN111767488A (en) 2020-06-15 2020-06-15 Article display method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN111767488A true CN111767488A (en) 2020-10-13

Family

ID=72721265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010544673.9A Pending CN111767488A (en) 2020-06-15 2020-06-15 Article display method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111767488A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297824A (en) * 2021-05-11 2021-08-24 北京字跳网络技术有限公司 Text display method and device, electronic equipment and storage medium
CN115828883A (en) * 2022-12-07 2023-03-21 广州文石信息科技有限公司 Document content re-typesetting method and device, electronic display equipment and medium
CN116092097A (en) * 2022-12-07 2023-05-09 广州文石信息科技有限公司 Method and device for typesetting image content, electronic display equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252444A (en) * 2013-06-27 2014-12-31 腾讯科技(北京)有限公司 Typesetting method, module and system for magazine application
CN110807126A (en) * 2018-08-01 2020-02-18 腾讯科技(深圳)有限公司 Method, device, storage medium and equipment for converting article into video
US20200175101A1 (en) * 2018-12-04 2020-06-04 Issuu, Inc. Systems and methods for generating social assets from electronic publications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252444A (en) * 2013-06-27 2014-12-31 腾讯科技(北京)有限公司 Typesetting method, module and system for magazine application
CN110807126A (en) * 2018-08-01 2020-02-18 腾讯科技(深圳)有限公司 Method, device, storage medium and equipment for converting article into video
US20200175101A1 (en) * 2018-12-04 2020-06-04 Issuu, Inc. Systems and methods for generating social assets from electronic publications

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297824A (en) * 2021-05-11 2021-08-24 北京字跳网络技术有限公司 Text display method and device, electronic equipment and storage medium
CN115828883A (en) * 2022-12-07 2023-03-21 广州文石信息科技有限公司 Document content re-typesetting method and device, electronic display equipment and medium
CN116092097A (en) * 2022-12-07 2023-05-09 广州文石信息科技有限公司 Method and device for typesetting image content, electronic display equipment and medium
CN116092097B (en) * 2022-12-07 2024-04-26 广州文石信息科技有限公司 Method and device for typesetting image content, electronic display equipment and medium
CN115828883B (en) * 2022-12-07 2024-05-28 广州文石信息科技有限公司 Document content rearrangement method and device, electronic display equipment and medium

Similar Documents

Publication Publication Date Title
CN111767488A (en) Article display method, electronic device and storage medium
US8819545B2 (en) Digital comic editor, method and non-transitory computer-readable medium
US8930814B2 (en) Digital comic editor, method and non-transitory computer-readable medium
CN109218750B (en) Video content retrieval method, device, storage medium and terminal equipment
US20030034991A1 (en) Method of constructing a composite image
CA2337758A1 (en) System and method for processing and displaying product information on a computer
JP2007256529A (en) Document image display device, information processor, document image display method, information processing method, document image display program, recording medium, and data structure
US8952989B2 (en) Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium
US20150121177A1 (en) Electronic device, method, and storage medium
US20110131529A1 (en) Information Processing Apparatus, Information Processing Method, Computer Program, and Information Processing Server
CN103384896A (en) Digital comic editing device and method therefor
CN106156189B (en) Label generation method and device, and information acquisition method and device
CN105760501A (en) Document format conversion method and device
US10558745B2 (en) Information processing apparatus and non-transitory computer readable medium
US9135234B1 (en) Collaborative generation of digital content with interactive reports
CN111159975A (en) Display method and device
CN112445400A (en) Visual graph creating method, device, terminal and computer readable storage medium
US9977794B2 (en) Management apparatus, design management method, and non-transitory computer readable medium
CN106951405B (en) Data processing method and device based on typesetting engine
US11929049B2 (en) Output content generation apparatus, output content generation method and program
CN103034468B (en) A kind of method and device showing text
KR101160973B1 (en) Effective Graphic Format image file forming method and device therefor
US20210073458A1 (en) Comic data display system, method, and program
CN111222065B (en) Information display method and device, electronic equipment and medium
CN114049467A (en) Display method, display device, display apparatus, storage medium, and program product

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