CN112433796B - Electronic book simulation page turning method, electronic equipment and computer storage medium - Google Patents

Electronic book simulation page turning method, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN112433796B
CN112433796B CN202011322346.5A CN202011322346A CN112433796B CN 112433796 B CN112433796 B CN 112433796B CN 202011322346 A CN202011322346 A CN 202011322346A CN 112433796 B CN112433796 B CN 112433796B
Authority
CN
China
Prior art keywords
page
page turning
reference point
area
book
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
CN202011322346.5A
Other languages
Chinese (zh)
Other versions
CN112433796A (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.)
Ireader Technology Co Ltd
Original Assignee
Ireader 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 Ireader Technology Co Ltd filed Critical Ireader Technology Co Ltd
Priority to CN202011322346.5A priority Critical patent/CN112433796B/en
Publication of CN112433796A publication Critical patent/CN112433796A/en
Application granted granted Critical
Publication of CN112433796B publication Critical patent/CN112433796B/en
Priority to PCT/CN2021/124747 priority patent/WO2022105513A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/02Digital computers in general; Data processing equipment in general manually operated with input through keyboard and computation using a built-in program, e.g. pocket calculators
    • G06F15/025Digital computers in general; Data processing equipment in general manually operated with input through keyboard and computation using a built-in program, e.g. pocket calculators adapted to a specific application
    • G06F15/0291Digital computers in general; Data processing equipment in general manually operated with input through keyboard and computation using a built-in program, e.g. pocket calculators adapted to a specific application for reading, e.g. e-books
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor

Abstract

The invention discloses a simulation page turning method of an electronic book, electronic equipment and a computer storage medium, wherein the method comprises the following steps: responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction; determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point; and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books. The method renders the page turning state of the book presented through the curling process of the page of the book, and gives the user the page turning visual experience when reading the real paper book.

Description

Electronic book simulation page turning method, electronic equipment and computer storage medium
Technical Field
The invention relates to the field of computers, in particular to an electronic book simulation page turning method, electronic equipment and a computer storage medium.
Background
At present, with the increasing popularity of electronic devices, more and more users are used to read electronic books through electronic devices to replace traditional paper books. Due to the advantage of portability, the user can open the electronic book for reading at any time and any place.
In the conventional method, when a user performs a page turning operation through an electronic book, a conversion process of page contents is completed by means of page instant switching. However, the inventor finds that the page turning mode is more abrupt and cannot simulate the traditional paper reading page turning mode in the process of implementing the invention. For example, when a user reads a paper book, the page turning operation is usually performed by lifting a corner of the book page to make the book page appear in a curled state. Therefore, the page turning effect of a real paper book cannot be simulated by the existing electronic book page turning mode.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide a method, an electronic device, and a computer storage medium for simulated page turning of an electronic book that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method for simulating page turning of an electronic book, including:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
According to another aspect of the present invention, there is provided an electronic apparatus including: 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:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
According to yet 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 the processor to:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
In the simulation page turning method of the electronic book, the electronic device and the computer storage medium provided by the invention, the page turning action area contained in the book page can be automatically determined in the page turning process, so that the page turning change position corresponding to each image unit in the page turning action area when the book page is in a curled state along with a page turning instruction is calculated, the page turning state of the book presented through the curling process of the book page is further rendered, and the page turning visual experience when a user reads a real paper book is given.
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 is a flowchart illustrating a method for simulating page turning of an electronic book according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for simulating page turning of an electronic book according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of an electronic device according to another embodiment of the invention;
FIG. 4 is a schematic diagram illustrating a page turning state;
FIG. 5 is a schematic diagram illustrating yet another page turning state.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Fig. 1 shows a flowchart of a method for simulating page turning of an electronic book according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step S110: and responding to the received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction.
Specifically, the page flip instruction is usually triggered by a slide operation. The page turning reference points in the pages of the book are typically: and a position point on the page boundary line adjacent to the trigger position of the page turning instruction. For example, when the triggering position of the page turning instruction is located in the lower right corner area of the page of the book, the page turning reference point is the page vertex of the lower right corner of the page of the book. Correspondingly, the page initial position of the page turning reference point is the intersection point position between the right side boundary line and the lower side boundary line of the page of the book.
The position of the page turning reference point will be changed as the page turning operation is performed, and the changed position is referred to as a page turning change position. Correspondingly, the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and the direction of page turning operation, and further the page curling radius corresponding to the page turning instruction can be calculated. Wherein, the page curl radius refers to: and when the book page presents a curled state along with page turning operation, the radius of the cylindrical curved surface formed by the curled book page. The page curl radius is used to indicate the degree of curl of the pages of the book.
Step S120: and determining a page turning action area contained in the page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point.
Since the page turning operation is usually only used to lift one corner of the page of the book, the page area of the page of the book, which is affected by the page turning operation and appears in a curled state, is only a local area in the page of the book, and the local area is a page turning active area. The remaining page area that is not affected by the page turning operation and remains in the flat state (non-rolled state) is a non-page turning active area.
In order to simulate the true page turning curl state, it is necessary to first determine the above-mentioned page turning effect region so as to perform a curl conversion process with respect to the page turning effect region in a subsequent step. In specific implementation, the page turning action region included in the page of the book can be determined according to the page curl radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point obtained in the previous step, and a specific determination mode can be flexibly selected by a person skilled in the art and is not limited herein.
Step S130: and acquiring page initial positions of all image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
Specifically, when the page of the book shows a curled state, each image unit included in the page also shows a curled state, and therefore, it is necessary to calculate a page turning conversion position corresponding to each image unit after the curling conversion according to the page initial position of each image unit included in the page turning action region. The page initial position of each image unit is as follows: before the page turning operation is executed, each image unit is located at a position in a page of the book, and can be specifically represented by page coordinates; the page turning conversion position of the image unit is as follows: after the page turning operation is performed, the respective image elements assume changed positions according to the rolled state of the book page. In specific implementation, the page curl radius can reflect the curl degree of the page of the book, so that the page turning conversion position of each image unit can be calculated based on the page curl radius.
Therefore, the page turning transformation positions of the image units are calculated and displayed, and a page curling effect similar to that presented when a paper book is turned can be rendered, so that the simulated page turning processing of the book page is realized.
In the simulation page turning method of the electronic book, provided by the invention, the page turning action area contained in the page of the book can be automatically determined in the page turning process, so that the page turning transformation position corresponding to each image unit in the page turning action area when the page of the book shows a curled state along with a page turning instruction is calculated, the page turning state of the book shown by the curled process of the page of the book is further rendered, and the page turning visual experience when a user reads a real paper book is given.
Example two
Fig. 2 is a flowchart illustrating a method for simulating page turning of an electronic book according to another embodiment of the present invention. As shown in fig. 2, the method comprises the steps of:
step S210: and responding to the received page turning instruction, and acquiring displacement variation quantity between the page turning conversion position of the page turning reference point in the page of the book and the page initial position of the page turning reference point.
Specifically, the page turning instruction in this embodiment is a sliding-type page turning instruction. The page turning reference points in the pages of the book are typically: and a position point on the page boundary line adjacent to the trigger position of the page turning instruction. Fig. 4 is a schematic diagram illustrating a page turning state, as shown in fig. 4, a triggering position of a page turning instruction is located in a lower right corner region of a page of a book, and accordingly, a page turning reference point in the page of the book is a page vertex in the lower right corner of the page of the book. The page initial position of the page turning reference point is the intersection point position between the right side boundary line and the lower side boundary line of the page of the book, i.e. point F in fig. 4.
The position of the page turning reference point will be changed as the page turning operation is performed, and the changed position is referred to as a page turning change position. For example, point a in fig. 4 corresponds to the page flip transition location of the page flip reference point. Accordingly, the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and the direction of the page turning operation. The displacement variation may be determined by the length and slope of the line segment AF.
Specifically, when the displacement variation quantity between the page turning conversion position of the page turning reference point in the page of the book and the page initial position of the page turning reference point is obtained, the method is realized in the following mode: firstly, the sliding direction and/or the sliding length of a sliding page turning instruction are/is obtained. The sliding direction and/or the sliding length of the sliding-type page turning instruction are/is used for representing the sliding displacement of the sliding-type page turning instruction, and the sliding displacement depends on factors such as the duration and the sliding speed of the sliding operation. And then, according to the sliding direction and/or the sliding length, determining the displacement direction and/or the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point. The displacement direction of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point is matched with the sliding direction of the sliding type page turning instruction, and the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point and the sliding length of the sliding type page turning instruction have a preset proportional relation.
Step S220: and calculating the page curling radius corresponding to the page turning instruction.
The displacement variable quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and the direction of page turning operation, so that the page curling radius corresponding to the page turning instruction can be calculated. Wherein, the page curl radius refers to: and when the book page presents a curled state along with page turning operation, the radius of the cylindrical curved surface formed by the curled book page. The page curl radius is used to indicate the degree of curl of the pages of the book.
In specific implementation, the page curl radius is calculated mainly according to the displacement variation and the circle radius formula. The inventor finds that when the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is too small in the process of realizing the invention, the page turning effect is hard to perceive; when the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is too large, the page turning amplitude is too large, and the normal reading of a user is influenced. In order to solve the above problem, in this embodiment, a lower threshold and an upper threshold are preset, and if a displacement variation between a page turning conversion position of the page turning reference point and a page initial position of the page turning reference point is smaller than a preset lower threshold, a page curl radius corresponding to the page turning instruction is determined to be a preset lower limit, where the preset lower limit is a preset minimum radius. And if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit value, wherein the preset upper limit value is a preset maximum radius. And if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between a preset lower limit threshold value and a preset upper limit threshold value, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula. The circle radius formula is used for limiting the relative relation between the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point and the page curling radius. In general, a ratio between a displacement variation amount of the page turning change position of the page turning reference point relative to the page initial position of the page turning reference point and the page curl radius has a preset rule, and may be a preset constant, for example.
Step S230: and determining a page turning action area contained in the page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point.
Since the page turning operation is usually only used to lift one corner of the page of the book, the page area of the page of the book, which is affected by the page turning operation and appears in a curled state, is only a local area in the page of the book, and the local area is a page turning active area. The remaining page area that is not affected by the page turning operation and remains in the flat state (non-rolled state) is a non-page turning active area. In order to simulate the true page turning curl state, it is necessary to first determine the above-mentioned page turning effect region so as to perform a curl conversion process with respect to the page turning effect region in a subsequent step.
In specific implementation, when determining the page turning action area contained in the book page according to the page curl radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point, the method is realized by the following steps: firstly, determining a reference straight line passing through a page initial position of a page turning reference point and a page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to a page curling radius; and then, determining a page turning action area contained in the page of the book according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
The reference straight line passing through the page initial position of the page turning reference point and the page turning change position of the page turning reference point is the straight line defined by the point a and the point F in fig. 4. When the target point on the reference straight line is determined according to the page curl radius, the specific position of the target point on the reference straight line is mainly determined according to the size of the page curl radius. The target point in fig. 4 is the point P. Accordingly, a boundary straight line passing through the target point and perpendicular to the reference straight line is a straight line defined by the point C and the point J in fig. 4. The boundary straight line is used for dividing a page turning active area and a non-page turning active area contained in a page of the book. For example, the lower left region of the boundary straight line corresponds to the page flip action region, and the image unit included in the partial region is subjected to the curl transformation; and the upper right area of the boundary line corresponds to the non-page-turning action area, and the image unit contained in the partial area does not have curling transformation. Therefore, the boundary straight line which passes through the target point and is perpendicular to the reference straight line can be drawn through the target point which is defined by the length of the page curl radius and is positioned on the reference straight line, and the page turning action area can be quickly determined through the boundary straight line. As shown in fig. 4, a first intersection point between the boundary line and the first page boundary line is a point C, and a second intersection point between the boundary line and the second page boundary line is a point J, and the page turning action region can be more accurately defined by the point C and the point J.
In fact, when the page curl radius is small, the page turning conversion position of the page turning reference point may be between the page initial position of the page turning reference point and the target point. In summary, the present invention does not define the specific location of the target point on the reference line.
For example, in the first case, the page curl radius is greater than the preset value, which indicates that the slide displacement corresponding to the page turning instruction is larger at this time, and the target point is between the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point. As shown in fig. 4, the target point P is located between the point a and the point F. Correspondingly, when the page turning active region contained in the book page is determined, the first sub-region which is not subjected to the curling transformation and contained in the page turning active region and the second sub-region which is subjected to the curling transformation are determined according to the target point. The first sub-area where no curl transformation occurs corresponds to a back area of the page of the book, for example, an area formed by a point A, B, K in fig. 4 is the first sub-area, the first sub-area is used for showing the back area of the book after page turning, and the back area does not have a curl transformation. The second sub-area where the curl transformation occurs includes a front area and a back area of the pages of the book.
Specifically, when a first sub-area which is not subjected to the curl transformation and is included in the page turning active area and a second sub-area which is subjected to the curl transformation are determined according to the target point, the method is implemented by the following steps:
firstly, determining a target mapping point which is positioned on a reference straight line and corresponds to a target point; and the interval between the target mapping point and the page initial position of the page turning reference point is matched with the interval between the target point and the page turning conversion position of the page turning reference point. Specifically, the target mapping point may be determined by: first, a reference line segment formed by the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, i.e., the line segment AF in fig. 4 is drawn, then, the midpoint of the line segment AF is determined as the point G, and accordingly, the distance between the target mapping point O and the target point P to the midpoint G is equal. It can be seen that the interval between the page initial positions OF the target mapping point and the page turning reference point (i.e., the length OF the line segment OF) is equal to the interval between the page turning transition positions OF the target point and the page turning reference point (i.e., the length OF the line segment AP).
Then, determining a first critical point (i.e., point B1) located at a first page boundary line of the pages of the book and a second critical point (i.e., point K1) located at a second page boundary line of the pages of the book according to a boundary mapping straight line passing through the target mapping point and perpendicular to the reference straight line; the first page boundary line is perpendicular to the second page boundary line, and the page initial position of the page turning reference point is located at the intersection point of the first page boundary line and the second page boundary line. Among them, the boundary mapping straight line passing through the target mapping point and perpendicular to the reference straight line is the straight line determined by the point B1 and the point K1 in fig. 4.
And finally, determining a triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point, and determining a first sub-area without crimp conversion and a second sub-area with crimp conversion according to the triangular area and a mapping area corresponding to the triangular area. The triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point is the area formed by the points B1, K1 and F. Accordingly, the mapping region corresponding to the triangular region is the region formed by the points B, K and a. The point B corresponds to the curled page turning position of the point B1, and the point K corresponds to the curled page turning position of the point K1. It can be seen that the mapping region is a corresponding mapping region after being inverted from the triangular region, and the mapping region corresponds to the back of the triangular region.
Specifically, when determining the first sub-region where no warping transformation has occurred and the second sub-region where warping transformation has occurred from the triangular region and the mapping region corresponding to the triangular region, first, the triangular region and the mapping region corresponding thereto are determined as the first sub-region where warping transformation has not occurred, and the remaining region corresponds to the second sub-region where warping transformation has occurred.
Step S240: and acquiring page initial positions of all image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
Specifically, when the page of the book shows a curled state, each image unit included in the page also shows a curled state, and therefore, it is necessary to calculate a page turning conversion position corresponding to each image unit after the curling conversion according to the page initial position of each image unit included in the page turning action region. The page initial position of each image unit is as follows: before the page turning operation is executed, each image unit is located at a position in a page of the book, and can be specifically represented by page coordinates; the page turning conversion position of the image unit is as follows: after the page turning operation is performed, the respective image elements assume changed positions according to the rolled state of the book page. In specific implementation, the page curl radius can reflect the curl degree of the page of the book, so that the page turning conversion position of each image unit can be calculated based on the page curl radius. Therefore, the page turning transformation positions of the image units are calculated and displayed, and a page curling effect similar to that presented when a paper book is turned can be rendered, so that the simulated page turning processing of the book page is realized.
In specific implementation, the page initial position of each image unit contained in the page turning action region is obtained, and when the page turning change position of each image unit is calculated and displayed by combining the page curling radius, the page turning change position of each image unit in the first sub-region is determined according to the mapping relation aiming at the first sub-region in fig. 4; and for the second sub-area, determining the page turning transformation position of each image unit in the second sub-area according to a cylindrical equation determined by the page curling radius.
Each image unit included in the page turning region is also called a page image unit, and refers to a page image component of a page of a book, and for example, the image unit may be an image pixel. According to the initial page position of each image pixel point in the original book page, the page turning transformation position corresponding to the image pixel point after the image pixel point is subjected to curling transformation can be calculated by combining the page curling radius.
Since the first sub-area is not subjected to the curl transformation, but the triangular area formed by three points B1K1F is mapped into the mapping area formed by three points BKA by the mapping method, the page-turning transformation position of each image unit in the first sub-area is determined according to the mapping relation. In addition, considering that the first sub-area corresponds to the back area of the page of the book, it is necessary to first acquire the mapping image unit in the back area corresponding to each image unit in the first sub-area, and then map the mapping image unit in the back area corresponding to each image unit to the corresponding page turning transformation position. The back area corresponding to each image unit is as follows: and the area, which is positioned at the same coordinate position with the image unit, in the back page corresponding to the currently displayed book page. For example, for a certain image unit located in the lower right corner area of the page 5, the corresponding mapped image unit in the back surface area is the image unit located in the lower left corner of the page 6. Namely: the mapping image unit in the back area corresponding to a certain image unit refers to: and turning the page to obtain the image unit at the same position on the back of the image unit.
Different from the first sub-region, the image pixels in the second sub-region are subjected to curling transformation, so that the page turning transformation positions of the image units in the second sub-region are determined according to a cylindrical equation determined by the curling radius of the page for each image pixel in the second sub-region. For example, points E and H in fig. 4 are the auxiliary calculation points involved in the calculation process, and the line segment EH is the perpendicular bisector of the line segment AF. In addition, point D1 in fig. 4 is the midpoint of line segment CB1, and point I1 is the midpoint of line segment JK 1. Correspondingly, the point D is the page turning change position corresponding to the point D1, and the point I is the page turning change position corresponding to the point I1. Point M corresponds to the page flip transition position corresponding to the midpoint of segment B1D1, and point N corresponds to the page flip transition position corresponding to the midpoint of segment K1I 1. In specific implementation, aiming at a specific image pixel point, firstly judging whether the image pixel point is positioned in a first subregion or a second subregion, and if the image pixel point is positioned in the first subregion, determining a page turning transformation position corresponding to the page initial position of the image pixel point according to a mapping mode; and if the image pixel point is located in the second sub-area, substituting the initial page position of the image pixel point into a cylindrical equation determined by the page curling radius, and determining a page turning conversion position corresponding to the image pixel point according to a calculation result. For example, substituting the page initial position of point D1 into the cylinder equation yields the position of point D.
In addition, as mentioned above, the second sub-region includes both the front region and the back region of the original book page, and for this reason, in the above process, it is necessary to distinguish the second front sub-region corresponding to the front region and the second back sub-region corresponding to the back region included in the second sub-region. In order to divide the second front sub-region and the second rear sub-region, it is necessary to divide the regions according to points D1 and I1 in fig. 4.
Specifically, the second front sub-region and the second back sub-region are divided as follows: firstly, drawing a boundary straight line which passes through a target point P and is perpendicular to a reference straight line, and determining a first intersection point C between the boundary straight line and a first page boundary line and a second intersection point J between the boundary straight line and a second page boundary line; then, a first midpoint D1 between the first intersection point C and the first critical point B1 and a second midpoint I1 between the second intersection point J and the second critical point K1 are determined, and the second front sub-region (the region composed of the points C, D1, I1, J) and the second back sub-region (the region composed of the points D1, B1, K1, I1) are determined from the first midpoint D1 and the second midpoint I1. Correspondingly, for each image pixel point in the second back sub-area, a mapping image unit in the back area corresponding to each image unit in the second back sub-area needs to be acquired first, and then the mapping image unit in the back area corresponding to each image unit is mapped to the corresponding page turning conversion position.
Fig. 4 corresponds to the case that the page curl radius is larger, and fig. 5 further shows a schematic diagram of the page curl effect when the page curl radius is smaller. As shown in fig. 5, if the page curl radius is not greater than the preset value, the page turning conversion position of the page turning reference point is between the page initial position of the page turning reference point and the target point. For example, the target point P in fig. 5 is located on the extension of the line segment AF. Of course, the target point P and the page turning conversion position a of the page turning reference point may coincide with each other. However, whether the target point P is located on the extension line of the line AF or the page turning conversion position a of the target point P and the page turning reference point coincide with each other, the page turning action region cannot be divided into the first sub-region and the second sub-region, but only includes an integral region. At the moment, when the page initial position of each image unit contained in the page turning action area is obtained, and the page turning conversion position of each image unit is calculated and displayed by combining the page curling radius, the page turning conversion position of each image unit in the page turning action area is directly determined according to a cylindrical equation determined by the page curling radius.
In addition, as shown in fig. 5, when the target point P is located on the extension line of the line segment AF or the page turning transformation position a of the target point P and the page turning reference point coincide with each other, the page turning active area may still be divided into a front active area corresponding to the front content of the book page and a back active area corresponding to the back content of the book page. It can be seen that regardless of the position of the target point, the page turning active region can be divided into a front active region corresponding to the front content of the page of the book (e.g., the second front sub-region in fig. 4) and a back active region corresponding to the back content of the page of the book (e.g., the triangular region and the second back sub-region in fig. 4 can be collectively referred to as the back active region). For the back acting area corresponding to the back content of the book page, mapping image units in the back area corresponding to the image units in the back acting area need to be acquired, and then mapping the mapping image units in the back area corresponding to the image units to the corresponding page turning conversion positions.
In addition, it should be further noted that, in this embodiment, the sliding-type page turning instruction is usually triggered continuously, for example, the user slides for a certain time length along a preset direction to trigger the sliding-type page turning instruction. Correspondingly, in the triggering process of the sliding page turning instruction, the current sliding direction and the sliding length are continuously detected, the page turning conversion position of the page turning reference point is dynamically calculated according to the current real-time detection result, and the page curling radius and the page turning conversion position of each image unit in the page turning action area are dynamically calculated according to the calculated page turning conversion position of the page turning reference point. That is, in the process of continuously turning pages, the area range of the page turning active area and the corresponding page curl radius are dynamically changed. For example, it is possible that in the initial stage of page turning, the page assumes the state shown in fig. 5, and as the page turning instruction continues to run, the page assumes the state shown in fig. 4, so in this embodiment, it is necessary to dynamically perform multiple calculation processes in order to present the page states corresponding to the respective page turning stages in real time.
In summary, the simulated page turning method in the embodiment can enable the pages of the book to present a natural curling effect along with the page turning operation. In addition, in the process of page turning and curling, each image unit on the curled page is also changed, so that a real deformation state is presented. For example, the words "honored" in FIG. 4 show the effect of curling. Therefore, the page turning state of the real paper book can be simulated, and the content displayed on the part of the page of the electronic book in the page turning process is consistent with the content corresponding to the page turning process of the paper book.
In addition, various modifications and changes may be made to the above embodiments by those skilled in the art:
specifically, in step S210, when a page turning instruction triggered for a book page containing a preset picture element is detected, a picture drawing interface is called to execute the subsequent steps. The book page containing the preset picture elements refers to: the page content includes content such as a dynamic picture or a picture element for linking to a video resource. For example, dynamic video resources are inserted into an electronic book in a manner of picture linking and the like, so that a user can conveniently acquire information in forms of pictures or videos and the like in the process of reading the electronic book, and the book reading efficiency is further improved. Specifically, the page flip instruction is usually triggered by a slide operation. Correspondingly, when a page turning instruction triggered by sliding operation is detected, the picture drawing interface is called to realize subsequent page turning drawing operation. Wherein, the picture drawing interface means: the interface is specially used for realizing the picture drawing function. For example, in the android system, the drawing function can be realized through an interface provided by the android system. For another example, in the ios system, the interface with drawing function can be realized through custom development. The interface logic of the picture drawing interface can be flexibly adjusted according to actual business requirements, so that the picture drawing interface is particularly suitable for page turning drawing processing of complex book pages containing pictures. In the process of implementing the present invention, the inventor finds that drawing processing is mostly implemented in an OpenGL manner in the conventional manner, but the OpenGL manner has the following limitations: it cannot be applied to the processing of book pages containing pictures. That is, the OpenGL rendering method can only be applied to the conventional rendering process of a book page containing characters, but cannot be applied when the book page contains a picture or a picture link for linking to a video resource. Therefore, in order to solve the above problems, when a page turning instruction is detected, page description information of a book page corresponding to the page turning instruction is further acquired, whether a preset picture element is included in the book page is judged according to the page description information of the book page, and if so, the picture drawing interface is called to realize page turning drawing processing; if not, whether the processing is carried out in a conventional OpenGL drawing mode or not can be flexibly selected. The preset picture elements are used for displaying dynamic picture resources, namely video resources or dynamic picture resources. The preset picture elements are inserted into the page, so that the video content can be played in the reading process of the electronic book, and the information acquisition efficiency of a user is improved. Specifically, when judging whether the book page contains the preset picture element according to the page description information of the book page, the method can be realized by analyzing the page source code corresponding to the book page and judging whether the page source code contains the source code identifier matched with the preset picture element. Accordingly, in step S220 and step S230, the page turning action region corresponding to the page turning instruction included in the page of the book is determined through the picture drawing interface. Specifically, when determining the page turning action region, calculation processing is required, and in order to reduce the calculation amount, in this embodiment, the number of image units to be calculated is reduced by a sampling manner, so that the calculation efficiency is improved. Specifically, sampling processing is performed on image units (namely page image units) contained in a book page through a picture drawing interface to obtain sampling units contained in the book page; and determining a page turning action area corresponding to the page turning instruction and contained in the page of the book according to the sampling unit contained in the page of the book. The image units can be image information in the form of image pixel points and the like, and sampling is used for reducing the number of the image units so as to reduce the calculation amount. In specific implementation, a page area of a book page is divided into a plurality of area grids through a picture drawing interface, and sampling processing is respectively carried out on image units contained in each area grid to obtain a sampling unit set corresponding to each area grid; correspondingly, the area grids belonging to the page turning action area are determined according to the sampling unit sets corresponding to the area grids. For example, the size of each area grid is set in advance, and accordingly, each area grid is divided according to the corresponding size, so that the page area of the whole book page is divided into a plurality of area grids which are arranged in sequence. Specifically, when the sampling processing is performed on each area grid, a plurality of image units in the area grid may be extracted according to a preset sampling ratio, where the extracted image units are also called sampling units, and accordingly, the extracted image units together form a sampling unit set corresponding to the area grid. Correspondingly, in step S240, the page turning conversion positions of each page image unit and each shadow element included in the page turning action region are calculated through the picture drawing interface, and the calculated page turning conversion positions of each page image unit and each shadow element are rendered, so as to implement the simulated page turning processing of the book page. In specific implementation, the page initial position of each image unit contained in a sampling unit set corresponding to an area grid belonging to a page turning action area is obtained through a picture drawing interface; and calculating and displaying the page turning transformation positions of the image units contained in the sampling unit set according to the page initial positions of the image units contained in the sampling unit set so as to realize the simulated page turning processing of the page of the book. Therefore, according to the embodiment, through sampling processing, calculation does not need to be performed on all image units in the area grid one by one, and only needs to be performed on each image unit in the sampling unit set included in the area grid, so that the calculation amount is greatly reduced. In addition, other image units not included in the sampling unit set may be filled by an edge-rendering algorithm, a smoothing algorithm, a scaling algorithm, or the like.
In addition, other modifications and variations to the above-described embodiments may occur to those skilled in the art: in the step S210, in response to the received page turning instruction, a shadow element is added to the original book page to be turned, so as to obtain a page-turned book page containing the shadow element. The shadow elements may be various types of elements such as shadow pictures as long as the shadow effect can be achieved. After the shadow elements are added, the page not only contains the original page content, but also further contains the added shadow elements, and for convenience of description, the original book page after the shadow elements are added is called a flipbook page. For example, the shadow elements are semi-transparent picture-like elements. In specific implementation, a page boundary line contained in an original book page to be turned is determined, and a shadow element is added in an external area of the original book page along the page boundary line. Wherein the inner area of the original book page corresponds to the content part of the book page and correspondingly the outer area of the original book page corresponds to an area other than the content part of the book page, whereby it can be seen that the outer area of the original book page is in fact an area not visible to the reading user, which is located outside the book page. Since the shadow elements are added to the outer area of the original book page, the normal reading of the book is not affected. In addition, the page boundary line means: and the boundary line is positioned at the edge of the page of the book. Generally, one page of the book includes four page boundary lines, in this embodiment, a shadow element may be added only to an outer region corresponding to at least one page boundary line, and details of implementation are not limited. In order to ensure that the position of the added shadow element is matched with the page turning position of a user, when a page boundary line contained in an original book page to be turned is determined and the shadow element is added in an outer area of the original book page along the page boundary line, the method is realized by the following steps: firstly, acquiring a touch position corresponding to a page turning instruction, and determining a first page boundary line and/or a second page boundary line adjacent to the touch position; then, adding a first shadow element in the outer area of the original book page along the boundary line of the first page; and/or adding a second shadow element to an outer region of the original book page along a second page boundary line. Wherein the first page boundary line may be orthogonal to the second page boundary line. Therefore, the shadow elements can be turned and curled along with the page in the subsequent page turning process by adding the shadow elements to the page boundary line corresponding to the page turning instruction, and a natural shadow effect is presented. Preferably, in consideration of the fact that only a partial region related to a page of the book is subjected to curling transformation during the page turning process, in order to save system processing resources, the adding range of the shadow element may be set according to a page turning action region included in the page of the book. Specifically, a first shadow element is added to the outer area of the original book page along a first local line segment contained in a first page boundary line; and/or adding a second shadow element to the outer area of the original book page along a second local line segment contained in a second page boundary line; and determining the length of the first local line segment and/or the length of the second local line segment according to the sliding displacement of the sliding operation corresponding to the page turning instruction. To facilitate determining the length and position of the local line segment, in one specific example, a first local line segment included in the first page boundary line is defined by the first intersection C between the above-mentioned boundary straight line and the first page boundary line and the page initial position F of the page turning reference point; the second local line segment included in the second page boundary line is defined by the above-mentioned second intersection J of the boundary straight line and the second page boundary line and the page initial position F of the page turning reference point. In addition, it should be further noted that, in this embodiment, the adding timing of the shadow element is not limited, and the shadow element may also be added after obtaining a displacement variation between a page turning conversion position of a page turning reference point in a page of the page-turned book and a page initial position of the page turning reference point, and determining a page turning action region included in the page of the page-turned book according to the displacement variation. Therefore, the execution sequence among the steps can be flexibly adjusted. Or, the shadow element may be added first, and after the displacement variation amount between the page turning conversion position of the page turning reference point in the page of the page turning book and the page initial position of the page turning reference point is obtained, the size and the setting position of the shadow element are adjusted according to the obtained displacement variation amount.
EXAMPLE III
The embodiment of the application provides a non-volatile computer storage medium, wherein at least one executable instruction is stored in the computer storage medium, and the computer executable instruction can execute the simulation page turning method of the electronic book in any method embodiment.
The executable instructions may be specifically configured to cause the processor to:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
In an optional implementation manner, when the page turning instruction is a slide-type page turning instruction, the obtaining a displacement variation between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point includes:
acquiring the sliding direction and/or the sliding length of the sliding page turning instruction;
and determining the displacement direction and/or the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point according to the sliding direction and/or the sliding length.
In an optional implementation manner, the calculating the page curl radius corresponding to the page turning instruction includes:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
In an optional implementation manner, the determining, according to the page curl radius, the page initial position of the page turning reference point, and the page turning transformation position of the page turning reference point, a page turning active region included in the page of the book includes:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
In an optional implementation manner, if the page curl radius is greater than a preset value, the target point is located between the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point;
then the determining of the page turning active area included in the page of the book includes:
determining a first sub-area which is not subjected to curling transformation and contained in the page turning active area and a second sub-area which is subjected to curling transformation according to the target point; the first sub-area which is not subjected to the curling transformation corresponds to a back area of the page of the book, and the second sub-area which is subjected to the curling transformation comprises a front area and a back area of the page of the book.
In an optional implementation manner, the determining, according to the target point, a first sub-region included in the page-turning active region and not subjected to a warping transformation, and the second sub-region subjected to a warping transformation includes:
determining a target mapping point which is located on the reference straight line and corresponds to the target point; the interval between the target mapping point and the page initial position of the page turning reference point is matched with the interval between the target point and the page turning conversion position of the page turning reference point;
determining a first critical point located on a first page boundary line of the page of the book and a second critical point located on a second page boundary line of the page of the book according to a boundary mapping straight line which passes through the target mapping point and is perpendicular to the reference straight line; the first page boundary line is perpendicular to a second page boundary line, and the page initial position of the page turning reference point is located at the intersection point of the first page boundary line and the second page boundary line;
determining a triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point, and determining the first sub-area without crimp conversion and the second sub-area with crimp conversion according to the triangular area and a mapping area corresponding to the triangular area.
In an optional implementation manner, the obtaining of the page initial position of each image unit included in the page turning active region, and calculating and displaying the page turning transformation position of each image unit in combination with the page curl radius to implement the simulated page turning process of the book page includes:
determining the page turning transformation position of each image unit in the first sub-area according to a mapping relation aiming at the first sub-area;
and for the second sub-area, determining the page turning transformation position of each image unit in the second sub-area according to a cylindrical equation determined by the page curling radius.
In an optional implementation manner, if the page curl radius is not greater than a preset value, the page turning conversion position of the page turning reference point is between the page initial position of the page turning reference point and the target point;
the acquiring the page initial position of each image unit contained in the page turning active region, and calculating and displaying the page turning transformation position of each image unit by combining the page curl radius to realize the simulated page turning processing of the book page includes: and determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius.
Example four
Fig. 3 is a schematic structural diagram of an electronic device according to another 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 execute relevant steps in the above-described embodiment of the method for simulating page turning of an electronic book.
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 electronic device 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:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
In an optional implementation manner, when the page turning instruction is a slide-type page turning instruction, the obtaining a displacement variation between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point includes:
acquiring the sliding direction and/or the sliding length of the sliding page turning instruction;
and determining the displacement direction and/or the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point according to the sliding direction and/or the sliding length.
In an optional implementation manner, the calculating the page curl radius corresponding to the page turning instruction includes:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
In an optional implementation manner, the determining, according to the page curl radius, the page initial position of the page turning reference point, and the page turning transformation position of the page turning reference point, a page turning active region included in the page of the book includes:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
In an optional implementation manner, if the page curl radius is greater than a preset value, the target point is located between the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point;
then the determining of the page turning active area included in the page of the book includes:
determining a first sub-area which is not subjected to curling transformation and contained in the page turning active area and a second sub-area which is subjected to curling transformation according to the target point; the first sub-area which is not subjected to the curling transformation corresponds to a back area of the page of the book, and the second sub-area which is subjected to the curling transformation comprises a front area and a back area of the page of the book.
In an optional implementation manner, the determining, according to the target point, a first sub-region included in the page-turning active region and not subjected to a warping transformation, and the second sub-region subjected to a warping transformation includes:
determining a target mapping point which is located on the reference straight line and corresponds to the target point; the interval between the target mapping point and the page initial position of the page turning reference point is matched with the interval between the target point and the page turning conversion position of the page turning reference point;
determining a first critical point located on a first page boundary line of the page of the book and a second critical point located on a second page boundary line of the page of the book according to a boundary mapping straight line which passes through the target mapping point and is perpendicular to the reference straight line; the first page boundary line is perpendicular to a second page boundary line, and the page initial position of the page turning reference point is located at the intersection point of the first page boundary line and the second page boundary line;
determining a triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point, and determining the first sub-area without crimp conversion and the second sub-area with crimp conversion according to the triangular area and a mapping area corresponding to the triangular area.
In an optional implementation manner, the obtaining of the page initial position of each image unit included in the page turning active region, and calculating and displaying the page turning transformation position of each image unit in combination with the page curl radius to implement the simulated page turning process of the book page includes:
determining the page turning transformation position of each image unit in the first sub-area according to a mapping relation aiming at the first sub-area;
and for the second sub-area, determining the page turning transformation position of each image unit in the second sub-area according to a cylindrical equation determined by the page curling radius.
In an optional implementation manner, if the page curl radius is not greater than a preset value, the page turning conversion position of the page turning reference point is between the page initial position of the page turning reference point and the target point;
the acquiring the page initial position of each image unit contained in the page turning active region, and calculating and displaying the page turning transformation position of each image unit by combining the page curl radius to realize the simulated page turning processing of the book page includes: and determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
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 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 following 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. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. 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. A simulation page turning method of an electronic book comprises the following steps:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction according to the displacement variation quantity; wherein the content of the first and second substances,
the page curl radius refers to: when the book page is in a curled state along with page turning operation, the radius of a cylindrical curved surface formed by the curled book page;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
2. The method of claim 1, wherein when the page turning instruction is a slide-type page turning instruction, the obtaining a displacement variation between a page turning transformation position of a page turning reference point in a page of the book and a page initial position of the page turning reference point comprises:
acquiring the sliding direction and/or the sliding length of the sliding page turning instruction;
and determining the displacement direction and/or the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point according to the sliding direction and/or the sliding length.
3. The method of claim 1 or 2, wherein the calculating a page curl radius corresponding to the page flip instruction comprises:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
4. The method according to claim 1 or 2, wherein the determining a page turning active area included in the page of the book according to the page curl radius, the page initial position of the page turning reference point, and the page turning transition position of the page turning reference point comprises:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
5. The method according to claim 4, wherein if the page curl radius is greater than a preset value, the target point is between a page initial position of the page turning reference point and a page turning change position of the page turning reference point;
then the determining of the page turning active area included in the page of the book includes:
determining a first sub-area which is not subjected to curling transformation and contained in the page turning active area and a second sub-area which is subjected to curling transformation according to the target point; the first sub-area which is not subjected to the curling transformation corresponds to a back area of the page of the book, and the second sub-area which is subjected to the curling transformation comprises a front area and a back area of the page of the book.
6. The method according to claim 5, wherein the determining of the first sub-area contained in the page-flipping active area without the curl transformation and the second sub-area with the curl transformation according to the target point comprises:
determining a target mapping point which is located on the reference straight line and corresponds to the target point; the interval between the target mapping point and the page initial position of the page turning reference point is matched with the interval between the target point and the page turning conversion position of the page turning reference point;
determining a first critical point located on a first page boundary line of the page of the book and a second critical point located on a second page boundary line of the page of the book according to a boundary mapping straight line which passes through the target mapping point and is perpendicular to the reference straight line; the first page boundary line is perpendicular to a second page boundary line, and the page initial position of the page turning reference point is located at the intersection point of the first page boundary line and the second page boundary line;
determining a triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point, and determining the first sub-area without crimp conversion and the second sub-area with crimp conversion according to the triangular area and a mapping area corresponding to the triangular area.
7. The method of claim 6, wherein the obtaining of the page initial position of each image unit included in the page turning active region, and the calculating and displaying of the page turning transformation position of each image unit in combination with the page curl radius to implement the simulated page turning process of the book page comprises:
determining the page turning transformation position of each image unit in the first sub-area according to a mapping relation aiming at the first sub-area;
and for the second sub-area, determining the page turning transformation position of each image unit in the second sub-area according to a cylindrical equation determined by the page curling radius.
8. The method according to claim 4, wherein if the page curl radius is not greater than a preset value, the page turning transformation position of the page turning reference point is between the page initial position of the page turning reference point and the target point;
the acquiring the page initial position of each image unit contained in the page turning active region, and calculating and displaying the page turning transformation position of each image unit by combining the page curl radius to realize the simulated page turning processing of the book page includes: and determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius.
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:
responding to a received page turning instruction, acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction according to the displacement variation quantity; wherein the content of the first and second substances,
the page curl radius refers to: when the book page is in a curled state along with page turning operation, the radius of a cylindrical curved surface formed by the curled book page;
determining a page turning action area contained in a page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning change position of the page turning reference point;
and acquiring page initial positions of all the image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
10. The electronic device of claim 9, wherein when the page flip instruction is a slide-type page flip instruction, the executable instructions cause the processor to:
acquiring the sliding direction and/or the sliding length of the sliding page turning instruction;
and determining the displacement direction and/or the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point according to the sliding direction and/or the sliding length.
11. The electronic device of claim 9 or 10, wherein the executable instructions cause the processor to:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
12. The electronic device of claim 9 or 10, wherein the executable instructions cause the processor to:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
13. The electronic device of claim 12, wherein if the page curl radius is greater than a preset value, the target point is between a page initial position of the page turning reference point and a page turning transition position of the page turning reference point;
the executable instructions cause the processor to: determining a first sub-area which is not subjected to curling transformation and contained in the page turning active area and a second sub-area which is subjected to curling transformation according to the target point; the first sub-area which is not subjected to the curling transformation corresponds to a back area of the page of the book, and the second sub-area which is subjected to the curling transformation comprises a front area and a back area of the page of the book.
14. The electronic device of claim 13, wherein the executable instructions cause the processor to:
determining a target mapping point which is located on the reference straight line and corresponds to the target point; the interval between the target mapping point and the page initial position of the page turning reference point is matched with the interval between the target point and the page turning conversion position of the page turning reference point;
determining a first critical point located on a first page boundary line of the page of the book and a second critical point located on a second page boundary line of the page of the book according to a boundary mapping straight line which passes through the target mapping point and is perpendicular to the reference straight line; the first page boundary line is perpendicular to a second page boundary line, and the page initial position of the page turning reference point is located at the intersection point of the first page boundary line and the second page boundary line;
determining a triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point, and determining the first sub-area without crimp conversion and the second sub-area with crimp conversion according to the triangular area and a mapping area corresponding to the triangular area.
15. The electronic device of claim 14, wherein the executable instructions cause the processor to:
determining the page turning transformation position of each image unit in the first sub-area according to a mapping relation aiming at the first sub-area;
and for the second sub-area, determining the page turning transformation position of each image unit in the second sub-area according to a cylindrical equation determined by the page curling radius.
16. The electronic device of claim 12, wherein if the page curl radius is not greater than a preset value, the page turning transformation position of the page turning reference point is between the page initial position of the page turning reference point and the target point;
the executable instructions cause the processor to: and determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius.
17. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform the method of simulated page turning according to any of claims 1-8.
CN202011322346.5A 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium Active CN112433796B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011322346.5A CN112433796B (en) 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium
PCT/CN2021/124747 WO2022105513A1 (en) 2020-11-23 2021-10-19 Simulated page turning method for electronic book, and electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011322346.5A CN112433796B (en) 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN112433796A CN112433796A (en) 2021-03-02
CN112433796B true CN112433796B (en) 2021-08-10

Family

ID=74693654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011322346.5A Active CN112433796B (en) 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium

Country Status (2)

Country Link
CN (1) CN112433796B (en)
WO (1) WO2022105513A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433795A (en) * 2020-11-23 2021-03-02 掌阅科技股份有限公司 Electronic book simulation page turning method, electronic equipment and computer storage medium
CN112433796B (en) * 2020-11-23 2021-08-10 掌阅科技股份有限公司 Electronic book simulation page turning method, electronic equipment and computer storage medium
CN115016701A (en) * 2022-07-25 2022-09-06 北京字跳网络技术有限公司 Page turning method and device, computer equipment and storage medium
CN115409930B (en) * 2022-10-31 2023-02-14 深圳市趣推科技有限公司 Scroll simulation method, device and equipment for electronic page and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923435B (en) * 2010-08-24 2012-11-21 福州瑞芯微电子有限公司 Method for simulating real page turning effect for electronic book
US9911221B2 (en) * 2010-10-27 2018-03-06 Google Llc Animated page turning
CN104156144B (en) * 2013-05-14 2018-02-27 腾讯科技(深圳)有限公司 Electric document page-turning effect implementation method and device
CN104346046B (en) * 2013-08-05 2017-07-21 北京易天新动网络科技有限公司 Three-dimensional artificial page turning method and system
CN110737496A (en) * 2019-10-15 2020-01-31 掌阅科技股份有限公司 Method for realizing calendar page turning effect, electronic equipment and computer storage medium
CN111538697B (en) * 2020-04-23 2023-04-18 掌阅科技股份有限公司 Page turning processing method of electronic book, electronic equipment and computer storage medium
CN112433657B (en) * 2020-11-23 2022-03-29 掌阅科技股份有限公司 Electronic book simulation page turning method, electronic equipment and computer storage medium
CN112433795A (en) * 2020-11-23 2021-03-02 掌阅科技股份有限公司 Electronic book simulation page turning method, electronic equipment and computer storage medium
CN112433796B (en) * 2020-11-23 2021-08-10 掌阅科技股份有限公司 Electronic book simulation page turning method, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN112433796A (en) 2021-03-02
WO2022105513A1 (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN112433657B (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
CN112433796B (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
US11344806B2 (en) Method for rendering game, and method, apparatus and device for generating game resource file
EP3618003B1 (en) Method and apparatus for generating synthetic picture
CN112433795A (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
US11054969B2 (en) Method and device for displaying page of electronic book, and terminal device
CN111803945B (en) Interface rendering method and device, electronic equipment and storage medium
US20200410686A1 (en) Automatic sizing and placement of text within a digital image
CN111127623A (en) Model rendering method and device, storage medium and terminal
WO2023066121A1 (en) Rendering of three-dimensional model
CN115237522A (en) Page self-adaptive display method and device
CN105550973B (en) Graphics processing unit, graphics processing system and anti-aliasing processing method
CN111538697A (en) Page turning processing method of electronic book, electronic equipment and computer storage medium
WO2022048414A1 (en) Image generation method, apparatus, and device, and storage medium
CN113010252B (en) Application page display method, electronic equipment and storage medium
CN111638851B (en) Handwriting display processing method, related device and handwriting interoperation system
CN110187816B (en) Automatic page turning method for cartoon type electronic book, computing device and storage medium
CN110737496A (en) Method for realizing calendar page turning effect, electronic equipment and computer storage medium
CN109976865A (en) Display methods, device and the terminal device of Task Progress
CN114647475A (en) Display method of folding screen device, folding screen device and storage medium
WO2017011680A1 (en) Device and method for processing data
CN112650432B (en) Display method of object display page, electronic equipment and storage medium
CN111524209B (en) Electronic writing method, device, terminal and storage medium
CN117635453A (en) Method, device, server and storage medium for generating poster
CN117037282A (en) Image-based object driving method, device, equipment, medium and 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
GR01 Patent grant
GR01 Patent grant