CN112270159B - Information insertion method, electronic device, and storage medium - Google Patents

Information insertion method, electronic device, and storage medium Download PDF

Info

Publication number
CN112270159B
CN112270159B CN202011170027.7A CN202011170027A CN112270159B CN 112270159 B CN112270159 B CN 112270159B CN 202011170027 A CN202011170027 A CN 202011170027A CN 112270159 B CN112270159 B CN 112270159B
Authority
CN
China
Prior art keywords
reading
information
chapter
page
user
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
CN202011170027.7A
Other languages
Chinese (zh)
Other versions
CN112270159A (en
Inventor
杨树彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN202011170027.7A priority Critical patent/CN112270159B/en
Publication of CN112270159A publication Critical patent/CN112270159A/en
Application granted granted Critical
Publication of CN112270159B publication Critical patent/CN112270159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/114Pagination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an information inserting method, electronic equipment and a storage medium, which are used for inserting information into a reading page of an electronic book, and the method comprises the following steps: step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n and information insertion configuration data of a reading page contained in the chapter; step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3; step S3, dynamically adjusting the display format of the chapter content of the chapter in sequence to update the page number n of the reading page contained in the chapter, and jumping to step S2; step S4, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter. The chapter content display format can meet the information insertion condition through dynamic adjustment in sequence, so that more information can be inserted for display.

Description

Information insertion method, electronic device, and storage medium
Technical Field
The invention relates to the field of software, in particular to an information insertion method, electronic equipment and a storage medium.
Background
When the electronic book is displayed, besides the content of each chapter in the electronic book, some other information can be displayed to the user at the same time. These information are typically inserted. The information is inserted into the reading page of each section in the electronic book, so that the normal display of the reading content in each section is not influenced.
In the prior art, when information is inserted into an electronic book, the information is generally inserted into chapters and displayed according to the number of pages of the chapters, for example, every few pages, but in actual application, because the number of pages of reading pages of each chapter in the electronic book is not fixed, it cannot be guaranteed that the number of pages of each chapter can be just inserted into the last page when the information is inserted, that is, the number of pages of each chapter cannot be guaranteed to be divided by all, and thus the information cannot be inserted into the last page of the chapter under the condition of non-dividing. And information needs to be inserted again according to the chapter from the next chapter, so that the page number of the last part of each chapter is wasted, and the opportunity that a large amount of information can be displayed in the whole electronic book is wasted.
Disclosure of Invention
In view of the above, the present invention has been made to provide an information insertion method, an electronic device, and a storage medium that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the present invention, there is provided an information inserting method for inserting information into a reading page of an electronic book, the method including:
step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n and information insertion configuration data of a reading page contained in the chapter;
step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3;
step S3, dynamically adjusting the display format of the chapter content of the chapter in sequence to update the page number n of the reading page contained in the chapter, and jumping to step S2;
step S4, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter.
According to another aspect of the present invention, there is provided an electronic apparatus including: the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the following operations:
step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n and information insertion configuration data of a reading page contained in the chapter;
step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3;
step S3, dynamically adjusting the display format of the chapter content of the chapter in sequence to update the page number n of the reading page contained in the chapter, and jumping to step S2;
step S4, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter.
According to another aspect of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to any one of the above-mentioned information insertion methods.
According to the information insertion method, the electronic equipment and the storage medium provided by the invention, the chapter content display format of the chapters of the electronic book is sequentially and dynamically adjusted, so that the page number of reading pages contained in the chapters is updated, and the information insertion is not limited by the page number of the chapters. The chapter content display format can meet the information insertion condition through sequential dynamic adjustment of the chapter content display format, so that more information can be inserted for display, the coverage rate of information display is increased, and the efficiency of information display is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow diagram of an information insertion method according to one embodiment of the invention;
FIG. 2 shows a flow diagram of an information insertion method according to another embodiment of the invention;
fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Example one
Fig. 1 shows a flow chart of an information insertion method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, receiving a reading request of a user to any chapter of the electronic book, and acquiring the page number n and information insertion configuration data of a reading page contained in the chapter.
The embodiment is used for inserting information into a reading page of an electronic book, and specifically, the information is inserted into a position which does not affect reading of a user, such as the tail of the reading page, and is displayed to the user. The user can browse the inserted information while reading the content of the page of each chapter in the electronic book. The information includes advertisement information, recommendation information and the like, so that the user can conveniently acquire the interested information while reading the electronic book.
The information insertion is configured by taking chapters as a unit, when a user reads any chapter in the electronic book, a reading request of the user for any chapter in the electronic book is received, the page number n of a reading page contained in the chapter is acquired, and meanwhile, the information insertion configuration data is acquired. The information insertion configuration data is configured in advance according to implementation conditions and is applicable to each chapter.
The prior art processes the chapter directly according to the number of pages and the information insertion configuration data, and inserts information into the chapter. The insertion of the information configures the chapter according to the information insertion configuration data. Specifically, the information insertion configuration data includes: the b-th page of the chapter reading page is set as a target reading page of the first inserted information, and then, each a-th page of the chapter reading page is set as a target reading page of the inserted information. n is the number of pages of the reading pages contained in each chapter, the number of pages of each chapter is related to the reading content of the chapter, and the number of pages of each chapter can be the same or different. Taking a as an example that a is 3 and b is 5, if the number of pages of the reading page included in the acquired chapter is 37, the first information is inserted into the 5 th page of the reading page of the chapter, and then, information is inserted every 3 pages, that is, the information is inserted into the 8 th, 11 th, 14 th, and 17 th pages … …, page 35. Page 36 and page 37 can no longer insert information. When the user reads the next chapter, the user will re-page the information according to the information insertion configuration data, resulting in wasted pages at pages 36 and 37, and thus reducing the chance of information insertion.
In view of the above problems, in the present embodiment, when a reading request of a user for any chapter is acquired, information insertion may not be performed first, and after the number n of pages of a reading page included in the chapter and information insertion configuration data are acquired, the number n is determined, and then information insertion is performed, so as to increase the opportunity of information insertion.
Step S102, judging whether the information inserting condition is satisfied according to the page number n and the information inserting configuration data.
According to the number n of pages and the information insertion configuration data, before information is inserted, the number of information which can be expected to be inserted in the chapter is calculated, namely the number of pre-inserted information is obtained, so that whether the information insertion condition is met or not is judged based on the number of pre-inserted information, and waste of the number of pages is reduced.
When the number of pieces of pre-insertion information is calculated, the number of pieces of pre-insertion information i, i ═ INT ((n-b)/a) +1 of information corresponding to the number of pages n is calculated by using a formula based on the number of pages n and information insertion arrangement data. And calculating to obtain the quantity of the pre-insertion information which is expected to be inserted into the chapters and corresponds to the page n by utilizing an INT rounding function. And judging whether the information insertion condition is met or not according to the number i of the pre-inserted information. Specifically, the information insertion condition may be satisfied, for example, by determining whether a (i-1) + b is equal to n. When a (i-1) + b is equal to n, it is described that the number of pages n of the chapter is n, information is inserted into the last page, the number of pages is not wasted, and the information insertion condition is satisfied, and the chapter can directly perform the information insertion process according to the information insertion configuration data, that is, when a (i-1) + b is determined to be n, step S104 is performed. If a (i-1) + b is not equal to n, it indicates that there is a wasted page number in the page number n and the information insertion condition is not satisfied, step S103 is executed to adjust and update the reading page included in the chapter. Specifically, if the number of pages is 37, the information insertion configuration data is described by taking a as 3 and b as 5 as examples, and i is INT ((37-5)/3) +1 is 11. According to the information insertion configuration data, the first information is inserted into page 5 of the chapter reading page, and thereafter, information is inserted every 3 pages, that is, information is inserted at pages 8, 11, 14, 17 … …, page 35, for a total of 11 information, and no information can be inserted at pages 36 and 37. Calculating that a (i-1) + b is 35, 35 is not equal to page number 37, chapters need to be adjusted, the page number is updated, and executing step S103; as an example, when the number of pages is 35 and the information insertion arrangement data is 3n +5, i ═ INT ((35-5)/3) +1 ═ 11. According to the information insertion configuration data, the first information is inserted into page 5 of the chapter reading page, and thereafter, information is inserted every 3 pages, that is, information is inserted at pages 8, 11, 14, 17, … …, page 35, for a total of 11 information. Calculating a (i-1) + b as 35, 35 equals the number of pages 35, step S104 can be performed directly.
Further, after step S103 is executed, it is necessary to determine again the number of pages n of the reading page included in the updated chapter, that is, after step S103 is executed to update the number of pages n of the reading page included in the chapter, step S102 is executed again. In order to distinguish whether the determination is made as to the number of pages of the reading page originally included in the chapter or as to the number of pages of the reading page included in the updated chapter, the determination may be divided into first execution and non-first execution. When the information is judged to be executed for the first time, the number i of pre-insertion information corresponding to the number n of pages is calculated by using a formula according to the number n of pages and the information insertion configuration data, wherein the number i is the number of first pre-insertion information at this time, and i is INT ((n-b)/a) + 1. And judging whether the information insertion condition is met or not based on the first pre-insertion information quantity i, wherein the judgment that the information insertion condition is met can be realized by judging whether a (i-1) + b is equal to n or not. And when the judgment is that the execution is not the first time, calculating the number j of the non-first pre-inserted information of the information corresponding to the number n by using a formula according to the number n of the reading pages contained in the updated chapters. INT ((n-b)/a) + 1. After the number j of non-first-time pre-inserted information is obtained, when it is determined whether the information insertion condition is satisfied, it may be determined whether a (j-1) + b is equal to n, and when it is determined that a (j-1) + b is equal to n, the last page, which indicates the number of pages of the updated chapter, is inserted with information, the number of pages is not wasted, and the information insertion condition is satisfied, at this time, the chapter may perform information insertion processing according to the information insertion configuration data, that is, when it is determined that a (j-1) + b is equal to n, step S104 is performed. And when judging that a (j-1) + b is not equal to n, indicating that wasted pages exist in the pages n and the information insertion condition is not met, executing the step S103 again, and adjusting and updating the reading pages contained in the chapters again. Specifically, when the original page number is 37, the information insertion arrangement data is exemplified by a being 3 and b being 5, and after step S103 is executed, the number of pages of the reading page of the updated chapter is 38, and j is INT ((38-5)/3) +1 is 12. Calculating a (j-1) + b as 38, 38 equals the updated number of pages 38, step S104 may be performed. Alternatively, when step S103 is executed, the number of pages of the reading page of the updated chapter is 39, and j equals INT ((39-5)/3) +1 equals 12. It is calculated that a (j-1) + b is 38, 38 is not equal to the updated page number 39, and it is necessary to perform step S103 to continue adjusting chapters.
However, if the chapter is adjusted multiple times, on one hand, the chapter is prone to multiple cycles and takes a long time, and a (j-1) + b ═ n may not be satisfied; on the other hand, when the adjustment is too large, the reading habit of the user is influenced. Based on the above problem, when determining whether the information insertion condition is satisfied, the determination may be performed by comparing the first pre-insertion information quantity i and the non-first pre-insertion information quantity j, specifically, determining whether a difference between j and i reaches a preset comparison threshold, where the preset comparison threshold may be set according to an implementation condition, and if the preset comparison threshold is set to 1, when the adjusted non-first pre-insertion information quantity is greater than the first pre-insertion information quantity by the preset comparison threshold, determining that the information insertion condition is satisfied, and performing step S104, otherwise, performing step S103. Specifically, when the original page number is 37, the information insertion configuration data is a 3, b is 5, and the preset comparison threshold is set to 1, the page number of the reading page of the updated chapter is 39 after step S103 is executed, and j is INT ((39-5)/3) +1 is 12. If j-i is equal to 1 and the difference between j and i reaches the preset comparison threshold 1, step S104 may be executed. In a specific implementation, an appropriate information insertion condition may be selected according to the implementation situation, for example, whether the information insertion condition is satisfied is determined as whether the determination a (j-1) + b is equal to n when not being executed for the first time, or whether the information insertion condition is satisfied is determined as whether the difference between j and i reaches a preset comparison threshold when not being executed for the first time, or whether the information insertion condition is satisfied is determined as whether the determination a (j-1) + b is equal to n or whether the difference between j and i reaches the preset comparison threshold when not being executed for the first time, and it is determined that the information insertion condition is satisfied when either one of the two is satisfied, which is not limited herein.
Step S103, dynamically adjusting the display format of the chapter content of the chapter in sequence to update the page number n of the reading page included in the chapter.
When the display format of the chapter content of the chapter is dynamically adjusted in sequence, specifically, the display format data of the character size, the character spacing, the line spacing and/or the page margin of the chapter can be dynamically adjusted to be larger in sequence. During dynamic adjustment, the display format data of the current character size, character spacing, line spacing and/or page margin of the chapter is dynamically increased. Taking the word size as an example, the current word size includes 10 and 12 when displayed in the chapters of the electronic book, the word size is correspondingly increased when dynamically adjusted to 11 and 13 respectively, because the word size is adjusted, the displayed content of the reading page corresponding to the chapters changes, and the page number n is correspondingly updated. And during adjustment, the chapter content display format of the chapter is adjusted based on the chapter without influencing the chapter content display formats of other chapters. The dynamic adjustment of the chapter content display format is carried out based on the current chapter content display format of chapters, the dynamic adjustment is carried out in sequence during adjustment, adjustment changes are not easy to be perceived by human eyes within a certain range, and the influence on the reading experience of a user due to adjustment is avoided.
When the chapter content display formats of the chapters are dynamically adjusted in sequence, only any one of the display format data in the character font size, the character spacing, the line spacing and/or the margin may be adjusted, or a plurality of display format data in the character font size, the character spacing, the line spacing and/or the margin may be adjusted at the same time, which is not limited herein.
After the page number n of the reading page included in the chapter is updated according to the enlarged chapter content, the step S102 is skipped to by using the page number n of the reading page included in the updated chapter, and whether the updated page number n meets the information insertion condition is continuously judged.
Further, if the step S103 is repeatedly executed, the chapters are dynamically adjusted in sequence according to the current chapter content display format (the adjusted chapter display format) during each execution, so as to ensure that the chapter is prevented from being excessively adjusted while the information insertion condition is satisfied.
And step S104, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter.
And when the information insertion condition is judged to be met, calculating and determining a target reading page of the chapter corresponding to the information insertion based on the number n of pages meeting the information insertion condition and the information insertion configuration data. Here, the target reading page is each page in which information is inserted determined based on the information insertion configuration data, and the information is inserted into the target reading page of the chapter.
According to the information insertion method provided by the invention, the chapter content display format of the chapters of the electronic book is sequentially and dynamically adjusted, so that the page number of the reading page contained in the chapters is updated, and the information insertion is not limited by the page number of the chapters. The chapter content display format can meet the information insertion condition through sequential dynamic adjustment of the chapter content display format, so that more information can be inserted for display, the coverage rate of information display is increased, and the efficiency of information display is improved.
Example two
Fig. 2 is a flowchart illustrating an information insertion method according to another embodiment of the present invention, as shown in fig. 2, the method includes the steps of:
step S201, receiving a reading request of a user for any chapter of the electronic book, and acquiring the number n of pages of a reading page and information insertion configuration data included in the chapter.
The information insertion is processed by taking chapters in the electronic book as units, and the information insertion is correspondingly performed according to the number of pages of reading pages contained in each chapter. When a reading request of a user for a chapter is received, acquiring the page number n of a reading page contained in the chapter and information insertion configuration data according to the reading request of the chapter, so as to perform corresponding information insertion processing on the chapter.
Step S202, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied.
The judgment is performed according to the number of pages n and the information insertion configuration data, and the specific judgment process refers to the description of step S102, which is not described herein again.
When it is judged that the information insertion condition is satisfied, step S206 is executed, otherwise, step S203 is executed.
Step S203, determine whether the chapter content display format of the electronic book is the preset display format.
When the electronic book is displayed to the user, a preset display format of the electronic book is generally adopted. When each electronic book is generated, the system for generating the electronic book presets a display format for the electronic book. The preset display format is an initial display format of the electronic book and is a display format which is not adjusted by a user. The preset display format of each electronic book is set by a system for generating the electronic book, and the preset display formats can be the same or different. If the user does not adjust the electronic book when browsing the electronic book, displaying the electronic book by using a preset display format; if the preset display format does not meet the browsing requirement of the user when the user browses the electronic book, the user can adjust the preset display format. And after the user adjusts the display format, recording the display format adjusted by the user, so that the user can conveniently display the electronic book for the user by directly adopting the display format adjusted by the user when browsing the electronic book again.
Further, when the user adjusts the display format of the electronic book, the adjusted display format may be applicable to the currently browsed electronic book, or may be applicable to all electronic books displayed by the current client of the user, for example, the user adjusts the APP of the electronic book, so that the display formats of all electronic books browsed by using the APP are displayed according to the display format adjusted by the user. And are not limited herein.
In this embodiment, before determining that the information insertion condition is not satisfied and the chapter content display format of the chapter is adjusted, it is further determined whether the chapter content display format of the electronic book is the preset display format, and if not, it indicates that the user has adjusted the display format of the electronic book according to the user 'S own needs, and at this time, to ensure the user' S reading experience, the chapter content display format is no longer adjusted, step S206 is executed, and information insertion is performed on the chapter. If the chapter content display format of the electronic book is judged to be the preset display format, the subsequent adjusting step can be executed.
Further, since the adjustment of the display format of the chapter content of the electronic book is performed based on the electronic book currently browsed by the user, when the adjustment is performed, it is specifically determined whether the display format of the chapter content of the electronic book currently browsed by the user is the preset display format or not, whether the display format of the chapter content of the electronic book currently browsed by the user has been adjusted or not, if not, it is indicated that the display format of the electronic book currently browsed by the user is adjusted according to the needs of the user, or the display formats of all the electronic books are adjusted by the user, at this time, in order to guarantee the reading experience of the user, the display format of the chapter content is not adjusted, and the step S206 is performed to insert information into the chapter. If the chapter content display format of the currently browsed electronic book by the user is judged to be the preset display format, if the user currently browses the electronic book A, the chapter content display format of the electronic book A is the preset display format, the user adjusts the chapter content display format of the electronic book B, at this time, the adjustment of the chapter content display format of the electronic book A does not affect the reading experience of the user on the electronic book A, and the subsequent adjustment steps can be executed.
Step S204, obtaining the historical reading information of the user, and judging whether the user is a deep reading user or not according to the historical reading information of the user.
And for the current user, obtaining the historical reading information of the user according to the user identification such as the user id, the user login name and the like. The historical reading information records reading information such as daily reading time length and reading amount of the user. According to the historical reading information of the user, whether the user is a deep reading user can be judged. Specifically, whether the daily reading time of the user is longer than a preset time and/or whether the daily reading amount is larger than a preset reading amount is judged. Here, the determination condition may be that when it is determined that the daily reading time of the user is longer than the preset time, or it is determined that the daily reading amount of the user is larger than the preset reading amount, or when it is determined that the daily reading time of the user is longer than the preset time and the daily reading amount of the user is larger than the preset reading amount. According to the specific implementation situation, the above one is selected as the judgment condition to judge whether the user is a deep reading user. If the historical reading information of the user meets the judgment condition, the user is judged to be a deep reading user, and if not, the user is judged to be a non-deep reading user.
For the deep reading user, in order to guarantee the reading experience of the user and avoid destroying the reading habit of the user, the chapter content display format is not adjusted any more, and step S206 is executed to insert information into the chapter. For non-deep reading users, a subsequent adjustment step is performed.
Further, when judging whether the user is a deep reading user, it can be further judged whether the user is a deep reading user of the currently browsed electronic book. Specifically, whether the daily reading time of the currently browsed electronic book by the user is longer than a preset time and/or whether the daily reading amount of the currently browsed electronic book by the user is larger than a preset reading amount is judged. When the user is judged to meet the judgment condition, the user is the deep reading user of the currently browsed electronic book, and the chapter content display format of the currently browsed electronic book is not adjusted any more to guarantee the reading experience of the user on the currently browsed electronic book. If the user is not the deep reading user currently browsing the electronic book, if the user currently browses the electronic book as a, but obtains historical reading information of the user, wherein the daily reading time of the user is based on the electronic book B, the daily reading amount is based on the electronic book B, the daily reading time of the user for a is not more than the preset time, the daily reading amount of the user for a is not more than the preset reading amount, and the user is not the deep reading user of a, step S205 can be executed, the chapter content display format of a is sequentially and dynamically adjusted, and the reading experience of the user for the electronic book a is not affected.
The sequence of execution of step S203 and step S204 is not limited, and may be set according to implementation. Further, step S203 and step S204 are optional steps, and one or more steps may be selected to be executed according to the implementation situation.
In step S205, the display format of the chapter content of the chapter is sequentially and dynamically adjusted to update the page number n of the reading page included in the chapter.
And for the chapters needing to be adjusted, dynamically adjusting the chapter content display formats of the chapters in sequence, and updating the page number n to meet the information insertion condition.
Step S206, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter.
And according to the page number and the information insertion configuration data, calculating to obtain a target reading page in which each piece of information in the chapters is inserted correspondingly so as to insert the information into the target reading page for display.
According to the information insertion method provided by the invention, the user is judged, and the chapter content display format of the chapters is not dynamically adjusted for the display format adjusted by the user or the deep reading user, so that the reading habit of the user is prevented from being influenced. For users who are not in the above conditions, when the users read chapters, the chapter content display format is sequentially and dynamically adjusted, so that the chapters can meet the information insertion condition, the information insertion is maximally matched with the number of pages contained in the chapters, the waste of the number of pages is avoided, and the information display opportunity is increased.
EXAMPLE III
The third embodiment of the present application provides a non-volatile computer storage medium, where the computer storage medium stores at least one executable instruction, and the computer executable instruction may execute the information insertion method in any of the above method embodiments.
The executable instructions may be specifically configured to cause the processor to: step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n and information insertion configuration data of a reading page contained in the chapter; step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3; step S3, dynamically adjusting the display format of the chapter content of the chapter in sequence to update the page number n of the reading page contained in the chapter, and jumping to step S2; step S4, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter.
In an alternative embodiment, the executable instructions further cause the processor to: and dynamically increasing the display format data of the character size, the character spacing, the line spacing and/or the page margin of the chapters in sequence, and updating the page number n of the reading page contained in the chapters according to the contents of the increased chapters.
In an alternative embodiment, the information insertion configuration data comprises: setting the page b of the chapter reading page as a target reading page of the first inserted information, and setting each page a of the chapter reading page as a target reading page of the inserted information;
for the first time, in step S2, the executable instructions further cause the processor to: according to the number of pages n and the information insertion configuration data, calculating the number i of the first pre-insertion information of the information corresponding to the number of pages n by using the following formula: INT ((n-b)/a) + 1; judging whether a (i-1) + b is equal to n; if yes, go to step S4; if not, go to step S3;
step S2 is a non-first time execution, the executable instructions further cause the processor to: according to the page number n of the reading page contained in the updated chapter, calculating the quantity j of the non-first pre-insertion information of the information corresponding to the page number n by using the following formula: INT ((n-b)/a) + 1; judging whether a (j-1) + b is equal to n or not, or whether the difference value of j and i reaches a preset comparison threshold value or not; if yes, go to step S4; if not, step S3 is executed.
In an alternative embodiment, the executable instructions further cause the processor to: judging whether the chapter content display format of the electronic book is a preset display format or not; if yes, go to step S3.
In an alternative embodiment, the executable instructions further cause the processor to: and judging whether the chapter content display format of the e-book currently browsed by the user is a preset display format.
In an alternative embodiment, the executable instructions further cause the processor to: acquiring historical reading information of a user; judging whether the user is a deep reading user or not according to the historical reading information of the user; if not, step S3 is executed.
In an alternative embodiment, the historical reading information comprises a daily reading duration and/or a daily reading amount; the executable instructions further cause the processor to: judging whether the daily reading time length is greater than a preset time length and/or whether the daily reading amount is greater than a preset reading amount; if yes, the user is judged to be a deep reading user.
In an alternative embodiment, the executable instructions further cause the processor to: judging whether the daily reading time of the currently browsed electronic book by the user is greater than the preset time and/or whether the daily reading amount of the currently browsed electronic book by the user is greater than the preset reading amount.
Example four
Fig. 3 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 3, the electronic device may include: a processor (processor)302, a communication Interface 304, a memory 306, and a communication bus 308.
Wherein:
the processor 302, communication interface 304, and memory 306 communicate with each other via a communication bus 308.
A communication interface 304 for communicating with network elements of other devices, such as clients or other servers.
The processor 302 is configured to execute the program 310, and may specifically perform the relevant steps in the above-described information insertion method embodiment.
In particular, program 310 may include program code comprising computer operating instructions.
The processor 302 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The server comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 306 for storing a program 310. Memory 306 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 310 may specifically be configured to cause the processor 302 to perform the following operations: step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n and information insertion configuration data of a reading page contained in the chapter; step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3; step S3, dynamically adjusting the display format of the chapter content of the chapter in sequence to update the page number n of the reading page contained in the chapter, and jumping to step S2; step S4, according to the information insertion configuration data, determining a target reading page of the chapter, and inserting the information into the target reading page of the chapter.
In an alternative embodiment, the program 310 is configured to enable the processor 302 to dynamically increase the display format data of the word size, word spacing, line spacing and/or margin of the chapter, and update the page number n of the reading page included in the chapter according to the content of the increased chapter.
In an alternative embodiment, the information insertion configuration data comprises: setting the page b of the chapter reading page as a target reading page of the first inserted information, and setting each page a of the chapter reading page as a target reading page of the inserted information;
step S2 is performed for the first time, and the program 310 is configured to cause the processor 302 to calculate, based on the number of pages n and the information insertion configuration data, a first pre-insertion information amount i of information corresponding to the number of pages n using the following formula: INT ((n-b)/a) + 1; judging whether a (i-1) + b is equal to n; if yes, go to step S4; if not, go to step S3;
step S2 is a non-first execution, and the program 310 is configured to enable the processor 302 to calculate the non-first pre-insertion information quantity j of the information corresponding to the page number n according to the page number n of the reading page included in the updated chapter by using the following formula: INT ((n-b)/a) + 1; judging whether a (j-1) + b is equal to n or not, or whether the difference value of j and i reaches a preset comparison threshold value or not; if yes, go to step S4; if not, step S3 is executed.
In an alternative embodiment, the program 310 is configured to enable the processor 302 to determine whether a chapter content display format of the electronic book is a preset display format; if yes, go to step S3.
In an alternative embodiment, the program 310 is configured to enable the processor 302 to determine whether a chapter content display format of an e-book currently browsed by a user is a preset display format.
In an alternative embodiment, the program 310 is configured to cause the processor 302 to obtain historical reading information of the user; judging whether the user is a deep reading user or not according to the historical reading information of the user; if not, step S3 is executed.
In an alternative embodiment, the historical reading information comprises a daily reading duration and/or a daily reading amount; the program 310 is configured to enable the processor 302 to determine whether the reading time length per day is greater than a preset time length and/or whether the reading amount per day is greater than a preset reading amount; if yes, the user is judged to be a deep reading user.
In an alternative embodiment, the program 310 is configured to enable the processor 302 to determine whether the daily reading time of the currently browsed electronic book by the user is greater than a preset time and/or whether the daily reading amount of the currently browsed electronic book by the user is greater than a preset reading amount.
For specific implementation of each step in the program 310, reference may be made to corresponding descriptions in corresponding steps in the above information insertion embodiment, which is not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
By the scheme provided by the embodiment, the chapter content display format of the chapters is sequentially and dynamically adjusted, so that the page number of the reading page contained in the chapters is updated, and the information insertion is not limited by the page number of the chapters any more. The chapter content display format can meet the information insertion condition through dynamic adjustment in sequence, so that more information can be inserted for display.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (17)

1. An information insertion method for inserting information into a reading page of an electronic book, the method comprising:
step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n of a reading page and information insertion configuration data contained in the chapter, wherein the information insertion configures the chapter according to the information insertion configuration data;
step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3;
step S3, the chapter content display format of the chapters is dynamically adjusted in sequence to update the page number n of the reading page contained in the chapters, and the step S2 is skipped, wherein the updated page number n is larger than the page number n before updating;
step S4, according to the information insertion configuration data, determining the target reading page of the chapter, and inserting information into the target reading page of the chapter.
2. The method according to claim 1, wherein the step S3 further comprises:
and dynamically increasing the display format data of the character word size, the word spacing, the line spacing and/or the page margin of the chapters in sequence, and updating the page number n of the reading page contained in the chapters according to the contents of the enlarged chapters.
3. The method of claim 1, wherein the information insertion configuration data comprises: setting the page b of the chapter reading page as a target reading page of the first inserted information, and setting each page a of the chapter reading page as a target reading page of the inserted information;
the step S2 is executed for the first time, and the step S2 further includes:
according to the number of pages n and the information insertion configuration data, calculating the number i of the first pre-insertion information of the information corresponding to the number of pages n by using the following formula:
i=INT((n-b)/a)+1;
judging whether a (i-1) + b is equal to n;
if yes, go to step S4; if not, go to step S3;
the step S2 is not performed for the first time, and the step S2 further includes:
according to the number n of the reading pages contained in the updated chapters, calculating the number j of the non-first pre-inserted information of the information corresponding to the number n by using the following formula:
j=INT((n-b)/a)+1;
judging whether a (j-1) + b is equal to n or not, or whether the difference value of j and i reaches a preset comparison threshold value or not;
if yes, go to step S4; if not, step S3 is executed.
4. The method according to any one of claims 1-3, wherein, prior to the step S3, the method further comprises:
judging whether the chapter content display format of the electronic book is a preset display format or not;
if yes, go to step S3.
5. The method of claim 4, wherein the determining whether the chapter content display format of the electronic book is a preset display format further comprises:
and judging whether the chapter content display format of the e-book currently browsed by the user is a preset display format.
6. The method according to any one of claims 1-3, wherein, prior to the step S3, the method further comprises:
acquiring historical reading information of a user;
judging whether the user is a deep reading user or not according to the historical reading information of the user;
if not, step S3 is executed.
7. The method of claim 6, wherein the historical reading information comprises a daily reading duration and/or a daily reading amount;
the judging whether the user is a deep reading user according to the historical reading information of the user further comprises:
judging whether the daily reading time length is greater than a preset time length and/or whether the daily reading amount is greater than a preset reading amount;
if yes, the user is judged to be a deep reading user.
8. The method of claim 7, wherein the determining whether the reading time duration per day is greater than a preset time duration and/or the reading amount per day is greater than a preset reading amount further comprises:
judging whether the daily reading time of the currently browsed electronic book by the user is greater than the preset time and/or whether the daily reading amount of the currently browsed electronic book by the user is greater than the preset reading amount.
9. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
step S1, receiving a reading request of a user for any chapter of the electronic book, and acquiring the page number n of a reading page and information insertion configuration data contained in the chapter, wherein the information insertion configures the chapter according to the information insertion configuration data;
step S2, according to the number of pages n and the information insertion configuration data, judging whether the information insertion condition is satisfied, if yes, executing step S4; if not, go to step S3;
step S3, the chapter content display format of the chapters is dynamically adjusted in sequence to update the page number n of the reading page contained in the chapters, and the step S2 is skipped, wherein the updated page number n is larger than the page number n before updating;
step S4, according to the information insertion configuration data, determining the target reading page of the chapter, and inserting information into the target reading page of the chapter.
10. The electronic device of claim 9, the executable instructions further cause the processor to:
and dynamically increasing the display format data of the character word size, the word spacing, the line spacing and/or the page margin of the chapters in sequence, and updating the page number n of the reading page contained in the chapters according to the contents of the enlarged chapters.
11. The electronic device of claim 9, the executable instructions further cause the processor to:
the information insertion configuration data includes: setting the page b of the chapter reading page as a target reading page of the first inserted information, and setting each page a of the chapter reading page as a target reading page of the inserted information;
the step S2 is executed for the first time, and calculates the first pre-insertion information quantity i of the information corresponding to the page number n according to the page number n and the information insertion configuration data by using the following formula:
i=INT((n-b)/a)+1;
judging whether a (i-1) + b is equal to n;
if yes, go to step S4; if not, go to step S3;
the step S2 is executed for the non-first time, and the non-first pre-insertion information quantity j of the information corresponding to the page number n is calculated by using the following formula according to the page number n of the reading page included in the updated chapter:
j=INT((n-b)/a)+1;
judging whether a (j-1) + b is equal to n or not, or whether the difference value of j and i reaches a preset comparison threshold value or not;
if yes, go to step S4; if not, step S3 is executed.
12. The electronic device of any of claims 9-11, the executable instructions further cause the processor to:
judging whether the chapter content display format of the electronic book is a preset display format or not;
if yes, go to step S3.
13. The electronic device of claim 12, the executable instructions further cause the processor to:
and judging whether the chapter content display format of the e-book currently browsed by the user is a preset display format.
14. The electronic device of any of claims 9-11, the executable instructions further cause the processor to:
acquiring historical reading information of a user;
judging whether the user is a deep reading user or not according to the historical reading information of the user;
if not, step S3 is executed.
15. The electronic device of claim 14, the executable instructions further cause the processor to:
the historical reading information comprises daily reading time length and/or daily reading amount;
judging whether the daily reading time length is greater than a preset time length and/or whether the daily reading amount is greater than a preset reading amount;
if yes, the user is judged to be a deep reading user.
16. The electronic device of claim 15, the executable instructions further cause the processor to:
judging whether the daily reading time of the currently browsed electronic book by the user is greater than the preset time and/or whether the daily reading amount of the currently browsed electronic book by the user is greater than the preset reading amount.
17. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the information insertion method according to any one of claims 1 to 8.
CN202011170027.7A 2020-10-28 2020-10-28 Information insertion method, electronic device, and storage medium Active CN112270159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011170027.7A CN112270159B (en) 2020-10-28 2020-10-28 Information insertion method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011170027.7A CN112270159B (en) 2020-10-28 2020-10-28 Information insertion method, electronic device, and storage medium

Publications (2)

Publication Number Publication Date
CN112270159A CN112270159A (en) 2021-01-26
CN112270159B true CN112270159B (en) 2021-11-16

Family

ID=74345181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011170027.7A Active CN112270159B (en) 2020-10-28 2020-10-28 Information insertion method, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN112270159B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113655934A (en) * 2021-08-30 2021-11-16 咪咕数字传媒有限公司 Electronic file display method and device, computing equipment and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763792A (en) * 2010-01-26 2010-06-30 汉王科技股份有限公司 Method and device for displaying advertisements in electronic reader
CN101819739A (en) * 2010-04-08 2010-09-01 福建天晴在线互动科技有限公司 Method for inserting advertisement in electronic book
CN101997928A (en) * 2010-11-25 2011-03-30 汉王科技股份有限公司 Advertisement inserting method and device for on-line reading
JP2011123786A (en) * 2009-12-14 2011-06-23 Sharp Corp Electronic book content generation device and electronic book content generation method
CN108122125A (en) * 2016-11-28 2018-06-05 宁波市镇海甬讯信息科技有限公司 A kind of method of product placement in e-books
CN111915348A (en) * 2020-07-08 2020-11-10 北京点众科技股份有限公司 Method, system and storage medium for inserting advertisement in electronic book

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10105548A (en) * 1996-09-26 1998-04-24 Hitachi Ltd Page control method
US20020188532A1 (en) * 2000-03-10 2002-12-12 Fish & Richardson Pc Advertising in electronic books
US20120011001A1 (en) * 2010-07-08 2012-01-12 Xerox Corporation System and method for embedded addressable content within text and graphics for digital media
CN102346730A (en) * 2010-07-30 2012-02-08 汉王科技股份有限公司 Method and device for displaying catalog in electronic reader
CN111159536B (en) * 2019-12-06 2024-02-20 上海连尚网络科技有限公司 Method and device for pushing presentation information in reading application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011123786A (en) * 2009-12-14 2011-06-23 Sharp Corp Electronic book content generation device and electronic book content generation method
CN101763792A (en) * 2010-01-26 2010-06-30 汉王科技股份有限公司 Method and device for displaying advertisements in electronic reader
CN101819739A (en) * 2010-04-08 2010-09-01 福建天晴在线互动科技有限公司 Method for inserting advertisement in electronic book
CN101997928A (en) * 2010-11-25 2011-03-30 汉王科技股份有限公司 Advertisement inserting method and device for on-line reading
CN108122125A (en) * 2016-11-28 2018-06-05 宁波市镇海甬讯信息科技有限公司 A kind of method of product placement in e-books
CN111915348A (en) * 2020-07-08 2020-11-10 北京点众科技股份有限公司 Method, system and storage medium for inserting advertisement in electronic book

Also Published As

Publication number Publication date
CN112270159A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN106649543B (en) Method, device and terminal for recording reading progress
US9032282B2 (en) Method and web content management system for A/B testing or multivariate testing of websites on computers being connected to a web content management system
CN109558559B (en) Bookshelf page display method, electronic equipment and computer storage medium
CN109241420B (en) Application home page content recommendation method and device, computer equipment and storage medium
US20130305144A1 (en) Method of Publishing Digital Content
US20070094591A1 (en) System and method for text legibility enhancement
CN105630524B (en) Web page text analytic method, device and mobile terminal
JP5717921B2 (en) System and method for recommending fonts
EP2977913A1 (en) Type setting method and apparatus
CN103501327B (en) Method for down loading and device based on mobile terminal application
CN105183890B (en) Webpage loading method based on browser and browser device
CN112270159B (en) Information insertion method, electronic device, and storage medium
WO2023273033A1 (en) Method for presenting book prompt information, and computing device and computer storage medium
CN113987387A (en) Page display method, electronic equipment and computer storage medium
CN111208957B (en) Payroll printing method
US20150199306A1 (en) Method and computer readable medium for controlling pagination of dynamic-length presentations
CN106648338B (en) Method and device for editing data
US20140304583A1 (en) Systems and Methods for Creating Web Pages Based on User Modification of Rich Internet Application Content
CN110188297B (en) Resource information display method, computing device and computer storage medium
CN114647786A (en) Book recommendation method, electronic device and storage medium
EP2431933A1 (en) Treatment controller
CN106156095B (en) Method and device for loading plug-ins in page
CN113127117A (en) Qt development framework-based interface paging display method, device, system and medium
CN112199056A (en) Data printing method, device and computer storage medium
CN114063958A (en) Page split-screen display method and device

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